qileilove

blog已经转移至github,大家请访问 http://qaseven.github.io/

配置Linux服务10步搞定

 检查基本条件,物理连接,server端、client端都连接了交换机或路由
  1、配置IP地址、DNS等
  # nmtui
  # service network restart        # ifconfig | grep -A1 flags
  # cat /etc/resolv.conf
  2、配置主机名主机名
  立即生效
  # hostname lz.com
  永久生效
  # echo lz.com> /etc/hostname
  配置hosts文件
  # echo 192.168.220.111   lz.com>> /etc/hosts
  查看验证
  # hostname
  # cat /etc/hostname
  # cat /etc/hosts
  3、查看服务包是否安装
  # rpm -q pkg
  4、安装服务包使用rpm或者yum源
  # rpm -ivh /media/Packages/pkg*
  # yum -y install pkg
  5、修改配置文件
  查找配置文件
  # rpm -qc pkg
  修改配置文件
  # vim /path/filename
  6、重启服务
  # service daemon restart
  7、设置开机自动启动
  # chkconfig daemon on
  8、配置防火墙
  # firewall-cmd --permanent --add-service=*
  # firewall-cmd --permanent --add-port=*/[tcp|udp]
  # service firewalld restart        # firewall-cmd --list-services
  9、如果需要调整selinux
  # setenfore 0
  # set -i '/^SELINUX/s/=.*/=permissive/' /etc/selinux/config
  10、测试验证
  a、本地测试
  b、网络测试

posted on 2014-08-13 10:26 顺其自然EVO 阅读(176) 评论(0)  编辑  收藏


只有注册用户登录后才能发表评论。


网站导航:
 
<2014年8月>
272829303112
3456789
10111213141516
17181920212223
24252627282930
31123456

导航

统计

常用链接

留言簿(55)

随笔分类

随笔档案

文章分类

文章档案

搜索

最新评论

阅读排行榜

评论排行榜