码迷,mamicode.com
首页 > 其他好文 > 详细

Nginx Install 记录

时间:2018-03-12 18:52:28      阅读:179      评论:0      收藏:0      [点我收藏+]

标签:https   class   make   strong   tle   could not   start   systemctl   tps   

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

 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   class   make   strong   tle   could not   start   systemctl   tps   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!