一、下载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
连接: