1. Nginx 1.13.6 源码安装

系统:Centos 7.3 Server with GUI

软件:nginx-1.13.6.tar.gz

其他所需软件:openssl pcre zlib openssl-devel

安装方式:源码编译安装

安装位置:/usr/local/nginx

下载地址:

http://nginx.org/en/download.html

https://www.openssl.org/source/

 

https://ftp.pcre.org/pub/pcre/

http://zlib.net/

 

 

安装需要gcc-c++

#yum install gcc-c++ -y

其他依赖包(只需要解压出来不需要安装)

# tar -xvf openssl-1.1.0g.tar.gz

# tar -xvf zlib-1.2.11.tar.gz

# tar -xvf pcre-8.41.tar.gz

添加一个用户

# useradd nginx

# tar -xvf nginx-1.13.6.tar.gz

#./configure --help #配置的时候可查看帮助,切勿盲目配置

# ./configure --user=nginx --group=nginx --prefix=/usr/local/nginx --with-http_ssl_module --with-openssl=/root/openssl-1.1.0g --with-pcre=/root/pcre-8.41 --with-zlib=/root/zlib-1.2.11 --with-http_stub_status_module --conf-path=/usr/local/nginx/nginx.conf --pid-path=/usr/local/nginx/nginx.pid

 

# ./nginx -h 查看帮助

# ./nginx -t 测试配置文件

# ./nginx #启动nginx
nginx: the configuration file /usr/local/nginx/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/nginx.conf test is successful

 

# ps -ef|grep nginx
root      84479      1  0 22:08 ?        00:00:00 nginx: master process ./nginx
nginx     84480  84479  0 22:08 ?        00:00:00 nginx: worker process

 

posted @ 2017-11-22 22:20  ling小龙  阅读(1244)  评论(0编辑  收藏  举报