1. 安装make
yum -y install gcc automake autoconf libtool make
2. 安装g++
yum install gcc gcc-c++
3. cd到安装nginx的目录
cd /usr/local/src
4. 安装pcre库
cd /usr/local/src
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.39.tar.gz
tar -zxvf pcre-8.37.tar.gz
cd pcre-8.34
./configure
make
make install
5. 安装zlib库
cd /usr/local/src
wget http://zlib.net/zlib-1.2.11.tar.gz
tar -zxvf zlib-1.2.11.tar.gz
cd zlib-1.2.11
./configure
make
make install
6. 安装openssI
cd /usr/local/src
wget https://www.openssl.org/source/openssl-1.0.1t.tar.gz
tar -zxvf openssl-1.0.1t.tar.gz
7. 安装Nginx
cd /usr/local/src
wget http://nginx.org/download/nginx-1.1.10.tar.gz
tar -zxvf nginx-1.1.10.tar.gz
cd nginx-1.1.10
./configure
make
make install
8. Nginx启动,杀死进程,查看进程
启动:
[root@izm5edt5e7ronk42kazu87z www]# /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
查看进程:
ps -ef|grep nginx
杀死进程:
kill -QUIT 11752