red hat7在虚拟机上安装关闭防火墙 配置IP地址 关闭selinux
2015-04-13 13:21
134 查看
虚拟机平台 vm10
ip地址的配置
cd /etc/sysconfig/nework-scripts/
存放网卡的文件与red hat6不一样
redhat6 ifcfg-eth0
redhat7 ifcfg-eno16777736
进入文件修改其参数配置为
TYPE=Ethernet
INBOOT=yes
IPADDR=172.16.8.123
PREFIX=16
保存退出
ifdown ifcfg-eno16777736
ifup ifcfg-eno16777736
ip a
禁用防火墙
在red hat7中防火墙作为一个内核模块,每次一开机就会自动打开,所以写一个脚本文件,在每次一开机时,运行脚本,禁用防火墙
#!/bin/bash
#comment
for i in filter ant mangle raw security; do
iptables -t $i -F
iptables -t $i -X
done;
保存脚本, bash fw.sh运行该脚本
使用iptables -t filter -nL查看防火墙信息
selinux的禁用
vi /etc/selinux/config
将SELINUX=enforcing该为SELINUX=disabled
保存退出,使用reboot重启后,用命令sestatus查看selinux的状态
ip地址的配置
cd /etc/sysconfig/nework-scripts/
存放网卡的文件与red hat6不一样
redhat6 ifcfg-eth0
redhat7 ifcfg-eno16777736
进入文件修改其参数配置为
TYPE=Ethernet
INBOOT=yes
IPADDR=172.16.8.123
PREFIX=16
保存退出
ifdown ifcfg-eno16777736
ifup ifcfg-eno16777736
ip a
禁用防火墙
在red hat7中防火墙作为一个内核模块,每次一开机就会自动打开,所以写一个脚本文件,在每次一开机时,运行脚本,禁用防火墙
#!/bin/bash
#comment
for i in filter ant mangle raw security; do
iptables -t $i -F
iptables -t $i -X
done;
保存脚本, bash fw.sh运行该脚本
使用iptables -t filter -nL查看防火墙信息
selinux的禁用
vi /etc/selinux/config
将SELINUX=enforcing该为SELINUX=disabled
保存退出,使用reboot重启后,用命令sestatus查看selinux的状态
相关文章推荐
- 虚拟机分出的服务器安装oracle11gr2后,远程访问tnsping不通(防火墙已关闭)。
- Linux FTP 服务器配置简单说明【从防火墙关闭到关闭selinux-sestatus到配置ftp用户访问的数据目录再到添加一个ftp用户】
- Rhel7.2的网络配置,防火墙、SELinux服务关闭及YUM源配置
- rhel5.5安装vsftpd并配置虚拟用户及开放防火墙和selinux
- linux配置免密码登录———— linux服务器可以ping通,但是访问不了--Ip地址:端口--关闭防火墙
- linux,Centos 6.3 yum安装Nginx+php+Mysql,配置防火墙,开启,关闭端口命令
- CentOS 7 配置NTP、关闭防火墙、关闭selinux
- Centos7安装和配置FTP(以及用户的创建,selinux的设置,防火墙设置)
- centos7 关闭firewall安装iptables并配置防火墙
- centos7.x 防火墙配置:关闭firewall 安装iptables
- centos下面配置lamp,如果安装apache完成后,访问ip不出现欢迎页,把防火墙关闭即可
- RHEL7安装、ip修改、关防火墙、关selinux、配置yum源
- Centos7 配置固定IP与关闭防火墙--关闭SELinux
- Centos7基础环境配置(为普通用户添加root权限/更换yum源/关闭防火墙/系统SELinux设置)
- Rhel7.2的网络配置,防火墙、SELinux服务关闭及YUM源配置
- hadoop学习;安装jdk,workstation虚拟机v2v迁移;虚拟机之间和跨物理机之间ping网络通信;virtualbox的centos中关闭防火墙和检查服务启动
- hadoop安装和维护04--NTP服务器,SELinux,防火墙配置
- centos7 关闭firewall安装iptables并配置,关闭SELINUX
- rhel7的基本操作(查看IP配置,关闭防火墙,临时或永久关闭selinux,常用命 16ca 令操作)
- 虚拟机安装后配置IP地址