centos

http://www.centoscn.com/image-text/install/2014/1209/4281.htmlphp

 
啓用ssh
 
 
若是安裝centos7 須要選擇centos 64!!!!!!!!!!!!!!!!
 
安裝nignx php 環境
http://www.thinkphp.cn/code/992.html
安裝報錯 安裝 GCC
http://www.rjkfw.com/s_3059.html(database disk image is malformed)
 
 
開機自啓nginx   echo  "/data/soft/nginx/nginx"   >>   /etc/ rc . local
 
openssl的安裝,下載不了,先下載在安裝
虛擬機上不少wege 訪問不了主機,須要,在實體機上下載傳上去
 
 
./ configure  -- sbin - path = /data/ soft / nginx / nginx \- - conf - path = /data/ soft / nginx / nginx . conf \- - pid - path = /data/ soft / nginx / nginx . pid \- - with - http_ssl_module \- - with - pcre = /data/ soft / src / pcre - 8.37  \- - with - zlib = /data/ soft / src / zlib - 1.2 . 8  \- - with - openssl = /data/ soft / src / openssl - 1.0 . 1h
 
開放80端口
 
 
./ configure  -- prefix = /data/ soft / php   -- enable - fpm  -- with - mcrypt \- - enable - mbstring  -- disable - pdo  -- with - curl  -- disable - debug   -- disable - rpath \- - enable - inline - optimization  -- with - bz2   -- with - zlib  -- enable - sockets \- - enable - sysvsem  -- enable - sysvshm  -- enable - pcntl  -- enable - mbregex \- - with - mhash  -- enable - zip  -- with - pcre - regex  -- with - mysql  -- with - mysqli \- - with - gd  -- with - jpeg - dir  --with-config-file-path=/etc
 
 
cp php.ini-dist /usr/local/php/lib/php.ini 
 
 
報錯
http://www.nginx.cn/2196.html( mcrypt.h not found. Please reinstall libmcrypt.
修改根目錄 
 location / {
            root   /data/www;
            index  index.html index.htm index.php;
        }
location ~ \.php$ {
            root           /data/www;
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
            include        fastcgi_params;
        }
 
 
mysql 啓動報權限不夠
chmod a+wrx /etc/init.d/mysqld
 
  
重啓php的問題
那個pid文件是須要vi php-fpm.conf 去掉裏面那個 pid = run/php-fpm.pid 前面的分號而後再啓動php-fpm才能自動生成的 呵呵,我也是有一樣的疑問研究了下才弄出來的 網上確實沒大有說明這個問題的
netstat -apn | grep 9000
kill -HUP pid 關閉進程(守護京城)
重啓nginx  
/data/soft/nginx/nginx -s reload
重啓php  kill  - USR2  `cat /data/soft/php/var/run/php-fpm.pid`
 
關閉圖片界面
vim /etc/inittab  將
改成3(之前是5)
 
 
安裝memcached 擴展
./configure -enable-memcached -with-php-config=/data/soft/php/bin/php-config -with-zlib-dir -with-libmemcached-dir=/data/soft/libmemcached -prefix=/data/soft/phpmemcached
 
chmod -R 777 /data/www
修改開發目錄爲最高權限
 
這個報錯
Fatal error : Call to undefined function _() in  /data/www/uya/admin/library/configs/system.config.php  on line  8
缺乏 gettext擴展,到php的源碼目錄
cd /data/soft/src/php-5.6.2
./configure --with-php-config=/data/soft/php/bin/php-config 
 
netstat –apn | grep 8080  查看端口占用
kill -9 PID 關閉進程
相關文章
相關標籤/搜索