centos8安裝nginx1.9.1的詳細(xì)過(guò)程
1.17.9 更香,真的
nginx下載地址:https://nginx.org/download/
1.下載nginx
wget https://nginx.org/download/nginx-1.9.9.tar.gz
2.解壓nginx
tar -zxvf nginx-1.9.9.tar.gz
3.安裝依賴包
yum -y install gcc gcc-c++ pcre pcre-devel zlib zlib-devel openssl openssl-devel
4.配置nginx
cd nginx-1.9.9/ ./configure \--prefix=/usr/local/nginx \--with-http_ssl_module \--conf-path=/usr/local/nginx/conf/nginx.conf \--pid-path=/usr/local/nginx/conf/nginx.pid \--lock-path=/var/lock/nginx.lock \--error-log-path=/var/logs/nginx/error.log \--http-log-path=/var/logs/nginx/access.log \--with-http_gzip_static_module \--http-client-body-temp-path=/var/temp/nginx/client \--http-proxy-temp-path=/var/temp/nginx/proxy \--http-fastcgi-temp-path=/var/temp/nginx/fastcgi \--http-uwsgi-temp-path=/var/temp/nginx/uwsgi \--http-scgi-temp-path=/var/temp/nginx/scgi
5.編輯部分配置,為下面執(zhí)行make命令做準(zhǔn)備
編輯文件 nginx 根目錄:objs/Makefile
編輯文件:src/os/unix/ngx_user.c
6.編譯
make
7.安裝
make install
8.開(kāi)放80端口
檢查80端口是否開(kāi)放:
firewall-cmd --zone=public --list-ports
如果沒(méi)有 80/tcp 執(zhí)行以下命令,開(kāi)放端口
#永久開(kāi)放80端口 firewall-cmd --zone=public --add-port=80/tcp --permanent #更新防火墻規(guī)則 firewall-cmd --reload
9.啟動(dòng)nginx
/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
10.web訪問(wèn)
到此這篇關(guān)于centos8安裝nginx1.9.1的詳細(xì)過(guò)程的文章就介紹到這了,更多相關(guān)centos8安裝nginx1.9.1內(nèi)容請(qǐng)搜索本站以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持本站!
版權(quán)聲明:本站文章來(lái)源標(biāo)注為YINGSOO的內(nèi)容版權(quán)均為本站所有,歡迎引用、轉(zhuǎn)載,請(qǐng)保持原文完整并注明來(lái)源及原文鏈接。禁止復(fù)制或仿造本網(wǎng)站,禁止在非www.sddonglingsh.com所屬的服務(wù)器上建立鏡像,否則將依法追究法律責(zé)任。本站部分內(nèi)容來(lái)源于網(wǎng)友推薦、互聯(lián)網(wǎng)收集整理而來(lái),僅供學(xué)習(xí)參考,不代表本站立場(chǎng),如有內(nèi)容涉嫌侵權(quán),請(qǐng)聯(lián)系alex-e#qq.com處理。