linux centos7 安装nginx

1、下载nginx安装包

复制代码
wget -c http://nginx.org/download/nginx-1.24.0.tar.gz

2、 安装nginx所需要的依赖包

复制代码
yum install -y gcc-c++	zlib zlib-devel	openssl openssl-devel pcre pcre-devel

3、解压安装包

复制代码
 tar -zxvf nginx-1.24.0.tar.gz 

4、#执行配置脚本 --prefix是指定安装目录

复制代码
./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module

5、安装

复制代码
make && make install

6、启动Nginx

复制代码
/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
相关推荐
何中应40 分钟前
如何给虚拟机系统扩容
linux·运维·服务器
缘友一世1 小时前
tmux 共享终端:AI 模型执行命令的实时审计方案
linux·llm·tmux·agent终端交互审计
沐雪轻挽萤1 小时前
无人系统:Ubuntu 操作系统全景架构与实战工程指南
linux·运维·ubuntu
白緢1 小时前
嵌入式 Linux + 内核开发高频问题及排查
java·linux·运维
学编程就要猛1 小时前
JavaEE初阶:网络编程
运维·服务器·网络
蜡笔小新..1 小时前
Linux下Matplotlib使用Times New Roman字体的解决方案
linux·运维·matplotlib
飞yu流星1 小时前
文件压缩、文本内容、文本编辑
运维·服务器
洪流之源2 小时前
图像格式转换与内存对齐详解
linux
二宝哥2 小时前
Failed connect to mirrorlist.centos.org:80; Connection refused
linux·运维·centos
humors2212 小时前
一些安全类网站(不定期更新)
linux·网络·windows·安全·黑客·白帽