Skip to content

Latest commit

 

History

History
79 lines (41 loc) · 1.49 KB

CentOS7系统安装及克隆前优化.md

File metadata and controls

79 lines (41 loc) · 1.49 KB

[TOC]

1.CentOS7安装

1568693788103

1568693863199

1568700647232

1568700566463

1568700673248

1568700510844

1568700691647

1568700610855

1568700723953

1568700747635

1568700772990

1568700818804

2.CentOS7安装后克隆虚机前的部分优化

2.1 关闭防火墙和selinux

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 psmisc

2.3 时间同步

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

2.4 关闭图形化网卡管理

不关闭会出现,ip无法出现的问题。

systemctl stop NetworkManager
systemctl disable NetworkManager