centos64位-系统优化

#!/bin/bash
#!/bin/sh
#try to optimize my operating system.
#####################################
#get the os bit.
TEST=`uname -i`
#echo $TEST
if [ $TEST != "x86_64" ]
then
echo "_______________________________"
echo "|The platform is not 64-bit os!|"
echo "-------------------------------"
else
echo "            "
fi
#####################################
#get the version
VERSION=`lsb_release -r |awk '{print $2}'`
if [ $VERSION != '6.2' ]
then
echo "*************************"
echo "*this is for version 6.2*"
echo "*************************"
else
echo "      "
fi
cat < /dev/null 2>&1" >> /var/spool/cron/root
service crond restart
#-----/etc/security/limits.conf----
cat<>/etc/security.limits.conf
*    soft     nofile    65535
abc    -    maxlogins    1
root    -    maxlogins    2
EOF
#----stop some server----
chkconfig bluetooth off
chkconfig cups off
chkconfig ip6tables off
sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
cat <
            
点赞