校园春色亚洲色图_亚洲视频分类_中文字幕精品一区二区精品_麻豆一区区三区四区产品精品蜜桃

主頁 > 知識庫 > centos7編譯安裝nginx的方法步驟

centos7編譯安裝nginx的方法步驟

熱門標簽:如何分析地圖標注 新余高德地圖標注怎么修改 電銷機器人價值 大連400電話如何申請 外呼系統坐席費計入會計哪個科目 電銷機器人怎么接線路 撫順地圖標注 高德地圖標注好做嗎 達亞電銷機器人官網

安裝nginx編譯所需的lib庫

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

查看pcre(正則庫)版本

pcre-config --version

進入編譯目錄

cd /usr/local/src

從官網下載最新的nginx(stable version穩定版)

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參數指定nginx安裝的目錄,默認安裝在/usr/local/nginx )

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

編譯安裝nginx

make && make install

將nginx執行命令軟鏈接到/usr/bin

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

啟動nginx

nginx

設置開機自啟動

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

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

執行nginx -h查看相關命令

[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

以上就是本文的全部內容,希望對大家的學習有所幫助,也希望大家多多支持腳本之家。

標簽:南通 衡水 海東 黃石 遼源 新鄉 楊凌 湖南

巨人網絡通訊聲明:本文標題《centos7編譯安裝nginx的方法步驟》,本文關鍵詞  centos7,編譯,安裝,nginx,的,;如發現本文內容存在版權問題,煩請提供相關信息告之我們,我們將及時溝通與處理。本站內容系統采集于網絡,涉及言論、版權與本站無關。
  • 相關文章
  • 下面列出與本文章《centos7編譯安裝nginx的方法步驟》相關的同類信息!
  • 本頁收集關于centos7編譯安裝nginx的方法步驟的相關信息資訊供網民參考!
  • 推薦文章
    主站蜘蛛池模板: 逊克县| 红安县| 茶陵县| 台中市| 清苑县| 威海市| 梁河县| 息烽县| 三明市| 贵定县| 伊春市| 宿迁市| 吴江市| 南汇区| 汉阴县| 南充市| 云南省| 张家界市| 福鼎市| 河北区| 都兰县| 府谷县| 昌吉市| 密云县| 沅江市| 固始县| 永修县| 慈利县| 白山市| 鸡泽县| 东辽县| 泗洪县| 溧阳市| 思南县| 朝阳区| 武乡县| 高邮市| 府谷县| 岗巴县| 祥云县| 潮安县|