1、配置网络:为网卡添加一个本网段IPV4地址,x.x.x.123
[root@192 ~]# nmcli connection modify ens160 ipv4.addresses 192.168.219.123/24 ipv4.gateway 192.168.219.2 ipv4.dns 114.114.114.114 autoconnect yes
[root@192 ~]# cat /etc/NetworkManager/system-connections/ens160.nmconnection
2、配置yum本地仓库,并完成traceroute命令的安装
3、用至少两种方法查看sshd服务的进程号
[root@192 ~]# ps -aux|grep sshd~
[root@192 ~]# top
4、添加一块10G大小的磁盘,将该磁盘分为两个主分区,大小为1G、2G。将剩余的空间全部划分为扩展分区。划分一个逻辑分区,大小为3G。(主分区文件系统类型为ext4,逻辑分区文件系统类型为xfs)
[root@192 ~]# fdisk /dev/sda
Welcome to fdisk (util-linux 2.32.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Device does not contain a recognized partition table.
Created a new DOS disklabel with disk identifier 0xf8f70ec6.
Command (m for help): n
Partition type
p primary (0 primary, 0 extended, 4 free)
e extended (container for logical partitions)
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-20971519, default 2048):
Last sector, +sectors or +size{K,M,G,T,P} (2048-20971519, default 20971519): +1G
Created a new partition 1 of type 'Linux' and of size 1 GiB.
Command (m for help): n
Partition type
p primary (1 primary, 0 extended, 3 free)
e extended (container for logical partitions)
Select (default p): p
Partition number (2-4, default 2): 2
First sector (2099200-20971519, default 2099200):
Last sector, +sectors or +size{K,M,G,T,P} (2099200-20971519, default 20971519): +2G
Created a new partition 2 of type 'Linux' and of size 2 GiB.
Command (m for help): n
Partition type
p primary (0 primary, 0 extended, 4 free)
e extended (container for logical partitions)
Select (default p): e
Partition number (1-4, default 1): 1
First sector (2048-20971519, default 2048):
Last sector, +sectors or +size{K,M,G,T,P} (2048-20971519, default 20971519): +4G
Created a new partition 1 of type 'Extended' and of size 4 GiB.
[root@192 dev]# mkfs -t ext4 /dev/sda1
[root@192 ~]# pvcreate /dev/sda3
WARNING: dos signature detected on /dev/sda3 at offset 510. Wipe it? [y/n]: y
Wiping dos signature on /dev/sda3.
Physical volume "/dev/sda3" successfully created.
[root@192 ~]# vgcreate dbvg /dev/sda3
Volume group "dbvg" successfully created
[root@192 ~]# vgchange -a y dbvg
0 logical volume(s) in volume group "dbvg" now active
[root@192 ~]# lvcreate -L 3G -n myvg1 dbvg
Logical volume "myvg1" created.
[root@192 ~]# mkfs.xfs /dev/sda3