linux下载nginx
生活随笔
收集整理的這篇文章主要介紹了
linux下载nginx
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
1.安裝依賴包
//一鍵安裝上面四個依賴 yum -y install gcc zlib zlib-devel pcre-devel openssl openssl-devel2.下載并解壓安裝包
//創建一個文件夾 cd /usr/local mkdir nginx cd nginx //下載tar包 wget http://nginx.org/download/nginx-1.13.7.tar.gz //解壓 tar -xvf nginx-1.13.7.tar.gz3.安裝nginx
//進入nginx目錄 cd /usr/local/nginx //進入目錄 cd nginx-1.13.7 //執行命令 考慮到后續安裝ssl證書 添加兩個模塊 ./configure --with-http_stub_status_module --with-http_ssl_module //執行make命令 make //執行make install命令 make install4.啟動nginx服務
???????/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf可在配置文件中進行修改端口號
# 打開配置文件 vi /usr/local/nginx/conf/nginx.conf將端口號改成8089(隨便挑個端口),因為可能apeache占用80端口,apeache端口盡量不要修改,我們選擇修改nginx端口。
將localhost修改為你服務器的公網ip地址。
?
5.重啟nginx
/usr/local/nginx/sbin/nginx -s reload?查看nginx進程是否啟動:
ps -ef | grep nginx?
?
?
?
總結
以上是生活随笔為你收集整理的linux下载nginx的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: opencv for python的图像
- 下一篇: Telegram计划于3月推出区块链平台