欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

centos7編譯安裝nginx的方法步驟

 更新時(shí)間:2018年07月21日 08:39:37   作者:一落一  
這篇文章主要介紹了centos7編譯安裝nginx的方法步驟,小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過(guò)來(lái)看看吧

安裝nginx編譯所需的lib庫(kù)

yum -y install make zlib zlib-devel gcc-c++ libtool openssl openssl-devel
yum -y install pcre pcre-devel

查看pcre(正則庫(kù))版本

pcre-config --version

進(jìn)入編譯目錄

cd /usr/local/src

官網(wǎng)下載最新的nginx(stable version穩(wěn)定版)

wget http://nginx.org/download/nginx-1.14.0.tar.gz

解壓nginx壓縮包

tar -zxvf nginx-1.14.0.tar.gz

進(jìn)入解壓目錄

cd nginx-1.14.0

運(yùn)行配置腳本(--prefix參數(shù)指定nginx安裝的目錄,默認(rèn)安裝在/usr/local/nginx )

./configure --prefix=/usr/local/nginx

編譯安裝nginx

make && make install

將nginx執(zhí)行命令軟鏈接到/usr/bin

ln -s /usr/local/nginx/sbin/nginx /usr/bin

啟動(dòng)nginx

nginx

設(shè)置開(kāi)機(jī)自啟動(dòng)

echo "/usr/local/nginx/sbin/nginx" >> /etc/rc.d/rc.local
chmod +x /etc/rc.d/rc.local

以上就是整個(gè)安裝過(guò)程...

執(zhí)行nginx -h查看相關(guān)命令

[root@localhost ~]# nginx -h
nginx version: nginx/1.14.0
Usage: nginx [-?hvVtTq] [-s signal] [-c filename] [-p prefix] [-g directives]

Options:
 -?,-h     : this help
 -v      : show version and exit
 -V      : show version and configure options then exit
 -t      : test configuration and exit
 -T      : test configuration, dump it and exit
 -q      : suppress non-error messages during configuration testing
 -s signal   : send signal to a master process: stop, quit, reopen, reload
 -p prefix   : set prefix path (default: /usr/local/nginx/)
 -c filename  : set configuration file (default: conf/nginx.conf)
 -g directives : set global directives out of configuration file

查看nginx安裝目錄

whereis nginx

以上就是本文的全部?jī)?nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。

相關(guān)文章

最新評(píng)論