centos8安裝nginx1.9.1的詳細過程
1.17.9 更香,真的
nginx下載地址:https://nginx.org/download/
1.下載nginx
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命令做準備
編輯文件 nginx 根目錄:objs/Makefile


編輯文件:src/os/unix/ngx_user.c

6.編譯
make
7.安裝
make install
8.開放80端口
檢查80端口是否開放:
firewall-cmd --zone=public --list-ports

如果沒有 80/tcp 執(zhí)行以下命令,開放端口
#永久開放80端口 firewall-cmd --zone=public --add-port=80/tcp --permanent #更新防火墻規(guī)則 firewall-cmd --reload
9.啟動nginx
/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
10.web訪問

到此這篇關(guān)于centos8安裝nginx1.9.1的詳細過程的文章就介紹到這了,更多相關(guān)centos8安裝nginx1.9.1內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!
相關(guān)文章
Nginx?error_page自定義錯誤頁面設(shè)置過程
這篇文章主要介紹了Nginx?error_page自定義錯誤頁面設(shè)置過程,具有很好的參考價值,希望對大家有所幫助。如有錯誤或未考慮完全的地方,望不吝賜教2022-12-12
一篇文章快速掌握Nginx部署前端項目(Nginx安裝配置及部署都非常詳細!)
這篇文章主要給大家介紹了關(guān)于如何通過一篇文章快速掌握Nginx部署前端項目的相關(guān)資料,文中從Nginx安裝配置及部署都非常詳細哦,對大家的學(xué)習或者工作具有一定的參考學(xué)習價值,需要的朋友可以參考下2023-01-01
nginx實現(xiàn)靜態(tài)文件的token認證過程
這篇文章主要介紹了nginx實現(xiàn)靜態(tài)文件的token認證過程,2024-06-06

