手机版
你好,游客 登录 注册
背景:
阅读新闻

CentOS 6.3服务器环境的搭建

[日期:2012-12-15] 来源:Linux社区  作者:zgssheng [字体:大 中 小]

CentOS 6.3服务器环境的安装简略的步骤;备忘。可以写一个脚本,这对安装多台服务器是非常有必要的。省时省力。
 
1、更新epel源

  1. #rpm -Uvh http://dl.Fedoraproject.org/pub/epel/6/x86_64/epel-release-6-7.noarch.rpm
  2. #rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
  3. #yum install yum-priorities
  4. #yum update
  5. #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、修改系统时间

  1. #yum -y install ntp
  2. #ntpdate ntp.fudan.edu.cn
  3. #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

  1. wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.31.tar.gz
  2. #tar -zxvf pcre-8.31.tar.gz
  3. #cd pcre-8.31
  4. #./configure --prefix=/usr/local/pcre-8.31
  5. #make && make install
linux
相关资讯       CentOS  CentOS服务器配置  CentOS服务器 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款