zoukankan      html  css  js  c++  java
  • linux安装nginx(两种方式)

    第一:yum 方式安装

      1:参考http://nginx.org/en/linux_packages.html#stable    

      2:根据自己的系统类型进行更改

      Pre-Built Packages for Stable version
      To set up the yum repository for RHEL/CentOS, create the file named /etc/yum.repos.d/nginx.repo with the following contents:

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


      Replace “OS” with “rhel” or “centos”, depending on the distribution used, and “OSRELEASE” with “6” or “7”, for 6.x or 7.x versions, respectively.

      3:    查看 yum list | grep  nginx

        安装  yum install  nginx

      4: nginx -v 查看版本

         查看安装路径

       rpm -ql nginx

       得到安装路径后

      5:最后启动nginx /usr/sbin/nginx

      6:重启服务可以 使用

      systemctl restart nginx   或者  systemctl reload nginx

    以上就结束安装了,

    如有错误,请邮件zs253499660@sina.com,如有更好的方法,可以推荐
  • 相关阅读:
    关于BlockingQueue
    关于java的线程
    mongodb的锁和高并发
    innodb的锁和高并发
    mysql的事务隔离级别及其使用场景
    mongodb分页
    ReentrantLock和Synchronized
    spring boot MVC
    svn 入门
    多线程的返回值等问题
  • 原文地址:https://www.cnblogs.com/senjiang/p/9686965.html
Copyright © 2011-2022 走看看