博客列表 >CentOS 7 minimal安装后网络配置

CentOS 7 minimal安装后网络配置

王石磊的博客
王石磊的博客原创
2017年08月31日 21:29:15853浏览
  • 虚拟机中最小化安装最新版centos 7后发现没有ifconfig等命令。

        cd /etc/sysconfig/network-scripts/

  • vi编辑 第一个ifcfg-ens33

        vi ifcfg-ens33

        ONBOOT=no改为yes

        :wq 保存后重启网卡

        service network restart

        然后就可以联网了

  • 安装ifconfig、service、chkconfig等基础命令

    yum groupinstall base  

  • 在centos 7 中安装ssh服务

        yum install -y openssh-server

  • 系统0-6 7个运行级别,2 3 4 运行指向同一个文件

         ll /lib/systemd/system/runlevel*.target  

  • systemctl可以看作是service和chkconfig的组合

job                          chkconfig、service                       systemctl    

服务开机自启动        chkconfig --level 3 httpd on       systemctl enable httpd    

服务不开机自启动     chkconfig --level 3 httpd off       systemctl disable httpd    

服务状态                   service httpd status

服务详细信息            systemctl status httpd

只显示是否active      systemctl is-active httpd

所有服务的启动状态    chkconfig --list     systemctl list-units --type=service    

启动服务                     service httpd start    systemctl start httpd    

停止服务                     service httpd stop    systemctl stop httpd    

重启服务                     service httpd restart    systemctl restart httpd    

更详解的systemd介绍 http://www.linuxidc.com/Linux/2014-11/109232.htm

RHEL7/CentOS7默认运行级别和终端分辨率 http://www.linuxidc.com/Linux/2014-07/104759.htm

U盘安装CentOS 7.0图文详解教程 http://www.linuxidc.com/Linux/2014-10/108014.htm

U盘安装64位CentOS 6.5方法 http://www.linuxidc.com/Linux/2014-04/100035.htm

Win7安装64位CentOS 6.4双系统详细图文教程 http://www.linuxidc.com/Linux/2014-04/100032.htm

CentOS与Windows双系统安装注意事项记录 http://www.linuxidc.com/Linux/2014-05/101571.htm

UEFI+GPT安装Windows8和CentOS双系统 http://www.linuxidc.com/Linux/2014-05/101575.htm

Windows8.1和CentOS6.5双系统安装 http://www.linuxidc.com/Linux/2014-05/101581.htm


声明:本文内容转载自脚本之家,由网友自发贡献,版权归原作者所有,如您发现涉嫌抄袭侵权,请联系admin@php.cn 核实处理。
全部评论
文明上网理性发言,请遵守新闻评论服务协议