1. Nginx 1.13.6 源码安装

系统:Centos 7.3 Server with GUIhtml

软件:nginx-1.13.6.tar.gznginx

其余所需软件:openssl pcre zlib openssl-develc++

安装方式:源码编译安装测试

安装位置:/usr/local/nginxspa

下载地址:.net

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

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

 

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

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 nginxroot      84479      1  0 22:08 ?        00:00:00 nginx: master process ./nginxnginx     84480  84479  0 22:08 ?        00:00:00 nginx: worker process

相关文章
相关标签/搜索