1. 程式人生 > 其它 >虛擬機器安裝CentOS7個人習慣配置

虛擬機器安裝CentOS7個人習慣配置

換源

阿里雲

官網:https://developer.aliyun.com/mirror/centos?spm=a2c6h.13651102.0.0.3e221b11OwiJRQ

具體步驟:

# 安裝wget
yum install wget -y
# 備份
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
# 下載新的 CentOS-Base.repo 到 /etc/yum.repos.d/
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
# 執行 yum makecache 生成快取
yum makecache

配置EPEL

阿里雲

官網:https://developer.aliyun.com/mirror/epel?spm=a2c6h.13651102.0.0.3e221b11OwiJRQ

具體步驟:

# 備份(如有配置其他epel源)
mv /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel.repo.backup
mv /etc/yum.repos.d/epel-testing.repo /etc/yum.repos.d/epel-testing.repo.backup
# 下載新repo 到/etc/yum.repos.d/ 
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
# 安裝sl來測試
yum install sl -y
sl

安裝vim

# 安裝vim
yum install vim -y

關閉Selinux

vim /etc/selinux/config 
# 把7行 SELINUX=enforcing    改:SELINUX=disabled
# 重啟系統
reboot

安裝lrzsz

yum install lrzsz -y