一、下載nginx,官方網站https://nginx.orgnginx
wget https://nginx.org/download/nginx-1.14.0.tar.gz
二、下載Nginx Sticky Module,官方網站https://bitbucket.org/nginx-goodies/nginx-sticky-module-ngbash
wget https://bitbucket.org/nginx-goodies/nginx-sticky-module-ng/get/08a395c66e42.zip
三、解壓軟件包網站
tar xfz nginx-1.14.0.tgz unzip 08a395c66e42.zip
四、安裝nginxui
./configure --with-http_ssl_module --with-http_gzip_static_module --add-module=/home/apuser/nginx-goodies-nginx-sticky-module-ng-08a395c66e42/ make make install
五、啓動nginx.net
/usr/local/nginx/sbin/nginx
六、查看nginx進程code
ps aux | grep nginx root 5413 0.0 0.0 45896 1192 ? Ss 14:42 0:00 nginx: master process /usr/local/nginx/sbin/nginx nobody 5414 0.0 0.0 48376 2044 ? S 14:42 0:00 nginx: worker process root 5420 0.0 0.0 112664 972 pts/0 S+ 14:42 0:00 grep --color=auto nginx
注:安裝過程當中若是出現:configure: error: SSL modules require the OpenSSL libraryblog
解決方法,執行如下命令:進程
yum -y install openssl openssl-devel
注:安裝過程當中若是出現:error: the HTTP rewrite module requires the PCRE libraryip
解決方法,執行如下命令:ssl
yum -y install pcre-devel
連接: