sed -i “s/#UseDNS yes/UseDNS no/” /etc/ssh/sshd_config
sed -i -e ‘44 s/^/#/’ -i -e ‘48 s/^/#/’ /etc/ssh/sshd_config
/etc/init.d/sshd restart
#停止 the “beep”
cp /etc/inputrc /etc/inputrc.save
sed -i ‘/#set bell-style none/s/#set bell-style none/set bell-style none/’ /etc/inputrc
#关闭SElinux
cp /etc/sysconfig/selinux /etc/sysconfig/selinux.save
sed -i ‘/SELINUX=enforcing/s/SELINUX=enforcing/SELINUX=disabled/’ /etc/sysconfig/selinux
#加载光驱
mkdir /mnt/cdrom
mount /dev/cdrom /mnt/cdrom
echo “mount /dev/cdrom /mnt/cdrom” >> /etc/rc.local
#设置yum使用本地光盘
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.save
mv /etc/yum.repos.d/CentOS-Media.repo /etc/yum.repos.d/CentOS-Media.repo.save
相关文章
热门资讯