centos6 64位服务器的基本初始化

#添加epel源

rpm -Uvh http://mirrors.sohu.com/fedora-epel/6/x86_64/epel-release-6-8.noarch.rpm

rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6


#添加rpmforge源

yum install wget -y

cd /usr/local/src

wget http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm

rpm -Uvh rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm


rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag



# 添加多线程下载工具(可选)

yum install axel -y

cd /etc/yum/pluginconf.d/

wget http://cnfreesoft.googlecode.com/svn/trunk/axelget/axelget.conf

cd /usr/lib/yum-plugins/

wget http://cnfreesoft.googlecode.com/svn/trunk/axelget/axelget.py



#将Base源指向到163

cd /etc/yum.repos.d

wget http://mirrors.163.com/.help/CentOS6-Base-163.repo

sed -i -e 's#$releasever#6.4#' CentOS6-Base-163.repo


\mv CentOS6-Base-163.repo CentOS-Base.repo

yum clean all

yum makecache


yum upgrade -y


#禁用selinux

#disable SELinux

sed -i -e 's/SELINUX=enforcing/SELINUX=disabled/' /etc/sysconfig/selinux


#安装工具软件

yum install ntp vim-enhanced vixie-cron mlocate -y

yum install tree lrzsz -y

yum install man man-pages sudo -y



#设定时区

\cp -f /usr/share/zoneinfo/Asia/Shanghai /etc/localtime


#和日本源同步

ntpdate jp.pool.ntp.org



下面开始安装依赖库

#安装开发工具包

yum groupinstall "Development Tools" -y


#安装其它库

yum install ncurses ncurses-devel libtool* zlib-devel -y


yum install libxml2-devel libjpeg-devel libpng-devel libtiff-devel fontconfig-devel freetype-devel -y

yum install libXpm-devel gettext-devel -y


yum install curl curl-devel pam-devel e2fsprogs-devel krb5-devel -y

yum install libidn libidn-devel -y

yum install openssl openssl-devel -y



#下面这个可选。如果是安装php的话,最好选上。

#yum install mcrypt libmcrypt libmcrypt-devel mhash mhash-devel -y


你可能感兴趣的:(centos6,初始化,EPEL)