Nginx Install 记录
一、安裝編譯工具及庫文件
?yum?-y?install?gcc
yum?-y?install?gcc-c++
yum -y install zlib;
yum -y install pcre-devel
yum -y install openssl openssl-devel
?
二、下載安裝包
wget -c https://nginx.org/download/nginx-1.10.3.tar.gz
tar -zxvfnginx-1.10.3.tar.gz
cd nginx-1.8.0
設置編譯路徑為 /usr/local/nginx
?./configure --prefix=/usr/local/nginx
三、編譯安裝
make?
make install
?
啟動Nginx,執行以下命令:
./nginx -s reload
error:
-bash: ./nginx: No such file or directory
執行
/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
四、設置開機啟動
systemctl status nginx
Error:Unit nginx.service could not be found.
Solution:
[ISSUE] [Centos] Centos Start Nginx Show: Failed to start nginx.service:unit not found?
service nginx start
Starting nginx (via systemctl): [ OK ]
轉載于:https://www.cnblogs.com/dreamtaker/p/8550153.html
總結
以上是生活随笔為你收集整理的Nginx Install 记录的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: ORACLE1.10 - 一对多
- 下一篇: Nginx 介绍配置