CentOS 6.3服务器环境的安装简略的步骤;备忘。可以写一个脚本,这对安装多台服务器是非常有必要的。省时省力。
1、更新epel源
- #rpm -Uvh http://dl.Fedoraproject.org/pub/epel/6/x86_64/epel-release-6-7.noarch.rpm
- #rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
- #yum install yum-priorities
- #yum update
- #yum upgrade
2、关闭selinux
修改/etc/selinux/config
将SELINUX=enforcing修改为SELINUX=disabled
#setenforce 0
3、修改ssh配置
修改/etc/ssh/sshd_config
禁用root用户登录: #PermitRootLogin yes修改为PermitRootLogin no
加快ssh登录:#UseDNS yes 修改为UseDNS no
重启:service sshd restart
iptables 2233端口开启
#service iptables restart
4、修改系统时间
- #yum -y install ntp
- #ntpdate ntp.fudan.edu.cn
- #cp -f /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
5、基础服务
#yum install wget gcc gcc-c++ make openssl-devel openssh-clients
Nginx一般是配置了2个附加模块的:pcre和ngx_cache_purge,前者用来支持正则表达式解析,后者用来支持缓存动态请求。pcre需要先安装
6、安装pcre
- wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.31.tar.gz
- #tar -zxvf pcre-8.31.tar.gz
- #cd pcre-8.31
- #./configure --prefix=/usr/local/pcre-8.31
- #make && make install
