CentOS7.6配置ip

1、查看CentOS版本信息

[root@localhost ~]# cat /etc/redhat-release
CentOS Linux release 7.6. (Core)

2、配置ip

[root@localhost ~]# cd /etc/sysconfig/network-scripts/
[root@localhost network-scripts]# vi ifcfg-ens160
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=ens160
UUID=c7e9416b-47bf--95a0-96038e78fe40
DEVICE=ens160
ONBOOT=yes
IPADDR=172.16.4.243
NETMASK=255.255.252.0
GATEWAY=172.16.7.254

3、 关闭firewalld防火墙

查看防火墙状态
systemctl status firewalld.service
关闭防火墙
systemctl stop firewalld.service
打开防火墙
systemctl start firewalld.service

4、关闭selinux

vi /etc/sysconfig/selinux

#将SELINUX修改为disabled

[root@localhost ~]# vi /etc/sysconfig/selinux

# 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
 # SELINUXTYPE= can take one of three values: # targeted - Targeted processes are protected, # minimum - Modification of targeted policy. Only selected processes are protected. # mls - Multi Level Security protection. SELINUXTYPE=targeted

立即关闭 setenforce 0

												

CentOS7.6配置ip的更多相关文章

  1. CentOS7虚拟机配置ip地址

    首先安装后的虚拟机选NAT模式配置vm的虚拟网络编辑器(vmware中的编辑),NAT模式中查看DHCP的范围,配置子网(写成和电脑一样),在linux中进入/etc/sysconfig/networ ...

  2. VMware中安装CentOS7网络配置静态IP地址,常用配置和工具安装

    VMware中安装CentOS7网络配置静态IP地址,常用配置和工具安装在阿里云开源镜像地址下载镜像Index of /centos/7.2.1511/isos/x86_64/http://mirro ...

  3. CentOS7安装GNOME可视化界面和如何配置IP地址

    本人在虚拟机安装 CentOS7 1,检查一下我们已经安装的软件以及可以安装的软件,用命令 yum grouplist 2,然后安装我们需要的图形界面软件,GNOME(GNOME Desktop) 这 ...

  4. centos7配置IP地址

    有关于centos7获取IP地址的方法主要有两种,1:动态获取ip:2:设置静态IP地址 在配置网络之前我们先要知道centos的网卡名称是什么,centos7不再使用ifconfig命令,可通过命令 ...

  5. [转帖]Centos7防火墙配置rich-rule实现IP端口限制访问

    Centos7防火墙配置rich-rule实现IP端口限制访问 2019-02-18 18:05:35 sunny05296 阅读数 2143  收藏 更多 分类专栏: Linux   版权声明:本文 ...

  6. Centos7网络配置( 网关、dns、ip地址配置)

    0.前提:设置VMware的虚拟网络编辑器 子网和网关设置   虚拟网络编辑器 1.配置DNS(可忽略) $vim /etc/resolv.conf nameserver 192.168.0.1 2. ...

  7. Centos7网络配置,vsftpd安装及530报错解决

    今天在虚拟机安装CentOS7,准备全新安装LTMP,结果又是一堆问题,不过正好因为这些出错,又给自己长了见识. 1,CentOS7网络配置 最小化安装CentOs7后,ifconfig提示comma ...

  8. Centos7安装配置gitlab

    Centos7安装配置gitlab 这篇文字我会介绍在Centos7上安装gitlab,配置gitlab的smtp,并且创建项目demo. sudo yum install openssh-serve ...

  9. [部署]CentOS配置IP地址

    环境 虚拟机:VMWare10.0.1 build-1379776 操作系统:CentOS7 64位 简介 CentOS7最小化安装(Minimal)时,是不带ifconfig指令的,该指令在net- ...

随机推荐

  1. react中用swiper实现大图功能

    1.引入Swiper(用的是4.5.0版本)      import Swiper from 'swiper';      //引入样式,还可以加上自己的样式      import '../../s ...

  2. day01_2spring3

    Bean基于XML和基于注解的装配 一.Bean基于XML的装配 1.生命周期接着day01_1来讲(了解) Bean生命周期的如图所示:用红色框起来的都是我们要研究的! 如图Bean is Read ...

  3. mybatis-plus QueryWrapper自定义查询条件

    mybatis-plus QueryWrapper自定义查询条件 mybatis-plus框架功能很强大,把很多功能都集成了,比如自动生成代码结构,mybatis crud封装,分页,动态数据源等等, ...

  4. 解决报错:ERROR 1005 (HY000): Can't create table 'market.orders' (errno: 150)

    1.描述问题: 在这里我新建了两张表(customers_info和orders) 表一:customers_info CREATE TABLE customers_info ( c_num INT( ...

  5. C++-Typedef结构体遇上指针

    继Typedef遇上结构体数组后,我们又产生了新的疑问. 上一期地址:https://www.cnblogs.com/lemaden/p/10122929.html 昨天一位朋友又问我了,说结构体数组 ...

  6. C语言-数组指针与指针数组

    1.思考 下面这些声明合法吗? int array[5]; int matrix[3][3]; int * pa = array; int * pm = matrix; 问题: array代表数组首元 ...

  7. ORA-00928: missing SELECT keyword

    问题描述 ORA-00928: missing SELECT keyword 问题原因 未写表名

  8. python lambda ,map详解

    lambda 匿名函数 # 普通定义函数 def func1(x,y): return x+y # 执行函数 print(func(1,2)) # 如果此函数只调用一次,或者功能简单,此方法就显得笨拙 ...

  9. layui-form下隐藏元素的验证问题

    1.情景: 设置为display:none的必填字段,在点击提交(form 包含 class="layui-form":button包含属性 lay-submit)的时候,依旧验证 ...

  10. Mongo查询list数组中一个字段大于特定条数

    由于刚刚接触mongodb,很多语法还不是很了解,写的不好的地方请大佬指出 查询的demo数据 { "_id":Object("xxxxxxxx"), &quo ...