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

相關文章
相關標籤/搜索