WEB运维手册

nginx+php

centos 6 安装源

rpm -ivh http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm

yum安装

yum -y install nginx php-fpm php-mysql mysql-server

源码包安装

安装编译依赖包

yum -y install gcc gcc-c++ autoconf automake  zlib zlib-devel openssl openssl-devel pcre-devel

获取nginx

wget http://nginx.org/download/nginx-1.7.7.tar.gz

编译安装

[root@localhost ~]# tar xvf nginx-1.7.7.tar.gz
[root@localhost ~]# cd nginx-1.7.7
[root@localhost nginx-1.7.7]# ./configure --prefix=/app/nginx/
[root@localhost nginx-1.7.7]# make && make install