zoukankan      html  css  js  c++  java
  • CentOS7.6配置ip

    CentOS7.6配置ip

    1、查看CentOS版本信息

    [root@localhost ~]# cat /etc/redhat-release 
    CentOS Linux release 7.6.1810 (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-4360-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 

    
    
  • 相关阅读:
    八皇后-递归
    代码复用3
    权限管理系统-角色组模块
    MzBlog分析
    linux shell 终端中文乱码(转)
    LINUX下中文语言包的安装(转)
    每一个程序员必须知道的业内英语词汇(转)
    80后创业故事之:兄弟散伙,创业失败(转)
    尊重用户的习惯审美,不要挑战用户的习惯(转)
    libpcre.so.1 cannot be found
  • 原文地址:https://www.cnblogs.com/connected/p/10477403.html
Copyright © 2011-2022 走看看