一.vmware配置网络环境
自定义-选择安装镜像-选择操作系统-内存必须2G-硬盘类型选择sata
此时就安装完毕,但是还没结束
点开设置,选择处理器。在虚拟化引擎勾选第一栏,虚拟化intel
网络适配器,选择桥接模式-显示器,把3D加速的勾去掉
最上面一栏选择编辑,网络配置,外部连接最好选自己的网卡,无线就选无线,有线就选有线。
创建完成之后单击右键可以找到虚拟机的克隆。这样就不需要再次创建虚拟机。
二.守护进程和systemctl的使用
守护进程相当于内核的助理
pstree
查看守护进程
start
stop
restart
reload
status
enable
disable
enable --now
disable --now
list-units 查看系统所有服务当前状态
mask 冻结服务
unmask 解冻服务
list-dependencies 查看服务依赖性
get-default 查看系统运行模式
0-6
0 关机
1 单用户模式
2 无图形网络模式
3 无图形网络模式
4 无图形网络模式
5 有图形网络模式
6 重启
永久改变 开机模式
systemctl set-default graphical.target
三.系统时间的管理
[root@chihao1 ~]# timedatectl
Local time: Tue 2021-04-20 04:08:33 CST
Universal time: Mon 2021-04-19 20:08:33 UTC
RTC time: Tue 2021-04-20 13:25:58
Time zone: Asia/Shanghai (CST, +0800)
System clock synchronized: no
NTP service: inactive
RTC in local TZ: no
[root@chihao1 ~]# timedatectl set-time "2021-04-20 21:30:00"
修改系统时间
[root@chihao1 ~]# timedatectl set-local-rtc 1 系统时间使用本地时间
[root@chihao1 ~]# timedatectl set-local-rtc 0 系统时间选择UTC时间
[root@chihao1 ~]# timedatectl set-timezone "Europe/Amsterdam"
修改时区到荷兰
要想更改回来就把时区改为亚洲上海
四.企业级时间同步服务的部署
服务端:[root@chihao2 ~]# vim /etc/chrony.conf
0.0.0.0/0表示允许所有人,10是时间同步的级别
谁共享时间谁做这个事
[root@chihao2 ~]# systemctl enable --now chronyd
开启服务
客户端:
[root@chihao1 ~]# vim /etc/chrony.conf
同样编辑配置文件
编辑第三行,需要接收谁的时间就改成谁的IP地址
[root@chihao2 ~]# clock -w
系统时间同步到硬件
服务端:
[root@chihao1 ~]# chronyc sources -v
服务端检查时间的来源,时间同步服务有没有实现
210 Number of sources = 1
.-- Source mode '^' = server, '=' = peer, '#' = local clock.
/ .- Source state '*' = current synced, '+' = combined , '-' = not combined,
| / '?' = unreachable, 'x' = time may be in error, '~' = time too variable.
|| .- xxxx [ yyyy ] +/- zzzz
|| Reachability register (octal) -. | xxxx = adjusted offset,
|| Log2(Polling interval) --. | | yyyy = measured offset,
|| \ | | zzzz = estimated error.
|| | | \
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^* 172.25.254.244 10 6 77 58 -22us[ -223us] +/- 263us
显示144的时间来源于244