首页 > 系统服务 > 详细

Nginx基于Linux环境搭建

时间:2021-05-11 10:05:40      阅读:16      评论:0      收藏:0      [点我收藏+]
# 安装相关依赖
[root@master /]# yum -y install make zlib zlib-devel gcc-c++ libtool  openssl openssl-devel

[root@master /]# cd opt/

# 下载安装包
[root@master opt]# wget http://nginx.org/download/nginx-1.15.9.tar.gz

# 解压
[root@master opt]# tar -zxvf nginx-1.15.9.tar.gz

# 进入
[root@master opt]# cd nginx-1.15.9
# 编译
[root@master nginx-1.15.9]# ./configure --prefix=/usr/local/nginx/ --with-http_ssl_module --with-http_stub_status_module
[root@master nginx-1.15.9]# make && make install


[root@master sbin]# cd /usr/local/nginx/sbin
# 启动
[root@master sbin]# ./nginx -c /usr/local/nginx/conf/nginx.conf

# 测试
[root@master sbin]# crul localhost:80

# 停止
[root@master sbin]# ./nginx -s stop

Nginx基于Linux环境搭建

原文:https://www.cnblogs.com/q-linyu/p/14753591.html

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