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

												

最新文章

  1. 纯C#的ini格式配置文件读写
  2. QML杂记
  3. 浏览器缓存详解:expires,cache-control,last-modified,etag详细说明
  4. [deviceone开发]-do_Camera的简单示例
  5. 概率 高消light oj 1151
  6. 1.7---将矩阵元素为0的行列清零0(CC150)
  7. SVM=LASSO?
  8. css3学习总结7--CSS3 2D转换
  9. HD1000A + B Problem
  10. [C++知识点]2015.4.18
  11. Codeforces Round #367 (Div. 2)D. Vasiliy's Multiset (字典树)
  12. SVN服务器
  13. centos7升级内核至最新
  14. 自定义Cordova插件(基础篇)
  15. SpringBoot入门笔记(一)、HelloWorld
  16. MD5_Util工具类代码
  17. TCP/IP笔记(1)
  18. jmeter4.0安装记录
  19. 报文、http、https的理解
  20. arcgis按要求删除点位

热门文章

  1. JavaScript的Map和Set
  2. dmesg用法
  3. c#中的位运算
  4. Visibility Graph Analysis of Geophysical Time Series: Potentials and Possible Pitfalls
  5. 边捆绑: Content Importance Based Edge Bundling for Graph Visualization
  6. XMLHttpRequest: 网络错误 0x2ee4, 由于出现错误 00002ee4 而导致此项操作无法完成
  7. python3.0练习100题——001
  8. dict 字典合并
  9. GitBook相关使用以及配置笔记
  10. APP 安全测试