CentOS7环境——yum安装nginx

目录

1.修改yum源为阿里云

2.下载wget

3.下载阿里云的 CentOS-Base.repo 到/etc/yum.repos.d/

4.清空原本yum缓存

5.生成新的阿里云的yum缓存,加速下载预热数据

6.下载epel-release

7.下载nginx

8.启动并检查nginx状态


1.修改yum源为阿里云

cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo_bak

2.下载wget

yum -y install wget

3.下载阿里云的 CentOS-Base.repo 到/etc/yum.repos.d/

	wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
# 或
	curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

4.清空原本yum缓存

yum clean all

5.生成新的阿里云的yum缓存,加速下载预热数据

yum makecache

6.下载epel-release

yum install epel-release -y

7.下载nginx

yum -y install nginx

8.启动并检查nginx状态

systemctl start nginx


systemctl status nginx

相关推荐

  1. CentOS 7 安装 Nginx

    2024-03-20 16:06:07       59 阅读
  2. CentOS 7 安装 Nginx

    2024-03-20 16:06:07       50 阅读
  3. Centos 7 安装Nginx

    2024-03-20 16:06:07       57 阅读
  4. centos7安装nginx

    2024-03-20 16:06:07       44 阅读
  5. centos7 安装 nginx

    2024-03-20 16:06:07       30 阅读
  6. Centos7安装nginx

    2024-03-20 16:06:07       33 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-03-20 16:06:07       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-03-20 16:06:07       101 阅读
  3. 在Django里面运行非项目文件

    2024-03-20 16:06:07       82 阅读
  4. Python语言-面向对象

    2024-03-20 16:06:07       91 阅读

热门阅读

  1. Python实战:机器学习算法

    2024-03-20 16:06:07       36 阅读
  2. Redis RDB持久化与AOF 持久化详解

    2024-03-20 16:06:07       36 阅读
  3. Checked Exception和Unchecked Exception 有什么区别?

    2024-03-20 16:06:07       38 阅读
  4. 69: 偷菜时间表(python)

    2024-03-20 16:06:07       36 阅读
  5. c++学习笔记(8)

    2024-03-20 16:06:07       30 阅读
  6. 动手学深度学习|notebook教程

    2024-03-20 16:06:07       47 阅读
  7. 从零学算法148

    2024-03-20 16:06:07       42 阅读
  8. channel 和 session 简介

    2024-03-20 16:06:07       33 阅读