centos7安装nginx

1、更新源

shell 复制代码
sudo yum install -y epel-release
sudo yum -y update

2、安装nginx

shell 复制代码
sudo yum install -y nginx

3、操作nginx

shell 复制代码
# 启动
systemctl start nginx
# 停止
systemctl stop nginx
# 重启
systemctl restart nginx
# 查看状态
systemctl status nginx
# 开机启动
systemctl enable nginx
# 禁止开机启动
systemctl disable nginx
相关推荐
likfishdn6 分钟前
Linux的文件与目录管理
linux·运维·服务器
渲染101专业云渲染7 分钟前
川翔云电脑优势总结
服务器·3d·电脑·blender·maya
chian-ocean25 分钟前
Linux 文件缓冲区:高效数据访问的幕后推手
linux·运维·服务器
加油=^_^=27 分钟前
【Linux】进程优先级 | 进程调度(三)
linux·运维·服务器
若云止水36 分钟前
Ubuntu 下 nginx-1.24.0 源码分析 - ngx_init_cycle 函数 - 详解(4)
数据库·nginx·ubuntu
橘子味的茶二37 分钟前
高级系统架构师--第十章:计算机网络
服务器·计算机网络·系统架构
紫菜(Nori)1 小时前
短连接服务器压测-wrk
服务器·压力测试
元气满满的热码式1 小时前
Docker数据卷操作实战
linux·运维·docker·云原生·容器
陆沙1 小时前
deepseek-r1-centos-本地服务器配置方法
linux·服务器·centos
北京耐用通信1 小时前
航空装配自动化神器Ethercat转profient网关搭配机器人精准控制
运维·机器人·自动化