首页 > 其他 > 详细

Nginx Install 记录

时间:2018-03-12 17:40:57      阅读:186      评论:0      收藏:0      [点我收藏+]

一、安装编译工具及库文件

 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 ]

Nginx Install 记录

原文:https://www.cnblogs.com/dreamtaker/p/8550153.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!