[[email protected] oldboy]# for oldboy in `chkconfig --list |grep "3:on" |awk ‘{print $1}‘ |grep -vE "crond|network|sshd|rsyslog"`;do chkconfig $oldboy off;done
[[email protected] oldboy]# chkconfig --list |grep "3:on"
crond 0:off 1:off 2:on 3:on 4:on 5:on 6:off
network 0:off 1:off 2:on 3:on 4:on 5:on 6:off
rsyslog 0:off 1:off 2:on 3:on 4:on 5:on 6:off
sshd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
这个思想是把打开的服务都找出来,把需要的排除外,然后其他的都关闭掉
在oldboy目录下创建一个oldboy命令,然后加入到系统环境中才可以执行
[[email protected] /]# chmod +x /oldboy/oldboy
[[email protected] /]# echo ‘PATH="/oldboy/:$PATH"‘ >>/etc/profile
[[email protected] /]# source /etc/profile
root用户全局生效/etc/profile
普通用户生效~/.bash_profile或者~/.bashrc
Linux中文设置
[[email protected] ~]# cat /etc/sysconfig/i18n
LANG="zh_CN.GB18030"
Linux系统时间同步
[[email protected] oldboy]# /usr/sbin/ntpdate time.nist.gov
文件描述符加大进程运行的空间,不然空间小了有的进程起不来
查看大小[[email protected] oldboy]# ulimit -n
[email protected] oldboy]# vi /etc/security/limits.conf
在后面加上* - nofile 65535
[[email protected] oldboy]# source /etc/security/limits.conf
然后退出重新登录就可以了