CentOS7操作备忘
以下所有操作在CentOS7.9.2009_x64平台上测试有效
换源
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.163.com/.help/CentOS7-Base-163.repo
yum clean all
yum makecache
启用EPEL源
yum -y install epel-release
更新系统
yum -y update
关闭SELinux
vi /etc/selinux/config
SELINUX=disabled
或
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
即时生效
setenforce 0
安装常用工具包
yum -y install yum-utils wget htop unzip screen git vim nano redhat-lsb net-tools curl lsof