Nginx基于Linux环境搭建

时间:2021-05-11 10:05:40   收藏:0   阅读:19
# 安装相关依赖
[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

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

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!