yum 6.8 nginx php-fpm

前端之家收集整理的这篇文章主要介绍了yum 6.8 nginx php-fpm前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

centos6.8 yum安装 PHP-fpm

1.检查当前安装的PHP

yumlistinstalled|grepPHP


如果有安装的PHP包,先删除他们

  1. yumremovePHP.x86_64PHP-cli.x86_64PHP-common.x86_64PHP-gd.x86_64PHP-ldap.x86_64PHP-mbstring.x86_64PHP-mcrypt.x86_64PHP-MysqL.x86_64PHP-pdo.x86_64



配置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.x

yum源配置好了,下一步就安装PHP5.6。

?

#yuminstall--enablerepo=remi--enablerepo=remi-PHP56PHPPHP-opcachePHP-develPHP-mbstringPHP-mcryptPHP-MysqLndPHP-PHPunit-PHPUnitPHP-pecl-xdebugPHP-pecl-xhprof

PHP命令查看版本。

?

1
2
3
4
5
6
#PHP--version
PHP5.6.0(cli)(built:Sep3201419:51:31) Copyright(c)1997-2014ThePHPGroup ZendEnginev2.6.0,Copyright(c)1998-2014ZendTechnologies
withZendOPcachev7.0.4-dev,Copyright(c)1999-2014,byZendTechnologies
withXdebugv2.2.5,Copyright(c)2002-2014,byDerckRethans


安装PHP-fpm

yuminstall--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

@H_787_301@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

原文链接:https://www.f2er.com/bash/392251.html

猜你在找的Bash相关文章