更新国内镜像源
国内速度较快的常用更新源如下:
[root@greymouster ~]# cd /etc/yum.repos.d/ [root@greymouster yum.repos.d]# ll total 16 -rw-r--r--. 1 root root 1926 Nov 27 2013 CentOS-Base.repo -rw-r--r--. 1 root root 638 Nov 27 2013 CentOS-Debuginfo.repo -rw-r--r--. 1 root root 630 Nov 27 2013 CentOS-Media.repo -rw-r--r--. 1 root root 3664 Nov 27 2013 CentOS-Vault.repo [root@greymouster yum.repos.d]# cp CentOS-Base.repo CentOS-Base.repo.ori [root@greymouster yum.repos.d]# wget http://mirrors.163.com/.help/CentOS6-Base-163.repo [root@greymouster yum.repos.d]# cp CentOS6-Base-163.repo CentOS-Base.repo
安装必要的软件包
yum install tree telnet dos2unix sysstat lrzsz -y
yumupdate 把系统的更新到最新
yumgrouplist 查看系统都安装了那些安装包
安装后的基本调优及安全设置
1.关闭selinux
2.设定runlevel为3
[root@greymouster ~]# grep 3:initdefault /etc/inittab id:3:initdefault: [root@greymouster ~]# init 3
3.精简开机系统启动的服务为:
[root@greymouster ~]# LANG=en [root@greymouster ~]# chkconfig --list|grep "3:on" [root@greymouster ~]# for test in `chkconfig --list|grep "3:on"|awk ‘{print $1}‘`;do chkconfig $test off;done [root@greymouster ~]# for test in crond network rsyslog sshd;do chkconfig $test on;done [root@greymouster ~]# chkconfig --list|grep "3:on"
或者
[root@greymouster ~]# for test in `chkconfig --list|grep "3:on"|awk ‘{print $1}‘|grep -vE"crond|network|rsyslog|sshd"`;do chkconfig $test off;done
原文:http://www.cnblogs.com/chenchenphp/p/6616792.html