码迷,mamicode.com
首页 > 其他好文 > 详细

1、Red Hat 7.0 禁用firewalld和修改网卡

时间:2019-08-04 13:20:36      阅读:159      评论:0      收藏:0      [点我收藏+]

标签:firewalld   example   hat   hostname   class   host   style   loop   device   

# 禁用firewalld:

# systemctl stop firewalld # systemctl disable firewalld

 

# 修改主机名:
# hostnamectl set-hostname demo.example.com

 

# 修改网卡:
# nmcli device status
        DEVICE       TYPE      STATE      CONNECTION  
        eno16777736  ethernet  connected  eno16777736 
        lo           loopback  unmanaged  --     

        # nmcli connection show
        NAME         UUID                                  TYPE            DEVICE      
        eno16777736  1fb51113-0b9c-450a-b435-cfde1b220401  802-3-ethernet  eno16777736 
        
        # nmcli connection add con-name demo  ifname eno16777736 type ethernet autoconnect yes  (dhcp)
        
        # nmcli connection up demo
        # ip a  可以看到一个IP地址
        
        # #nmcli connection modify demo ipv4.method manual ipv4.addresses 192.168.78.128/24 192.168.78.1        (rhel7.0)
        # nmcli connection modify demo ipv4.method manual ipv4.addresses 192.168.78.128/24 ipv4.gateway 192.168.78.1  (rhel7.1 and after)
        
        # nmcli connection up demo

 

# 查看firewalld的状态:
systemctl status firewalld

# 查看selinux的状态:
getenforce 

# 查看主机名:
hostnamectl

# 查看网卡状态:
ip a

 


1、Red Hat 7.0 禁用firewalld和修改网卡

标签:firewalld   example   hat   hostname   class   host   style   loop   device   

原文地址:https://www.cnblogs.com/CL-learning/p/11297820.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!