首页 > Linux系统 > system > centos64位-系统优化
2014
05-29

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 <
 
 										                        
                        						                        
最后编辑:
作者:admin
捐 赠如果您觉得这篇文章有用处,请支持作者!鼓励作者写出更好更多的文章!

留下一个回复