zoukankan      html  css  js  c++  java
  • 在CentOS 7中安装nginx服务器

    简要地介绍一下,如何在CentOS 7中安装nginx服务器

    1.  下载对应当前系统版本的nginx包(package)

      # wget  http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm

    2.  建立nginx的yum仓库

      # rpm -ivh nginx-release-centos-7-0.el7.ngx.noarch.rpm

    3.  下载并安装nginx

      # yum install nginx

    4.  启动nginx服务

      systemctl start nginx

    5.  配置

      默认的配置文件在 /etc/nginx 路径下,使用该配置已经可以正确地运行nginx;如需要自定义,修改其下的 nginx.conf 等文件即可。

    6. 测试

      在浏览器地址栏中输入部署nginx环境的机器的IP,如果一切正常,应该能看到如下字样的内容。

      Welcome to nginx!

      If you see this page, the nginx web server is successfully installed and working. Further configuration is required.

      For online documentation and support please refer to nginx.org.
      Commercial support is available at nginx.com.

      Thank you for using nginx.

  • 相关阅读:
    Handler使用入门 下载文件
    基于QT前端的mplayer播放器2
    HTTP协议详解(真的很经典)
    安装 gentoo minimal cd
    linux 分区方案
    MFC 中添加按钮和事件
    makefile 学习
    堆和栈
    paste命令使用
    cut用法
  • 原文地址:https://www.cnblogs.com/lixiaoran/p/5574339.html
Copyright © 2011-2022 走看看