1、打開nignx官網:http://nginx.org/en/download.htmlhtml
2、先安裝依賴軟件:nginx
yum -y install pcre-develide
yum -y install openssl openssl-develhtm
3、檢測而且配置
./configure --prefix=/usr/local/soft/nginx --sbin-path=/usr/local/soft/nginx/sbin/nginx --conf-path=/usr/local/soft/nginx/config/nginx.conf --error-log-path=/usr/local/soft/nginx/logs/error.log --pid-path=/usr/local/soft/nginx/logs/nginx.pid --http-log-path=/usr/local/soft/nginx/logs/access.logssl
4、make && make installget