zoukankan      html  css  js  c++  java
  • YUM安装nginx

    centos 7的守护进程、工具和库的管理器是systemd。取代了之前的system v。Systemd的功能是用于集中管理和配置类UNIX系统。

    systemctl 是 systemd的一个工具,主要负责控制systemd系统和服务管理器。

    安装以后,要管理这些服务启动、重启、停止,以及设置开机自启动等,都是通过systemctl来管理。

    使用详情:https://linux.cn/article-5926-1.html#3_782

    [Nginx]

    To add NGINX yum repository, create a file named /etc/yum.repos.d/nginx.repo and paste one of the configurations below:

    [nginx]
    name=nginx repo
    baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
    gpgcheck=0
    enabled=1

    # yum update

    # yum install nginx

    #systemctl start nginx 启动服务

    安装完成后,在浏览器中测试,成功打开欢迎页

    #systemctl is-active nginx 查看服务是否已经启动

    #systemctl is-enabled nginx 查看服务是否设置了开机自启动

    #systemctl enable nginx 设置服务开机自启动

    配置nginx:

  • 相关阅读:
    操作系統3-內存管理(請求分頁內存管理)
    c++对象的内存模式
    操作系統3-內存管理(虛擬存儲器)
    单词统计续
    团队冲刺八
    团队冲刺七
    团队冲刺六
    团队冲刺五
    关于文件读写的各种操作
    单词统计
  • 原文地址:https://www.cnblogs.com/mysic/p/5958733.html
Copyright © 2011-2022 走看看