• CentOS安装Nginx


    利用yum 命令, 可以简化Nginx的安装

    本来可以一句:

    yum install nginx --installroot=/usr/local/nginx 

    很遗憾报错了

    1 YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
    2  Eg. $releasever is not a valid and current release or hasnt been released yet/
    3 removing mirrorlist with no valid mirrors: /usr/local/nginx/var/cache/yum/x86_64/$releasever/base/mirrorlist.txt
    4 错误:Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again

    看了官方, 是这么说的

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

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

    [nginx]
    name=nginx repo
    baseurl=http://nginx.org/packages/mainline/OS/OSRELEASE/$basearch/
    gpgcheck=0
    enabled=1 
  • 相关阅读:
    企业级 SpringBoot 教程 (九)springboot整合Redis
    03 网格系统
    02 表单
    01 排版
    客户端调用webSerices
    sql 一行转多行
    sql 多行转一行
    时间差计算 Stopwatch
    sql 游标
    Linq连接查询
  • 原文地址:https://www.cnblogs.com/vivid-stanley/p/5277661.html
Copyright © 2020-2023  润新知