nginx安裝過程-----基礎的基本配置
阿新 • • 發佈:2019-02-19
1.安裝nginx的預備環境
2.
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.41.tar.gz 安裝包
3.解壓
tar -zxvf nginx.
4.配置 安裝目錄
./configure --sbin-path=/usr/local/nginx/nginx --conf-path=/usr/local/nginx/nginx.conf --pid-path=/usr/local/nginx/nginx.pid --with-http_ssl_module --with-pcre=/usr/local/src/pcre-8.41
5.編譯
make
6.安裝
make install
7.檢視nginx版本
/usr/local/nginx/nginx -V #與./configure的安裝位置有關,可以利用whereis進行檢視
8.檢視nginx安裝是否正常
/usr/local/nginx/nginx -t
9.檢視nginx是否有啟動
ps -ef | grep nginx
10. pkill nginx #殺掉nginx已經啟動的
11. /usr/local/nginx/nginx #nginx 啟動
[root@izbp15xf4ylewnshijrknqz conf]# /usr/local/nginx/nginx
[root@izbp15xf4ylewnshijrknqz conf]# ps -ef |grep nginx
root 5227 1 0 16:16 ? 00:00:00 nginx: master process /usr/local/nginx/nginx
nobody 5228 5227 0 16:16 ? 00:00:00 nginx: worker process
root 5236 428 0 16:16 pts/0 00:00:00 grep --color=auto nginx
12 /usr/local/nginx/nginx -s reload 重新啟動