cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.159.152 testdb.itcast.cc testdb
10.1.1.1 testdb.itcast.cc testdb
注意:
前两行内容不要动!!!
补充:
1. 关闭防火墙
临时关闭:
service iptables stop
开机不要自启动:
chkconfig iptables off
# chkconfig --list|grep iptables 查看是否关闭
iptables 0:off 1:off 2:off 3:off 4:off 5:off 6:off
2. 关闭selinux
三种模式:
enforcing:强制模式
permissive:警告模式
disabled:关闭
临时放到警告模式:
setenforce 0
查看状态:
getenforce
Permissive
永久关闭:
[root@MissHou ~]# 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 - No SELinux policy is loaded.
SELINUX=disabled 改为disabled
...
注意:关闭需要重启系统才生效
6.8关闭防火墙selinux
最新推荐文章于 2024-04-10 09:41:39 发布