首页 技术 正文
技术 2022年11月11日
0 收藏 450 点赞 5,123 浏览 906 个字

使用的是osboxes.org上下载的已安装centos7 image, 在启动后, ifconfig不能看到网卡, 需要关机后在ESXi客户端编辑虚机, 删除网卡, 保存, 添加网卡, 网卡类型选择 VMXNET3

启动后, ifconfig能看到新的网卡, 名称为 eno16777984, 在/etc/sysconfig/network-scripts/ 下新建文件 ifcfg-eno16777984, 内容类似于

DEVICE="eno16777984"
HWADDR="00:0C:5E:37:67:FF"
NM_CONTROLLED="no"
ONBOOT="yes"
BOOTPROTO=static
IPADDR=192.168.10.99
NETMASK=255.255.255.0
GATEWAY=192.168.10.1

然后重启网络

systemctl restart network.service

设置为开机启动

systemctl enable network.service

Centos7 下修改启动级别为命令行(multi-user)

ln -s /lib/systemd/system/multi-user.target /etc/systemd/system/default.target

开机启动sshd

# 查看systemctl配置
systemctl
# 查看systemctl配置中的sshd部分
systemctl |grep sshd
# sshd服务状态
systemctl status sshd.service
# 启动sshd服务
systemctl start sshd.service
# 查看sshd是否开机启动
systemctl is-enabled sshd.service
# 添加至开机启动
systemctl enable sshd.service

最后一个命令, 运行时实际上执行了

[root@osboxes ~]# systemctl enable sshd.service
ln -s '/usr/lib/systemd/system/sshd.service' '/etc/systemd/system/multi-user.target.wants/sshd.service'
相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:8,955
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,479
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,291
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,108
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,740
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,774