centos重启后网络默认关闭,需要手动开启,如何解决?

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了centos重启后网络默认关闭,需要手动开启,如何解决?相关的知识,希望对你有一定的参考价值。

试试如下办法:


1. 在运行中输入services.msc打开服务。


2. 在服务中按W,找到Wireless Zero Configuration并双击打开它的属性。


3. 在打开的属性对话框的常规选项卡中调整“启动类型”,将启动类型从“手动”调整为“自动”。然后应用并确定关闭对话框。


注意:在启动类型下面的服务状态应处于“启动”状态。

一,Centos介绍

    中文意思是:社区企业操作系统,是Linux发行版之一,它是来自于Red Hat Enterprise Linux依照开放源代码规定释出的源代码所编译而成。

    由于出自同样的源代码,因此有些要求高度稳定性的服务器以CentOS替代商业版的Red Hat Enterprise Linux使用。两者的不同,在于CentOS并不包含封闭源代码软件。

二,特点

编辑

1.可以把CentOS理解为Red Hat AS系列!它完全就是对Red Hat AS进行改进后发布的!各种操作、使用和RED HAT没有区别!

2.CentOS完全免费,不存在RED HAT AS4需要序列号的问题。

3.CentOS独有的yum命令支持在线升级,可以即时更新系统,不像RED HAT那样需要花钱购买支持服务!

4.CentOS修正了许多RHEL的BUG!

5.CentOS版本说明:CentOS3.1 等同于 RED HAT AS3 Update1 CentOS3.4 等同于 RED HAT AS3 Update4 CentOS4.0 等同于 RED HAT AS4

参考技术A vi /etc/sysconfig/network-scripts/ifcfg-eth0
把ONBOOT的值改为yes
参考技术B systemctl network start

centos 7.0 查看selinux状态|关闭|开启

Linux在安装好之后通常SELinux都是出于默认开启的状态,开启的情况下会导致一些服务的安装不成功。

在不需要的情况下完全可以关闭掉,下面是在centos 7.0里面如何查看,关闭selinux。

查看selinux状态

Linux在安装好之后通常SELinux都是出于默认开启的状态,开启的情况下会导致一些服务的安装不成功。
在不需要的情况下完全可以关闭掉,下面是在centos 7.0里面如何查看,关闭selinux。
查看selinux状态

[[email protected] ~]# sestatus  

SELinux status:                 enabled  
SELinuxfs mount:                /sys/fs/selinux  
SELinux root directory:         /etc/selinux  
Loaded policy name:             targeted  
Current mode:                   enforcing  
Mode from config file:          enforcing  
Policy MLS status:              enabled  
Policy deny_unknown status:     allowed  
Max kernel policy version:      28 

临时关闭


[[email protected] ~]# setenforce 0 

永久关闭,可以修改配置文件/etc/selinux/config,将其中SELINUX设置为disabled。
 
[[email protected] ~]# cat /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.  
#SELINUX=enforcing  
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


[[email protected] ~]# sestatus  

SELinux status:                 disabled 

 

 
 

临时关闭

[[email protected] ~]# setenforce 

 

 
 

永久关闭,可以修改配置文件/etc/selinux/config,将其中SELINUX设置为disabled

[[email protected] ~]# cat /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.
#SELINUX=enforcing 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
[[email protected] ~]# sestatus SELinux status: disabled

 












以上是关于centos重启后网络默认关闭,需要手动开启,如何解决?的主要内容,如果未能解决你的问题,请参考以下文章

如何在Centos 7快速开启端口

Centos 如何关闭自动更新

centos 开启关闭网卡(禁用网卡)

如何在CenTos 7上开启关闭防火墙

请问centos的nginx服务器的80端口的开启?

centos 7.3 网卡不能自动启动