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:

  • 相关阅读:
    ubuntu下安装配置apache2(含虚拟主机配置)
    ubuntu安装软件包apt-get和dpkg方法
    python日期,时间函数
    python多线程
    截取utf8中文字符串
    python解析json
    sqlite读写
    lambda,map,filter,reduce
    pyinstaller生成exe可执行程序
    对象练习
  • 原文地址:https://www.cnblogs.com/mysic/p/5958733.html
Copyright © 2011-2022 走看看