Centos 7 設置使用阿里雲鏡像做 yum 源

1、安裝基本工具  wget

[root@localhost ~]# yum install -y wget

2、進入存放 yum 源配置的目錄

[root@localhost ~]# cd /etc/yum.repos.d/

3、創建目錄,用來存放系統自帶的 yum 源配置文件

[root@localhost yum.repos.d]# mkdir backup

4、對系統初始默認源配置文件進行備份

[root@localhost yum.repos.d]# mv C* backup/

5、下載阿里雲yum源

[root@localhost yum.repos.d]# wget -O /etc/yum.repos.d/CenOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo

6、清除舊緩存

[root@localhost ~]# yum clean all
Loaded plugins: fastestmirror
Cleaning repos: base extras updates
Cleaning up list of fastest mirrors

7、創建新緩存

[root@localhost ~]# yum makecache

8、安裝必要的軟件包

[root@localhost ~]# yum -y install vim tree nmap sysstat gcc gcc-c++ make telnet

 

至此,Centos 7  設置使用阿里雲鏡像做 yum 源完畢!

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章