Chinaunix首页 | 论坛 | 博客
  • 博客访问: 83614
  • 博文数量: 21
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 270
  • 用 户 组: 普通用户
  • 注册时间: 2014-09-02 20:27
文章分类

全部博文(21)

文章存档

2020年(8)

2016年(6)

2014年(7)

我的朋友

分类: LINUX

2014-09-28 21:37:01

安装好一个linux系统之后我们需要做的几个步骤:
1、设置主机名
[root@desktop ~]# vi /etc/sysconfig/network
NETWORKING=yes                        // 允许使用IPv4网络
NETWORKING_IPV6=no                //不允许使用IPv6网络
HOSTNAME=desktop                    //设置主机名为desktop
2、设置全质量域名(FQDN)
[root@desktop ~]# vi /etc/hosts            //通过设置全质量域名,可以实现
域名与IP地址的解析,省略了用DNS解析IP地址的步骤
                                                                    在windows中可以修改/c/windows/system32/drivers/etc/host
172.16.16.11 desktop.apple.com desktop //我们可以使用域名直接访问此主机,远程登录时候可以直接使用主机名登录
3、查看防火墙规则,关闭网络防火墙
[root@desktop ~]# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination


Chain FORWARD (policy ACCEPT)
target     prot opt source               destination


Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

之后可以使用命令清除规则
[root@desktop ~]# iptable -F        //清除普通防火墙规则
[root@desktop ~]# iptable -X        //清除系统自带防火墙规则
[root@desktop ~]# service iptable
save   //保存防火墙规则
4、清除selinux防火墙
[root@desktop ~]# sestatus
SELinux status:                 enforcing         selinux存在,级别较高
[root@desktop ~]# vi /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#       enforcing - SELinux security policy is enforced.
#       permissive - SELinux prints warnings instead of enforcing.
#       disabled - SELinux is fully disabled.
SELINUX=enforcing                  // 可以修改为disabled状态,选择disabled
# SELINUXTYPE= type of policy in use. Possible values are:
#       targeted - Only targeted network daemons are protected.
#       strict - Full SELinux protection.
SELINUXTYPE=targeted
----------------------------------------------



阅读(1375) | 评论(0) | 转发(0) |
0

上一篇:linux学习(四)

下一篇:linux学习(八)

给主人留下些什么吧!~~