虚拟机最小安装及克隆

虚拟机最小安装及克隆

1.CENTOS7安装

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

** 2.Centos7安装克隆虚拟机前的部分优化**
2.1 关闭防火墙和selinux

	```powershell
	systemctl   stop   firewalld.service
	systemctl   disable firewalld.service
	
	setenforce 0
	sed -i  '/^SELINUX/s#enforcing#disabled#g' /etc/selinux/config
	```

2.2 修改yum源为阿里云

yum install -y wget 
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
yum clean all
yum makecache

yum -y install gcc gcc-c++  cmake curl  nmap  lrzsz unzip zip ntpdate telnet vim tree bash-completion iptables-services ntp dos2unix lsof net-tools sysstat

2.3时间同步
echo “*/5 * * * * /usr/sbin/ntpdate ntp1.aliyun.com >/dev/null 2>&1”>>/var/spool/cron/root
/usr/sbin/ntpdate ntp1.aliyun.com

echo "*/5 * * * * /usr/sbin/ntpdate ntp1.aliyun.com >/dev/null 2>&1">>/var/spool/cron/root
/usr/sbin/ntpdate ntp1.aliyun.com

2.4关闭图形化网卡管理

systemctl stop NetworkManager
systemctl disable NetworkManager

3.克隆虚拟机
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

发布了9 篇原创文章 · 获赞 2 · 访问量 115

猜你喜欢

转载自blog.csdn.net/qq_45103767/article/details/105586047