• CentOS安装和配置Nginx


    1. 首先Nginx官网找到最新的稳定版本,网站地址:http://nginx.org/en/linux_packages.html#stable

    在/etc/yum.repos.d 下面创建一个文件名:nginx.repo

    [nginx]
    name=nginx repo
    baseurl=http://nginx.org/packages/OS/OSRELEASE/$basearch/ #OS 要替换对应的操作系统版本 如centos7
    gpgcheck=0
    enabled=1

    2. 在线安装nginx

    yum install nginx

    3. 创建服务启动

    systemctl enable nginx.service

    4. 启动nginx

     service nginx start

    5. 查看服务器端口80 是否开启

    netstat -ntlp  #如果端口80 被监听 说明服务已经启动
  • 相关阅读:
    加密
    python数据类型
    json
    xml
    物理层
    计算机网络概述
    js之BOM概述
    消息队列介绍
    linux bond nmcli命令
    linux iostat
  • 原文地址:https://www.cnblogs.com/flyfish2012/p/8662944.html
Copyright © 2020-2023  润新知