CentOS7.6配置ip
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的更多相关文章
- CentOS7虚拟机配置ip地址
首先安装后的虚拟机选NAT模式配置vm的虚拟网络编辑器(vmware中的编辑),NAT模式中查看DHCP的范围,配置子网(写成和电脑一样),在linux中进入/etc/sysconfig/networ ...
- VMware中安装CentOS7网络配置静态IP地址,常用配置和工具安装
VMware中安装CentOS7网络配置静态IP地址,常用配置和工具安装在阿里云开源镜像地址下载镜像Index of /centos/7.2.1511/isos/x86_64/http://mirro ...
- CentOS7安装GNOME可视化界面和如何配置IP地址
本人在虚拟机安装 CentOS7 1,检查一下我们已经安装的软件以及可以安装的软件,用命令 yum grouplist 2,然后安装我们需要的图形界面软件,GNOME(GNOME Desktop) 这 ...
- centos7配置IP地址
有关于centos7获取IP地址的方法主要有两种,1:动态获取ip:2:设置静态IP地址 在配置网络之前我们先要知道centos的网卡名称是什么,centos7不再使用ifconfig命令,可通过命令 ...
- [转帖]Centos7防火墙配置rich-rule实现IP端口限制访问
Centos7防火墙配置rich-rule实现IP端口限制访问 2019-02-18 18:05:35 sunny05296 阅读数 2143 收藏 更多 分类专栏: Linux 版权声明:本文 ...
- Centos7网络配置( 网关、dns、ip地址配置)
0.前提:设置VMware的虚拟网络编辑器 子网和网关设置 虚拟网络编辑器 1.配置DNS(可忽略) $vim /etc/resolv.conf nameserver 192.168.0.1 2. ...
- Centos7网络配置,vsftpd安装及530报错解决
今天在虚拟机安装CentOS7,准备全新安装LTMP,结果又是一堆问题,不过正好因为这些出错,又给自己长了见识. 1,CentOS7网络配置 最小化安装CentOs7后,ifconfig提示comma ...
- Centos7安装配置gitlab
Centos7安装配置gitlab 这篇文字我会介绍在Centos7上安装gitlab,配置gitlab的smtp,并且创建项目demo. sudo yum install openssh-serve ...
- [部署]CentOS配置IP地址
环境 虚拟机:VMWare10.0.1 build-1379776 操作系统:CentOS7 64位 简介 CentOS7最小化安装(Minimal)时,是不带ifconfig指令的,该指令在net- ...
随机推荐
- AcWing 1017. 怪盗基德的滑翔翼
#include<iostream> using namespace std ; ; int f[N],g[N]; int w[N]; int main() { int t; cin> ...
- windows重建ESP分区修复引导
开始 装在虚拟机里面的win7实在是太卡了,所以准备把虚拟磁盘文件复制到固态硬盘,,,但是,,, 我只有128GB固态... 那就只能卸载之前通宵装的linux 好气 首先需要装进入PE UEFI + ...
- 1054 The Dominant Color
大致题意就是给出N行M列的元素,找出出现次数最多的元素并输出. #include<iostream> #include<unordered_map> using namespa ...
- 解决 IDEA 无法提示导入 java.util.Date 的问题
之前有一段时间在使用IDEA的时候,发现通过快捷键Alt + Enter导入并没有提示有java.util.Date的包,仅仅只有java.sql.Date的包.于是每次使用都需要通过手写import ...
- RemoteViews 整理
前言 RemoteViews表面意思就是远程的view,这个就很难理解了,远程的view.但是英语是抽象,remote本身就是偏僻的,偏远的意思. 所以remoteViews 就是地方view,天高皇 ...
- Spring AOP操作action时无法注入,报NullPointer异常
Spring AOP操作action时无法注入,报NullPointer异常当使用Spring AOP对action层进行操作时,会出现注入失败的问题,出现空指针异常.原因是一般struts2+spr ...
- layui表单之单选框提交
<div class="layui-form-item"> <label class="layui-form-label">状态< ...
- 1.6 SQL (根据时间取值)
select * from 表名 where createdate > date_add(subdate(curdate(),date_format(curdate(),'%w')-1),int ...
- 钉钉内网穿透工具在windows的使用。
钉钉内网穿透工具在windows环境下使用 1.WIN+R,然后cmd,调出dos控制台 2.进入内网穿透程序ding.exe所在目录 3.执行 ./ding.exe -config=ding.cfg ...
- 6.mybatis----日志工厂
日志工厂 如果一个数据库操作出现了异常,我们需要排错,所以说日志就是最好的助手 曾经:sout,debug 现在:日志工厂 在Mybatis中具体使用哪一个日志,在设置中设定 咋设定? 在mybati ...