標籤:span -o highlight ast release conf 啟動 rest x86_64
1、查看安裝的php
# rpm -qa | grep php
2、刪除php
# yum remove php
3、使用yum remove不能徹底刪除,要使用 rpm -e xxxx 把第一步列出的擴充 挨個刪除,注意依賴情況
# rpm -e php-fpm-5.3.3-22.el6.x86_64
全新安裝
1、配置yum源
centos 6.5# rpm -Uvh http://ftp.iij.ad.jp/pub/linux/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
centos 7.0# yum install epel-release# rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
2、使用yum 查看安裝包
# yum list --enablerepo=remi --enablerepo=remi-php56 | grep php
3、安裝,需要其他擴充包在後邊加上即可
# yum install --enablerepo=remi --enablerepo=remi-php56 php php-opcache php-devel php-mbstring php-mcrypt php-mysqlnd php-phpunit-PHPUnit php-pecl-xdebug php-pecl-xhprof
php-fpm 加入系統服務隨系統啟動而啟動
# chkconfig --level 345 php-fpm on
第一次啟動php-fpm
# /etc/init.d/php-fpm restart
Stopping php-fpm: [FAILED]
Starting php-fpm: [ OK ]
配置nginx
location ~ \.php$ { root html; fastcgi_pass 127.0.0.1:9000; #php-fpm的連接埠號碼 fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; }
重啟nginx
# /etc/init.d/nginx -s reload
Nginx + PHP