美文网首页Java
CentOS通过yum安装Nginx

CentOS通过yum安装Nginx

作者: ChangLau | 来源:发表于2018-09-30 13:24 被阅读7次

    直接通过命令安装

    yum -y install nginx
    

    启动 nginx 服务

    ➜  ~ service nginx start
    Starting nginx:                                             [  OK  ]
    

    停止 nginx 服务

    ➜  ~ service nginx stop 
    Stopping nginx:                                            [  OK  ]
    

    重启 nginx 服务

    ➜  ~ service nginx restart
    Stopping nginx:                                            [  OK  ]
    Starting nginx:                                            [  OK  ]
    

    Nginx默认目录

    输入命令:
    
    whereis nginx
    

    nginx.conf

    /etc/nginx/conf.d/default.conf
    

    相关文章

      网友评论

        本文标题:CentOS通过yum安装Nginx

        本文链接:https://www.haomeiwen.com/subject/fdlwoftx.html