1.先修改系统的root帐号密码为redhat,确保能够使用root帐号能够登陆系统。
主机名: desktop.group8.example.com
IP地址: xxx.xxx.xxx.10
子网掩码: 255.255.255.0
网关: xxx.xxx.xxx.2
域名服务: xxx.xxx.xxx.254
[root@desktop ~]# nmcli c modify ens160 ipv4.method manual ipv4.address 192.168.182.10/24 ipv4.gateway 192.168.182.2 ipv4.dns 114.114.114.254
[root@desktop ~]# vim /etc/sysconfig/network-scripts/ifcfg-ens160
2.在当前系统安装httpd,lrzsz软件
判断以上软件是否已经安装
[root@desktop Packages]# rpm -ql httpd
[root@desktop Packages]# rpm -ql lrzsz
[root@desktop ~]# mount /dev/sr0 /mnt
mount: /mnt: /dev/sr0 already mounted on /run/media/redhat/RHEL-8-5-0-BaseOS-x86_64.
[root@desktop /]# cd /mnt
[root@desktop mnt]# cd AppStream/Packages/
[root@desktop Packages]# vim /etc/yum.repos.d/base.repo
[root@desktop Packages]# dnf install lrzsz
[root@desktop Packages]# dnf install httpd
[root@desktop Packages]# rpm -qa | grep lrzsz
lrzsz-0.12.20-43.el8.x86_64
[root@desktop Packages]# rpm -qa | grep httpd
httpd-filesystem-2.4.37-41.module+el8.5.0+11772+c8e0c271.noarch
httpd-tools-2.4.37-41.module+el8.5.0+11772+c8e0c271.x86_64
httpd-2.4.37-41.module+el8.5.0+11772+c8e0c271.x86_64
redhat-logos-httpd-84.5-1.el8.noarch
统计http软件安装释放文件个数
[root@desktop Packages]# rpm -ql httpd | wc -l
660
卸载当前系统的tree软件
[root@desktop Packages]# rpm -evh tree
Preparing... ################################# [100%]
Cleaning up / removing...
1:tree-1.7.0-15.el8 ################################# [100%]
查看/usr/bin/vim文件是通过哪个软件包释放的文件
[root@desktop Packages]# rpm -qf /usr/bin/vim
vim-enhanced-8.0.1763-16.el8.x86_64