Always keep a beg|

Dusk_Yun

园龄:6个月粉丝:0关注:0

📂Nginx
🔖Nginx
2024-08-19 23:10阅读: 24评论: 0推荐: 0

二进制下载部署Nginx

一、通过Nginx官网并采取二进制方式部署

Nginx官网

二、具体步骤

image
image
image
image
image
image

[root@web01 yum.repos.d]# ll -d nginx.repo
-rw-r--r--. 1 root root 398 Aug 17 22:01 nginx.repo
[root@web01 yum.repos.d]# pwd
/etc/yum.repos.d

  • 接下来可以直接使用 yum -y install nginx 则是直接从官方下载的nginx

三、安装步骤

第一步: 安装nginx服务
[root@web01 ~]# yum -y install nginx

第二步: 配置Nginx

第三步: 启动Nginx加入开机自动运行
[root@web01 ~]# systemctl start nginx
[root@web01 ~]# systemctl enable nginx

查看Nginx服务状态:
[root@web01 ~]# systemctl status nginx
[root@web01 ~]# netstat -tnulp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      20116/nginx: master 

过滤进程的方式查看nginx是否运行
[root@web01 ~]# ps axu|grep nginx
root      20116  0.0  0.1  49072  1004 ?        Ss   16:03   0:00 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
nginx     20117  0.0  0.1  49460  1896 ?        S    16:03   0:00 nginx: worker process

最后一步: 打开浏览器测试10.0.0.7

如果中途报错可以在 [root@web01 ~]# tailf /var/log/nginx/error.log 该文件中查看错误日志详细

本文作者:Dusk_Yun

本文链接:https://www.cnblogs.com/9Dusk/p/18368328

版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 2.5 中国大陆许可协议进行许可。

posted @   Dusk_Yun  阅读(24)  评论(0编辑  收藏  举报
点击右上角即可分享
微信分享提示
评论
收藏
关注
推荐
深色
回顶
收起