虚拟机优化

虚拟机优化

# 1.修改yum源 阿里云镜像站:https://developer.aliyun.com/mirror/
[root@zls ~]# cd /etc/yum.repos.d/
[root@zls yum.repos.d]# rm -f /etc/yum.repos.d/*
# BASE源:CentOS所有基础包的源
CentOS 7
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
# EPEL源:CentOS扩展包的源
epel(RHEL 7)
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo

# 2.安装基础包
[root@zls ~]# yum install -y vim net-tools wget lrzsz
# 3.关闭防火墙
[root@zls zls]# systemctl stop firewalld
# 4.关闭selinux(临时)
[root@zls zls]# setenforce 0
# 5.关闭selinux(永久)
[root@zls zls]# vim /etc/sysconfig/selinux
SELINUX=enforcing
改成
SELINUX=disabled
[root@zls zls]# sed -i 's#SELINUX=enforcing#SELINUX=disabled#g'
/etc/sysconfig/selinux
posted @ 2020-06-10 20:56  nick_xm  阅读(127)  评论(0编辑  收藏  举报