• 关闭selinux
    [root@Su /]# vim /etc/selinux/config
    
    
    # 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.
    ##此处disabled为永久关闭selinux,需要重启生效
    SELINUX=disabled    
    # SELINUXTYPE= can take one of three two values:
    #     targeted - Targeted processes are protected,
    #     minimum - Modification of targeted policy. Only selected processes are protected. 
    #     mls - Multi Level Security protection.
    SELINUXTYPE=targeted

    #临时关闭selinux :setenforce 0
    #查看selinux状态:getenforce
     

  • 关闭防火墙

    [root@Su /]# systemctl stop firewalld       ##关闭防火墙
    [root@Su /]# systemctl disable firewalld     ##禁止开机启动
    Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
    Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
    [root@Su /]# 
    

    #systemctl enable firewalld     ##开机启动
     

  • 关闭NetworkManager

    [root@Su ~]# systemctl stop NetworkManager
    [root@Su ~]# systemctl disable NetworkManager
    

     

  • 删除UUID(eth0|eth1),并修改IP

    [root@Su ~]# vim /etc/sysconfig/network-scripts/ifcfg-eth0
    
    TYPE=Ethernet
    PROXY_METHOD=none
    BROWSER_ONLY=no
    BOOTPROTO=none
    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=eth0
    DEVICE=eth0
    ONBOOT=yes
    IPADDR=10.0.0.40                 ####修改IP
    PREFIX=24
    GATEWAY=10.0.0.2
    DNS1=223.5.5.5
    IPV6_PRIVACY=no


     

  • 配置yum源(根据以下说明)
    https://developer.aliyun.com/mirror/centos?spm=a2c6h.13651102.0.0.53322f70HiNd4M  (阿里源)
    https://mirrors.tuna.tsinghua.edu.cn/help/centos/    (清华源)

最后修改于 2020-01-02 15:19:35
如果觉得我的文章对你有用,请随意赞赏
扫一扫支付
上一篇