CentOS7 虚拟机 基础配置
一、配置 yum 镜像
1.1 备份
cd /etc/yum.repos.d/
mkdir ./repo_bak
mv *.repo repo_bak
1.2 下载 阿里云镜像
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
1.3 生成缓存
yum clean all
yum makecache
1.4 安装 eper 源
yum list | grep epel-release
yum -y install epel-release.noarch
1.5 重新生成缓存
yum clean all
yum makecache
1.6 查看仓库
yum repolist enabled
yum repolist all
二、安装常用工具
2.1 安装 net-tools
yum -y install net-tools.x86_64
2.2 安装 wget
yum -y install wget
2.3 安装 vim
yum -y install vim
2.4 安装 gcc
yum -y install gcc
三、关闭防火墙和 selinux
3.1 关闭防火墙
systemctl stop firewalld
systemctl status firewalld
systemctl disable firewalld
3.2 关闭 selinux
vim /etc/selinux/config
SELINUX=enforcing -> SELINUX=disabled