yum更新
#yum grouplist #yum groupinstall " "
#yum upgrade # yum update
yum -y update升级所有包,改变软件设置和系统设置,系统版本内核都升级
yum -y upgrade升级所有包,不改变软件设置和系统设置,系统版本升级,内核不改变
# yum install tree telnet dos2unix sysstat lrzsz -y
# sed -i s#SELINUX=enforcing#SELINUX=disabled#g /etc/selinux/config
# getenforce
# runlevel # vi /etc/inittab #init
#setup #ntsysv
#LANG=EN
# chkconfig --list |grep "3:on"
关闭所有服务#for hequan in `chkconfig --list |grep "3:on" | awk '{print $1}'`;do chkconfig $hequan off;done
crond network rsyslog sshd 4个开机服务
# for hequan in sshd crond network rsyslog;do chkconfig $hequan on;done
# for hequan in `chkconfig --list | grep "3:on" | awk '{print $1}' | grep -vE "crond|network|sshd|rsyslog" `; do chkconfig $hequan off; done
# vi /etc/ssh/sshd_config
# cat /etc/sysconfig/i18n
LANG="zh_CN.UTF-8" # echo 'LANG="zh_CN.UTF-8"' > /etc/sysconfig/i18n
# /usr/sbin/ntpdate time.nist.gov 时间更新
# echo '*/5 * * * * /usr/sbin/ntpdate time.nist.gov > /dev/null 2>&1' >>/var/spool/cron/root
# crontab -l
# ulimit -n
# echo ‘'* - nofile 65535 ' >> /etc/security/limits.conf
# vi /etc/sysctl.conf 优化内核
# cat /etc/issue 开机登陆界面
# chattr +i /etc/passwd
# lsattr /etc/passwd
# vi /etc/motd
登陆显示