首页 > 其他 > 详细

CentOS 7 安装 nginx1.15

时间:2019-10-01 14:52:29      阅读:114      评论:0      收藏:0      [点我收藏+]

1,安装依赖

yum -y install gcc zlib zlib-devel pcre-devel openssl openssl-devel

 SSL功能需要openssl库

  gzip模块需要zlib库

  rewrite模块需要pcre库

2,下载nginx的tar包

  cd /soft
 
  mkdir nginx
 
  cd nginx
 
  //下载tar包
 
  wget http://nginx.org/download/nginx-1.15.7.tar.gz

3,安装nginx

tar -zxvf nginx-1.15.7.tar.gz
 
cd nginx-1.15.7/
 
./configure --prefix=/soft/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_gzip_static_module
 #编译安装
make install

4,Nginx启动

//进入nginx安装目录
cd sbin
sudo ./nginx

5,验证

技术分享图片

 

CentOS 7 安装 nginx1.15

原文:https://www.cnblogs.com/brokencolor/p/11615182.html

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