更改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