国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 網(wǎng)站 > Nginx > 正文

centos7編譯安裝nginx的方法步驟

2024-08-30 12:24:55
字體:
供稿:網(wǎng)友

安裝nginx編譯所需的lib庫

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

查看pcre(正則庫)版本

pcre-config --version

進入編譯目錄

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

進入解壓目錄

cd nginx-1.14.0

運行配置腳本(--prefix參數(shù)指定nginx安裝的目錄,默認安裝在/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

啟動nginx

nginx

設置開機自啟動

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

以上就是整個安裝過程...

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

[root@localhost ~]# nginx -hnginx version: nginx/1.14.0Usage: 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

以上就是本文的全部內(nèi)容,希望對大家的學習有所幫助,也希望大家多多支持錯新站長站。

發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 万荣县| 沂水县| 山东省| 平江县| 长海县| 探索| 资中县| 滁州市| 汝城县| 土默特左旗| 格尔木市| 苏尼特右旗| 高州市| 贵州省| 乐亭县| 大理市| 文昌市| 舒兰市| 定边县| 甘南县| 佛冈县| 栾城县| 庐江县| 肇庆市| 新兴县| 疏勒县| 元氏县| 崇信县| 革吉县| 浪卡子县| 青铜峡市| 绥芬河市| 拜城县| 玉山县| 贵定县| 农安县| 旌德县| 建始县| 桃江县| 响水县| 旌德县|