首页 > 系统服务 > 详细

Linux基础操作优化

时间:2016-03-29 15:01:09      阅读:199      评论:0      收藏:0      [点我收藏+]

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

登陆显示


Linux基础操作优化

原文:http://hequan.blog.51cto.com/5701886/1757932

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!