更改yum源
mv -f /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
安装基本服务
yum install -y net-snmp ntp openssh-clients gcc gcc-c++ openssl-devel vim lrzsz unzip rsync
关闭selinux
sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
cat /etc/selinux/config|grep SELINUX=disabled
setenforce 0
getenforce
关闭centos7防火墙
systemctl stop firewalld.service
systemctl enable firewalld
时间同步
echo '* 0 * * * /usr/sbin/ntpdate cn.pool.ntp.org' &>/dev/null >>/var/spool/cron/root
crontab -l
提高linux内核打开文件数量
echo '* soft nofile 65535
* hard nofile 65535
* soft nproc 65535
* hard nproc 65535' >>/etc/security/limits.conf