你好,游客 登录 注册 搜索
背景:
阅读新闻

CentOS服务器部署流程

[日期:2016-08-13] 来源:Linux社区  作者:wangzan18 [字体: ]

我所有的服务器基本都是最小化安装,版本为CentOS 6.x  64位系列。

 1、配置内网IP    (如果是外网IP,linux要修改远程端口)

 2、配置自己的yum源     

1
2
3
4
yum install wget
rm -f /etc/yum.repos.d/CentOS-Base.repo
wget http://mirrors.163.com/.help/CentOS6-Base-163.repo -O /etc/yum.repo.d/
wget -P /etc/yum.repos.d/ http://mirrors.aliyun.com/repo/epel-6.repo

 或者

1
2
curl http://mirrors.163.com/.help/CentOS6-Base-163.repo >/etc/yum.repos.d/comratings.repo
curl http://mirrors.aliyun.com/repo/epel-6.repo > /etc/yum.repos.d/epel-6.repo

 3、关闭SELinux      

1
2
sed -i 's#SELINUX=enforcing#SELINUX=disabled#g' /etc/selinux/config
setenforce 0

 4、添加zabbix监控

 5、配置防火墙

 

1
2
3
service iptables stop
iptables -L
service iptables save

 6、安装软件包 

1
yum install -y vim openssh-clients ntpdate man lrzsz

 

 7、配置定时任务

1
echo "10 6 * * * root (/usr/sbin/ntpdate time.nist.gov && /sbin/hwclock -w) &> /dev/null" >> /etc/crontab

 8、配置主机名

 9、修改文件句柄数  

1
2
3
4
5
6
#临时修改,立刻生效
ulimit -n 65535         
  
#永久修改
echo "* soft nofile 65536" >> /etc/security/limits.conf
echo "* hard nofile 65536" >> /etc/security/limits.conf

 10、可以禁用ipv6    

1
2
3
4
cat >> /etc/modprobe.d/ipv6.conf <<EOF
alias net-pf-10 off
alias ipv6 off
EOF

更多CentOS相关信息见CentOS 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=14

本文永久更新链接地址http://www.linuxidc.com/Linux/2016-08/134226.htm

linux
相关资讯       CentOS服务器 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

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