yum 6.8 nginx php-fpm
centos6.8 yum安装 php-fpm 1.检查当前安装的PHP包 yumlistinstalled|grepphp
配置yum源追加CentOS 6.5的epel及remi源。 ? #rpm-Uvhhttp:
//ftp.iij.ad.jp/pub/linux/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm
//rpms.famillecollet.com/enterprise/remi-release-6.rpm
以下是CentOS 7.0的源。 ? #yuminstallepel-release
#rpm-ivhhttp:
//rpms.famillecollet.com/enterprise/remi-release-7.rpm
使用yum list命令查看可安装的包(Packege)。 ?#yumlist--enablerepo=remi--enablerepo=remi-php56|grepphp
安装PHP5.6.xyum源配置好了,下一步就安装PHP5.6。 ? #yuminstall--enablerepo=remi--enablerepo=remi-php56phpphp-opcachephp-develphp-mbstringphp-mcryptphp-mysqlndphp-phpunit-PHPUnitphp-pecl-xdebugphp-pecl-xhprof 用PHP命令查看版本。 ?
安装PHP-fpmyuminstall--enablerepo=remi-php56php-fpm centos6.8 安装nginx 准备条件 yum install -y gcc-c++ yuminstall -y pcre pcre-devel yuminstall -y zlib zlib-devel yum openssl openssl-devel 安装 wget https://nginx.org/download/nginx-1.8.0.tar.gz tar zxvf nginx-1.8.0.targz cd nginx-1.8.0 /configure --prefix=/usr/local/nginx --with-http_ssl_module ---http_stub_status_module-pcre make && make install 查看服务路径 find/ -name nginx
进入nginx安装路径:cd /usr/local/nginx/sbin 启动服务 启动: 1. ./nginx 2. /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf 两种方式都可以 4. 停止: 从容停止:kill -QUIT 19795(注意:19795是Nginx的进程号) 快速停止:kill -TERM 46968(注意:46968是Nginx的进程号) (强制停止:pkill -9 nginx ./nginx -s stop:此方式相当于先查出nginx进程id再使用kill命令强制杀掉进程。 ./nginx -s quit:此方式停止步骤是待nginx进程处理任务完毕进行停止。 先停止再启动:./nginx -s quit; ./nginx) .验证nginx的配置文件是否正确: 1.cd /usr/local/nginx/sbin 进入nginx的安装目录,接着执行 ./nginx -t
重新加载配置文件: ./nginx -s reload
查看nginx进程: 1. ps -ef |grep nginx 2.ps aux|grep nginx (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |