How To : Pre-Provision CentOS 7

  Linux

Here is the list of the steps that need to be done after the CentOS 7 with minimal ISO installation. Please make sure, the server able to go to internet, as we need to update all libraries or modules to the latest version.

yum clean all
yum erase NetworkManager firewalld -y
yum install perl wget screen net-tools bind-utils ntpdate vim psmisc deltarpm -y
perl -pi -e "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config
setenforce 0

cp /etc/ssh/sshd_config /etc/ssh/sshd_config.tmp
echo "" >> /etc/ssh/sshd_config
echo "Protocol 2" >> /etc/ssh/sshd_config
echo "" >> /etc/ssh/sshd_config
echo "Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,arcfour" >> /etc/ssh/sshd_config
echo "MACs hmac-sha1,hmac-ripemd160" >> /etc/ssh/sshd_config
echo "" >> /etc/ssh/sshd_config
systemctl restart sshd

ntpdate time.google.com
(crontab -l; echo "15 00 * * * /sbin/ntpdate time.google.com > /dev/null 2>&1") | crontab -
mv /etc/localtime /etc/localtime.old
ln -s /usr/share/zoneinfo/Asia/Kuala_Lumpur /etc/localtime

screen
yum groupinstall 'development tools' -y; yum update -y; reboot