本身總結安裝nginx的一些經驗nginx
一:首先安裝一些依賴庫c++
1:安裝make ssl
yum -y install gcc automake autoconf libtool makeget
2:安裝g++openssl
yum install gcc gcc-c++gcc
3:安裝prce下載
yum install pcre pcre-develgc
4:安裝zlibyum
yum install zlib zlib-devel經驗
5:安裝openssl
yum install openssl openssl-devel
二:安裝nginx(使用的最新版)
1:下載
cd /usr/local
wget https://nginx.org/download/nginx-1.9.9.tar.gz
2:安裝
tar -zxf nginx-1.9.9.tar.gz
cd nginx-1.9.9
./configure
make
make install
3:運行
nginx會默認安裝在/usr/local/nginx,
cd /usr/local/nginx/sbin/
./nginx -s reload