编程技术分享平台

网站首页 > 技术教程 正文

Linux搭建Nginx(linux搭建FTP服务器)

xnh888 2024-09-12 22:27:56 技术教程 23 ℃ 0 评论

1. 添加源

sudo rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm

2. 安装Nginx

sudo yum install -y nginx

3. 启动

sudo systemctl start nginx.service

4. 查看版本

nginx -v

5. 查看nginx安装目录

ps  -ef | grep nginx

6. 检查配置文件

nginx -t

7. 启动

systemctl start nginx.service

8. 停止

systemctl stop nginx.service

9. 重启

systemctl restart nginx.service

10. 设置开机自启动

systemctl enable nginx.service

11. 停止开机自启动

systemctl disable nginx.service

12. 查看当前状态

systemctl status nginx.service

13. 查看所有已启动的服务

systemctl list-units --type=service

Tags:

本文暂时没有评论,来添加一个吧(●'◡'●)

欢迎 发表评论:

最近发表
标签列表