详解CentOS7系统初始化设置


当前第2页 返回上一页

https://opsx.alibaba.com/mirror

4.1 备份

备份所有

1

2

# mkdir /etc/yum.repos.d/bak

# mv /etc/yum.repos.d/* /etc/yum.repos.d/bak

或者只备份 CentOS-Base.repo 文件

1

# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

4.2 下载新的CentOS-Base.repo 到/etc/yum.repos.d/

CentOS 5

1

2

3

# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo

或者

# curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo

CentOS 6

1

2

3

# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo

或者

# curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo

CentOS 7

1

2

3

# 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.3 配置epel源

1

2

3

4

5

6

7

8

epel(RHEL 7)

    wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo

 

epel(RHEL 6)

    wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo

 

epel(RHEL 5)

    wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-5.repo

4.4 运行yum makecache生成缓存

1

2

3

# yum clean all

# yum makecache

# yum repolist


5. 基本软件工具安装

通过配置好的YUM库安装常用软件和工具

1

2

3

# yum install -y vim

# yum install -y wget

# yum install -y lrzsz

最小化安装没有ifconfig命令解决方法

1

2

3

# yum search ifconfig

# yum install -y net-tools

# yum provides ifconfig

命令粘贴

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

nmtui

 

systemctl stop firewalld.service

systemctl disable firewalld.service

 

setenforce 0

vi /etc/selinux/config

SELINUX=disable

 

mkdir /etc/yum.repos.d/bak

mv /etc/yum.repos.d/* /etc/yum.repos.d/bak

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

curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo

 

yum clean all

yum makecache

yum repolist

 

yum install -y vim

yum install -y wget

yum install -y lrzsz

yum install -y net-tools

更多编程相关知识,请访问:编程教学!!

以上就是详解CentOS7系统初始化设置的详细内容,更多文章请关注木庄网络博客

返回前面的内容

相关阅读 >>

怎么退出CentOS

CentOS 7 for arm 安装一键lnmp失败

CentOS如何安装flash插件

怎么下载CentOS镜像

CentOS无法连接xshell怎么办

CentOS7怎么开启vnc服务

CentOS的文件查看及编辑详解

CentOS系统怎么安装桌面环境

CentOS下端口无法访问怎么办

CentOS系统连接不上mysql客户端

更多相关阅读请进入《CentOS》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...