linux minimal 网卡,CentOS 7 minimal安装后网络配置

虚拟机中最小化安装最新版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*.targetsystemctl可以看作是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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值