RHCSA复习题

ops/2024/10/18 0:21:05/

第一~七章

1.创建以下目录和文件结构,并将/yasuo目录拷贝4份到/目录下。

[root@localhost ~]# mkdir /yasuo
[root@localhost ~]# mkdir /yasuo/dir1
[root@localhost ~]# cd /yasuo/dir1
[root@localhost dir1]# touch hostname hostname02 passwd ssh_config sshd
[root@localhost dir1]# cp * ..
[root@localhost dir1]# tree /yasuo
/yasuo
├── dir1
│   ├── hostname
│   ├── hostname02
│   ├── passwd
│   ├── ssh_config
│   └── sshd
├── hostname
├── hostname02
├── passwd
├── ssh_config
└── sshd1 directory, 10 files
[root@localhost dir1]# cp -r /yasuo /yasuo1
[root@localhost dir1]# cp -r /yasuo /yasuo2
[root@localhost dir1]# cp -r /yasuo /yasuo3
[root@localhost dir1]# cp -r /yasuo /yasuo4
[root@localhost dir1]# ls /
afs  boot  etc   lib    media  opt   root  sbin  sys  usr  virdir  yasuo   yasuo2  yasuo4
bin  dev   home  lib64  mnt    proc  run   srv   tmp  var  www     yasuo1  yasuo3

2.查看系统合法shell

[obboda@localhost ~]$ cat /etc/shells
/bin/sh
/bin/bash
/usr/bin/sh
/usr/bin/bash

3.查看系统发行版版本

[obboda@localhost ~]$ cat /etc/redhat-release
Red Hat Enterprise Linux release 9.3 (Plow)

4.查看系统内核版本

[obboda@localhost ~]$ uname -a
Linux localhost.localdomain 5.14.0-362.8.1.el9_3.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Oct 3 11:12:36 EDT 2023 x86_64 x86_64 x86_64 GNU/Linux

5.临时修改主机名

[root@localhost ~]# hostname oppoda

6.查看系统指令的查找路径

[root@localhost ~]# echo $PATH
/root/.local/bin:/root/bin:/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin

7.查看passwd指令的执行路径

[obboda@localhost ~]$ which passwd
/usr/bin/passwd

8.为/yasuo/ssh_config文件在/目录下创建软链接,软链接名称为ssh_config.link

[root@localhost ~]# ln -s /yasuo/ssh_config /ssh_config.link

9.创建目录/mulu ,重命名并移动/ssh_config.link

[root@localhost ~]# mv /ssh_config.link /mulu
[root@localhost ~]# ls /mulu
ssh_config.link

10.找到你的根目录下的所有块设备文件

[root@localhost ~]# find /dev -type b
/dev/dm-1
/dev/dm-0
/dev/sr0
/dev/nvme0n1p2
/dev/nvme0n1p1
/dev/nvme0n1

11.将/etc/passwd和/etc/ssh/sshd_config文件复制到/root/etc/目录下

[root@localhost ~]# cp /etc/passwd /etc/ssh/ssh_config /root/etc/
[root@localhost ~]# ls /root/etc/
passwd  ssh_config

12.复制/var/log/messages到/root目录下

[root@localhost ~]# cp /var/log/messages /root/
[root@localhost ~]# ls /root
公共  视频  文档  音乐  anaconda-ks.cfg  messages
模板  图片  下载  桌面  etc              vsftpd-3.0.5-5.el9.x86_64.rpm

13.打包/root/messages和/root/etc/为/root/me.tar.bz2

[root@localhost ~]# tar -cvf /root/me.tar.bz2 /root/messages /root/etc/
tar: 从成员名中删除开头的“/”
/root/messages
tar: 从硬连接目标中删除开头的“/”
/root/etc/
/root/etc/passwd
/root/etc/ssh_config
[root@localhost ~]# ls /root
公共  视频  文档  音乐  anaconda-ks.cfg  messages    vsftpd-3.0.5-5.el9.x86_64.rpm
模板  图片  下载  桌面  etc              me.tar.bz2

14.解压/root/me.tar.bz2

[root@localhost ~]# tar -xvf me.tar.bz2
root/messages
root/etc/
root/etc/passwd
root/etc/ssh_config

15.找到/etc/passwd中有root信息的行内容

[root@localhost ~]# grep 'root' /etc/passwd
root:x:0:0:root:/root:/bin/bash
operator:x:11:0:operator:/root:/sbin/nologin
virtual:x:1004:1004::/var/ftproot:/sbin/nologin

16.真实案例:在公司网站日志文件如下【它会记录谁曾经在什么时间访问过它】:领导要求:查出访问我们公司网 站排名第一的客户端ip地址,并且还要知道访问次数

2023/06/17 07:50:56 10.0.0.1 Chrome

2023/06/15 09:09:49 192.168.1.2 Chrome

2023/05/11 20:54:31 10.0.0.1 Chromefirefox

2023/04/13 01:22:42 192.168.1.2 firefox

2023/03/10 17:19:10 10.0.0.2 Chrome

2023/01/07 05:08:22 192.168.1.2 firefox

[root@localhost ~]# cat 1.txt 
2023/06/17 07:50:56 10.0.0.1 Chrome
2023/06/15 09:09:49 192.168.1.2 Chrome
2023/05/11 20:54:31 10.0.0.1 Chromefirefox
2023/04/13 01:22:42 192.168.1.2 firefox
2023/03/10 17:19:10 10.0.0.2 Chrome
2023/01/07 05:08:22 192.168.1.2 firefox
[root@localhost ~]# cat 1.txt| tr -s " "| cut -d " " -f 3| sort| uniq -c|sort|tail -n 13 192.168.1.2

17.创建目录/dir1,复制/etc/passwd文件到该目录

[root@localhost ~]# mkdir /dir1
[root@localhost ~]# cp /etc/passwd /dir1/

18.将/dir1/passwd重命名为passwd.back

[root@localhost ~]# mv /dir1/passwd /dir1/passwd.back
[root@localhost ~]# ls /dir1/
passwd.back

19.列出目录/root和/aaaaa,将标准输出重定向到ok.file,标准错误输出重定向到erro.file

[root@localhost ~]# ls /root/ /aaaaa 1>ok.file 2>erro.file
[root@localhost ~]# cat ok.file 
/root/:
1.txt
公共
模板
视频
图片
文档
下载
音乐
桌面
anaconda-ks.cfg
erro.file
haha
me.tar.bz2
ok.file
vsftpd-3.0.5-5.el9.x86_64.rpm
xixi
[root@localhost ~]# cat erro.file 
ls: 无法访问 '/aaaaa': 没有那个文件或目录

20.列出目录/root和/aaaaa,将标准输出和标准错误输出都丢掉

[root@localhost ~]# ls /roor/ /aaaaa &>/dev/null

21.在/根目录下创建一个haha目录

[root@localhost ~]# mkdir /haha

22.在/根目录下创建xixi文件

[root@localhost ~]# touch /xixi

23.往xixi文件里面写'wo shi xixi ^=^'

[root@localhost ~]# echo "wo shi xixi ^=^" > /xixi
[root@localhost ~]# cat /xixi
wo shi xixi ^=^

24.为文件xixi在/目录下创建软链接xixi.link

[root@localhost ~]# ln -s /xixi /xixi.link
[root@localhost ~]# cat /xixi.link 
wo shi xixi ^=^

25.将xixi.link重命名为xixi.link2.0

[root@localhost ~]# mv /xixi.link /xixi.link2.0
[root@localhost ~]# ll /xixi.link2.0 
lrwxrwxrwx. 1 root root 5 10月 14 21:01 /xixi.link2.0 -> /xixi

26.说说Linux系统中里/etc /dev 目录

./etc 		配置文件、启动脚本等包含所有程序所需的配置文件,也包含了用于启动/停止单个程序的启动和关闭shell脚本
./dev 设备 (device)文件包含设备文件,包括终端设备,USB或连接到系统的任何设备

27.过滤/etc/ssh/sshd_config不显示注释行和空行

[root@localhost ~]# grep -v ^# /etc/ssh/sshd_config | grep -v ^$ 
Include /etc/ssh/sshd_config.d/*.conf
AuthorizedKeysFile      .ssh/authorized_keys
Subsystem       sftp    /usr/libexec/openssh/sftp-server

28.在/opt目录下创建一个临时目录tmp

[root@localhost ~]# mkdir /opt/tmp
[root@localhost ~]# ll /opt/tmp/
总用量 0

29.在临时目录/opt/tmp下创建一个文件,文件名为a.txt

[root@localhost ~]# touch /opt/tmp/a.txt
[root@localhost ~]# ll /opt/tmp/a.txt 
-rw-r--r--. 1 root root 0 10月 14 21:13 /opt/tmp/a.txt

使用vim编辑器完成以下步骤:

30.应用vim命令在/tmp文件夹下创建文件,文件名newfile。在newfile首行输入日期时间

[obboda@localhost ~]$ touch /tmp/newfile
[obboda@localhost ~]$ echo "`date`" > /tmp/newfile 
[obboda@localhost ~]$ cat /tmp/newfile 
2024年 10月 15日 星期二 19:28:42 CST

31.将/boot/grub2/grub.cfg文档的内容读入到newfile文档中(在日期的下一行即第2行)

[root@localhost ~]# cat /boot/grub2/grub.cfg  >> /tmp/newfile

32.查找newfile文档中包含#号字符的行,将整行删除

[root@localhost ~]#  sed '/#/d' /tmp/newfile

33.开启VI的行号提示功能

 24 fi25 26 if [ x"${feature_menuentry_id}" = xy ]; then27   menuentry_id_option="--id"28 else29   menuentry_id_option=""30 fi31 
:set number 
# 在vim编辑器中的命令模式中输入set number显示行数,输入set nonumber不显示行数

34.在当前目录及子目录中,查找文件名字以大写字母开头的txt文件

[root@localhost ~]# find . -type f -name '[A-Z]*.txt'
./.mozilla/firefox/cv7bcl6l.default-default/SiteSecurityServiceState.txt
./.mozilla/firefox/cv7bcl6l.default-default/AlternateServices.txt

35.在/etc及其子目录中,查找文件内容以host开头的文件

[root@localhost ~]# grep -r '^host' /etc/
/etc/dnf/plugins/copr.conf:hostname = copr.fedorainfracloud.org
/etc/rhsm/rhsm.conf:hostname = subscription.rhsm.redhat.com
/etc/aliases:hostmaster:        root
/etc/services:hostname        101/tcp         hostnames       # usually from sri-nic
/etc/services:hostname        101/udp         hostnames       # usually from sri-nic
/etc/services:hostmon         5355/tcp        llmnr           # hostmon uses TCP (nocol)
/etc/services:hostmon         5355/udp        llmnr           # hostmon uses TCP (nocol)
/etc/rpc:hostperf       100107  na.hostperf
/etc/rpc:hostmem                100112  na.hostmem
/etc/rpc:hostif         100117  na.hostif
grep: /etc/selinux/targeted/policy/policy.33:匹配到二进制文件
/etc/nsswitch.conf.bak:hosts:      files dns myhostname
/etc/authselect/user-nsswitch.conf:hosts:      files dns myhostname
/etc/authselect/nsswitch.conf:hosts:      files dns myhostname

36.在$HOME目录及其子目录中,查找所有文件

[root@localhost ~]# find $HOME -type f
# 输出结果太多了就不展示了......

37.查找文件/etc/passwd中包含字符串 /bin/bash 的所有行。将所有这些行的副本按原始顺序放在文件/root/files 中

[root@localhost ~]# grep '/bin/bash' /etc/passwd > /root/files
[root@localhost ~]# cat /root/files 
root:x:0:0:root:/root:/bin/bash
obboda:x:1000:1000:obboda:/home/obboda:/bin/bash
test11:x:1001:8889::/home/test11:/bin/bash
test22:x:1002:1002::/home/test22:/bin/bash
ftptest:x:1003:1003::/home/ftptest:/bin/bash
hwl:x:1005:1005::/home/hwl:/bin/bash

38.将整个 /etc 目录下的文件全部打包并用 gzip 压缩成/back/etcback.tar.gz

[root@localhost ~]# mkdir /back
[root@localhost ~]# tar -cvf /back/etcback.tar.gz /etc/

39.使当前用户永久生效的命令别名:写一个命令命为hello,实现的功能为每输入一次hello命令,就有hello, everyone写入文件/file.txt中

[root@localhost ~]# touch /usr/bin/hello
[root@localhost ~]# /usr/bin/hello
-bash: /usr/bin/hello: 权限不够
[root@localhost ~]# ll /usr/bin/hello 
-rw-r--r--. 1 root root 0 10月 15 19:59 /usr/bin/hello
[root@localhost ~]# chmod u+x /usr/bin/hello 
[root@localhost ~]# ll /usr/bin/hello 
-rwxr--r--. 1 root root 0 10月 15 19:59 /usr/bin/hello
[root@localhost ~]# echo 'echo hello,everyone >> file.txt' > /usr/bin/hello 
[root@localhost ~]# cat /usr/bin/hello 
echo hello,everyone >> file.txt
[root@localhost ~]# hello
[root@localhost ~]# cat file.txt 
hello,everyone
[root@localhost ~]# hello
[root@localhost ~]# hello
[root@localhost ~]# hello
[root@localhost ~]# cat file.txt 
hello,everyone
hello,everyone
hello,everyone
hello,everyone

第八章 用户管理

1.创建myuser用户属于mygroup组群,接着以myuser身份登录,创建ex和hv两个文件于/home/myuser目录,并使hv文件的所属组是mygroup。请依次写出相应的执行命令

[root@localhost ~]# useradd myuser
[root@localhost ~]# groupadd mygroup
[root@localhost ~]# usermod -g mygroup myuser
[root@localhost ~]# id myuser
用户id=1006(myuser) 组id=8890(mygroup) 组=8890(mygroup)
[root@localhost ~]# su - myuser
[myuser@localhost ~]$ touch ex hv
[myuser@localhost ~]$ ll
总用量 0
-rw-r--r--. 1 myuser mygroup 0 10月 15 20:20 ex
-rw-r--r--. 1 myuser mygroup 0 10月 15 20:20 hv

第九章 权限管理

1.新建/sc目录,所属组为group组,root用户和group组用户可在该目录下创建文件,其他人无任何权限

[root@localhost ~]# mkdir /sc
[root@localhost ~]# ll -d /sc
drwxr-xr-x. 2 root root 6 10月 15 20:25 /sc
[root@localhost ~]# groupadd group
[root@localhost ~]# chown :group /sc
[root@localhost ~]# chmod g+w,o=- /sc
[root@localhost ~]# ll -d /sc
drwxrwx---. 2 root group 6 10月 15 20:25 /sc

第十章 磁盘管理

1.添加一块10G大小的硬盘,将该磁盘分为两个主分区,大小为1G、2G。将剩余的空间全部划分为扩展分区。划分 一个逻辑分区,大小为3G。(主分区的文件系统类型为ext4,逻辑分区文件系统类型为xfs)

[root@localhost ~]# lsblk
NAME          MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
sda             8:0    0   10G  0 disk 
├─sda1          8:1    0    1G  0 part 
├─sda2          8:2    0    2G  0 part 
├─sda3          8:3    0    1K  0 part 
└─sda5          8:5    0    3G  0 part 
sr0            11:0    1 1024M  0 rom  
nvme0n1       259:0    0   40G  0 disk 
├─nvme0n1p1   259:1    0    1G  0 part /boot
└─nvme0n1p2   259:2    0   39G  0 part ├─rhel-root 253:0    0   35G  0 lvm  /└─rhel-swap 253:1    0    4G  0 lvm  [SWAP]
[root@localhost ~]# mkfs.ext4 /dev/sda1
mke2fs 1.46.5 (30-Dec-2021)
创建含有 262144 个块(每块 4k)和 65536 个inode的文件系统
文件系统UUID:4c5e9c12-5448-455d-a210-8978594ad355
超级块的备份存储于下列块: 32768, 98304, 163840, 229376正在分配组表: 完成                            
正在写入inode表: 完成                            
创建日志(8192 个块)完成
写入超级块和文件系统账户统计信息: 已完成[root@localhost ~]# mkfs.ext4 /dev/sda2
mke2fs 1.46.5 (30-Dec-2021)
创建含有 524288 个块(每块 4k)和 131072 个inode的文件系统
文件系统UUID:29f9a1c4-a0e8-481e-9d78-97aab8d3a784
超级块的备份存储于下列块: 32768, 98304, 163840, 229376, 294912正在分配组表: 完成                            
正在写入inode表: 完成                            
创建日志(16384 个块)完成
写入超级块和文件系统账户统计信息: 已完成[root@localhost ~]# mkfs.xfs /dev/sda5
meta-data=/dev/sda5              isize=512    agcount=4, agsize=196608 blks=                       sectsz=512   attr=2, projid32bit=1=                       crc=1        finobt=1, sparse=1, rmapbt=0=                       reflink=1    bigtime=1 inobtcount=1 nrext64=0
data     =                       bsize=4096   blocks=786432, imaxpct=25=                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0, ftype=1
log      =internal log           bsize=4096   blocks=16384, version=2=                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0

2.将三个分区分别挂载到/dir1 、/dir2、/dir3

[root@localhost ~]# mkdir /dir{1..3}
[root@localhost ~]# mount /dev/sda1 /dir1
[root@localhost ~]# mount /dev/sda2 /dir2
[root@localhost ~]# mount /dev/sda5 /dir3

3.在第一个主分区中创建一个文件file1,内容为this is partition1。在第二个分区中创建一个文件为 file2,内容为this is partition2。在第三个分区中创建一个文件为file3,内容为this is partition3

[root@localhost ~]# touch /dir1/file1
[root@localhost ~]# touch /dir2/file2
[root@localhost ~]# touch /dir3/file3
[root@localhost ~]# echo 'this is partition1' > /dir1/file1
[root@localhost ~]# echo 'this is partition2' > /dir2/file2
[root@localhost ~]# echo 'this is partition3' > /dir3/file3

第十一章 网络管理

1.为网卡添加一个会话static,在此会话配置ip地址为x.x.x.123

[root@localhost ~]# nmcli connection add con-name static ipv4.addresses 192.168.121.123/24 ipv4.gateway 192.168.121.2 ipv4.dns 223.5.5.5 type ethernet 
连接 "static" (4805932f-b69f-4933-a267-605a37ec8aa4) 已成功添加。
[root@localhost ~]# nmcli connection
NAME    UUID                                  TYPE      DEVICE 
ens160  1bf78c95-4636-3ff8-bd6e-df777220c571  ethernet  ens160 
lo      4fb82628-860b-415a-a931-6ed6586f45f1  loopback  lo     
static  4805932f-b69f-4933-a267-605a37ec8aa4  ethernet  --     
[root@localhost ~]# nmcli connection up static ifname ens160
连接已成功激活(D-Bus 活动路径:/org/freedesktop/NetworkManager/ActiveConnection/3)
[root@localhost ~]# ip add
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00inet 127.0.0.1/8 scope host lovalid_lft forever preferred_lft foreverinet6 ::1/128 scope host valid_lft forever preferred_lft forever
2: ens160: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000link/ether 00:0c:29:b0:05:ff brd ff:ff:ff:ff:ff:ffaltname enp3s0inet 192.168.121.123/24 brd 192.168.121.255 scope global noprefixroute ens160valid_lft forever preferred_lft foreverinet 192.168.121.131/24 brd 192.168.121.255 scope global secondary dynamic noprefixroute ens160valid_lft 1789sec preferred_lft 1789secinet6 fe80::a688:dc57:96ac:683b/64 scope link noprefixroute valid_lft forever preferred_lft forever
[root@localhost ~]# nmcli connection modify static ipv4.method manual
[root@localhost ~]# nmcli connection up static ifname ens160

2.测试网络连通性,是否能ping通百度,并把百度首页文件下载下来

[obboda@localhost ~]$ wget www.baidu.com
--2024-10-16 15:52:53--  http://www.baidu.com/
正在解析主机 www.baidu.com (www.baidu.com)... 183.2.172.185, 183.2.172.42, 240e:ff:e020:9ae:0:ff:b014:8e8b, ...
正在连接 www.baidu.com (www.baidu.com)|183.2.172.185|:80... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:2381 (2.3K) [text/html]
正在保存至: “index.html”index.html             100%[==========================>]   2.33K  --.-KB/s  用时 0s      2024-10-16 15:52:58 (74.0 MB/s) - 已保存 “index.html” [2381/2381])[obboda@localhost ~]$ ll index.html 
-rw-r--r--. 1 obboda obboda 2381 10月 16 15:52 index.html

3.设置系统开机时,该网卡通过DHCP协议自动获取ip地址

[root@localhost ~]# nmcli connection modify static autoconnect yes ipv4.method auto
[root@localhost ~]# nmcli connection up static

第十二章 软件管理

1.挂载本地光盘,配置yum本地源为rhel9.repo

[root@localhost ~]# mount /dev/sr0 /mnt
[root@localhost ~]# vi /etc/yum.repos.d/rhel9.repo    # 添加内容
[root@localhost ~]# cat /etc/yum.repos.d/rhel9.repo
[RHEL9-BaseOS]
name=RHEL9-BaseOS
baseurl=file:///mnt/BaseOS
gpgcheck=0
[RHEL9-Appstream]
name=RHEL9-Appstream
baseurl=file:///mnt/AppStream
gpgcheck=0

2.通过yum安装httpd

[root@localhost ~]# yum install httpd
正在更新 Subscription Management 软件仓库。
无法读取客户身份本系统尚未在权利服务器中注册。可使用 subscription-manager 进行注册。Repository RHEL9-BaseOS is listed more than once in the configuration
Repository RHEL9-Appstream is listed more than once in the configuration
上次元数据过期检查:0:00:18 前,执行于 2024年10月16日 星期三 18时46分51秒。
软件包 httpd-2.4.57-6.el9.x86_64 已安装。
依赖关系解决。
==================================================================================================软件包                      架构              版本                    仓库                  大小
==================================================================================================
升级:httpd                       x86_64            2.4.62-1.el9            appstream             47 khttpd-core                  x86_64            2.4.62-1.el9            appstream            1.5 Mhttpd-filesystem            noarch            2.4.62-1.el9            appstream             13 khttpd-tools                 x86_64            2.4.62-1.el9            appstream             82 kmod_lua                     x86_64            2.4.62-1.el9            appstream             59 k事务概要
==================================================================================================
升级  5 软件包总下载:1.7 M
确定吗?[y/N]: y
下载软件包:
(1/5): httpd-filesystem-2.4.62-1.el9.noarch.rpm                    35 kB/s |  13 kB     00:00    
(2/5): httpd-2.4.62-1.el9.x86_64.rpm                              116 kB/s |  47 kB     00:00    
(3/5): mod_lua-2.4.62-1.el9.x86_64.rpm                            355 kB/s |  59 kB     00:00    
(4/5): httpd-tools-2.4.62-1.el9.x86_64.rpm                        346 kB/s |  82 kB     00:00    
(5/5): httpd-core-2.4.62-1.el9.x86_64.rpm                         1.9 MB/s | 1.5 MB     00:00    
--------------------------------------------------------------------------------------------------
总计                                                              2.2 MB/s | 1.7 MB     00:00     
运行事务检查
事务检查成功。
运行事务测试
事务测试成功。
运行事务准备中  :                                                                                   1/1 升级    : httpd-tools-2.4.62-1.el9.x86_64                                                  1/10 运行脚本: httpd-filesystem-2.4.62-1.el9.noarch                                             2/10 升级    : httpd-filesystem-2.4.62-1.el9.noarch                                             2/10 升级    : httpd-core-2.4.62-1.el9.x86_64                                                   3/10 升级    : mod_lua-2.4.62-1.el9.x86_64                                                      4/10 升级    : httpd-2.4.62-1.el9.x86_64                                                        5/10 运行脚本: httpd-2.4.62-1.el9.x86_64                                                        5/10 运行脚本: httpd-2.4.57-6.el9.x86_64                                                        6/10 清理    : httpd-2.4.57-6.el9.x86_64                                                        6/10 运行脚本: httpd-2.4.57-6.el9.x86_64                                                        6/10 清理    : mod_lua-2.4.57-6.el9.x86_64                                                      7/10 清理    : httpd-core-2.4.57-6.el9.x86_64                                                   8/10 清理    : httpd-filesystem-2.4.57-6.el9.noarch                                             9/10 清理    : httpd-tools-2.4.57-6.el9.x86_64                                                 10/10 运行脚本: httpd-2.4.62-1.el9.x86_64                                                       10/10 运行脚本: httpd-tools-2.4.57-6.el9.x86_64                                                 10/10 验证    : httpd-2.4.62-1.el9.x86_64                                                        1/10 验证    : httpd-2.4.57-6.el9.x86_64                                                        2/10 验证    : httpd-core-2.4.62-1.el9.x86_64                                                   3/10 验证    : httpd-core-2.4.57-6.el9.x86_64                                                   4/10 验证    : httpd-filesystem-2.4.62-1.el9.noarch                                             5/10 验证    : httpd-filesystem-2.4.57-6.el9.noarch                                             6/10 验证    : httpd-tools-2.4.62-1.el9.x86_64                                                  7/10 验证    : httpd-tools-2.4.57-6.el9.x86_64                                                  8/10 验证    : mod_lua-2.4.62-1.el9.x86_64                                                      9/10 验证    : mod_lua-2.4.57-6.el9.x86_64                                                     10/10 
已更新安装的产品。已升级:httpd-2.4.62-1.el9.x86_64                          httpd-core-2.4.62-1.el9.x86_64               httpd-filesystem-2.4.62-1.el9.noarch               httpd-tools-2.4.62-1.el9.x86_64              mod_lua-2.4.62-1.el9.x86_64                       完毕!

3.卸载httpd

[root@localhost ~]# yum remove httpd
正在更新 Subscription Management 软件仓库。
无法读取客户身份本系统尚未在权利服务器中注册。可使用 subscription-manager 进行注册。Repository RHEL9-BaseOS is listed more than once in the configuration
Repository RHEL9-Appstream is listed more than once in the configuration
依赖关系解决。
==================================================================================================软件包                     架构           版本                    仓库                      大小
==================================================================================================
移除:httpd                      x86_64         2.4.62-1.el9            @appstream                59 k
清除未被使用的依赖关系:apr                        x86_64         1.7.0-11.el9            @RHEL9-Appstream         289 kapr-util                   x86_64         1.6.1-23.el9            @RHEL9-Appstream         211 kapr-util-bdb               x86_64         1.6.1-23.el9            @RHEL9-Appstream          15 kapr-util-openssl           x86_64         1.6.1-23.el9            @RHEL9-Appstream          23 khttpd-core                 x86_64         2.4.62-1.el9            @appstream               4.7 Mhttpd-filesystem           noarch         2.4.62-1.el9            @appstream               464  httpd-tools                x86_64         2.4.62-1.el9            @appstream               199 kmod_http2                  x86_64         1.15.19-5.el9           @RHEL9-Appstream         385 kmod_lua                    x86_64         2.4.62-1.el9            @appstream               142 kredhat-logos-httpd         noarch         90.4-2.el9              @RHEL9-Appstream          12 k事务概要
==================================================================================================
移除  11 软件包将会释放空间:6.0 M
确定吗?[y/N]: y
运行事务检查
事务检查成功。
运行事务测试
事务测试成功。
运行事务准备中  :                                                                                   1/1 运行脚本: httpd-2.4.62-1.el9.x86_64                                                        1/11 删除    : httpd-2.4.62-1.el9.x86_64                                                        1/11 运行脚本: httpd-2.4.62-1.el9.x86_64                                                        1/11 删除    : mod_lua-2.4.62-1.el9.x86_64                                                      2/11 删除    : mod_http2-1.15.19-5.el9.x86_64                                                   3/11 删除    : redhat-logos-httpd-90.4-2.el9.noarch                                             4/11 删除    : httpd-core-2.4.62-1.el9.x86_64                                                   5/11 
警告:/etc/httpd/conf/httpd.conf 已另存为 /etc/httpd/conf/httpd.conf.rpmsave
警告:/etc/httpd/conf.d/userdir.conf 已另存为 /etc/httpd/conf.d/userdir.conf.rpmsave删除    : httpd-tools-2.4.62-1.el9.x86_64                                                  6/11 删除    : httpd-filesystem-2.4.62-1.el9.noarch                                             7/11 删除    : apr-util-1.6.1-23.el9.x86_64                                                     8/11 删除    : apr-util-bdb-1.6.1-23.el9.x86_64                                                 9/11 删除    : apr-1.7.0-11.el9.x86_64                                                         10/11 删除    : apr-util-openssl-1.6.1-23.el9.x86_64                                            11/11 运行脚本: apr-util-openssl-1.6.1-23.el9.x86_64                                            11/11 验证    : apr-1.7.0-11.el9.x86_64                                                          1/11 验证    : apr-util-1.6.1-23.el9.x86_64                                                     2/11 验证    : apr-util-bdb-1.6.1-23.el9.x86_64                                                 3/11 验证    : apr-util-openssl-1.6.1-23.el9.x86_64                                             4/11 验证    : httpd-2.4.62-1.el9.x86_64                                                        5/11 验证    : httpd-core-2.4.62-1.el9.x86_64                                                   6/11 验证    : httpd-filesystem-2.4.62-1.el9.noarch                                             7/11 验证    : httpd-tools-2.4.62-1.el9.x86_64                                                  8/11 验证    : mod_http2-1.15.19-5.el9.x86_64                                                   9/11 验证    : mod_lua-2.4.62-1.el9.x86_64                                                     10/11 验证    : redhat-logos-httpd-90.4-2.el9.noarch                                            11/11 
已更新安装的产品。已移除:apr-1.7.0-11.el9.x86_64                         apr-util-1.6.1-23.el9.x86_64                   apr-util-bdb-1.6.1-23.el9.x86_64                apr-util-openssl-1.6.1-23.el9.x86_64           httpd-2.4.62-1.el9.x86_64                       httpd-core-2.4.62-1.el9.x86_64                 httpd-filesystem-2.4.62-1.el9.noarch            httpd-tools-2.4.62-1.el9.x86_64                mod_http2-1.15.19-5.el9.x86_64                  mod_lua-2.4.62-1.el9.x86_64                    redhat-logos-httpd-90.4-2.el9.noarch           完毕!


http://www.ppmy.cn/ops/126331.html

相关文章

linux下使用systemctl设置开机自动运行程序

本文介绍在Linux下&#xff0c;使用systemctl设置开机自动运行程序&#xff0c;实现创建一个systemd服务单元文件&#xff0c;并启用该服务的方法。 1、创建.service文件 在/etc/systemd/system/目录下创建一个以.service结尾的文件&#xff0c;例如myapp.service&#xff1a…

文本生成视频技术:艺术与科学的交汇点

在人工智能技术的飞速发展下&#xff0c;文本生成视频&#xff08;Text-to-Video&#xff09;技术已经成为现实。这项技术能够根据文本描述生成相应的视频内容&#xff0c;极大地拓展了内容创作的边界。本文将从三个主要方面对文本生成视频技术进行深入探讨&#xff1a;技术能达…

请确保已在git上配置你的user.name和user.email

问题&#xff1a;使用vscode在远程服务器上暂存修改报错&#xff1a; 原因&#xff1a;未在远程服务器上配置该项目对应的git的username和useremail 解决方法&#xff1a; 在vscode中新建一个终端 命名&#xff1a; git config --global user.email "youexample.com&qu…

python爬虫实战案例——从移动端接口抓取微博评论,采用cookie登陆,数据存入excel表格,超详细(15)

文章目录 1、任务目标2、网页分析3、代码编写3.1 代码分析3.2 完整代码1、任务目标 1、目标网站:微博文章(https://m.weibo.cn/detail/4813628149072458),这是微博某一篇博文,用于本文测试 2、要求:爬取该博文下,所有一级评论和二级评论,以及每条评论的作者,最后保存至E…

Spring AI Java程序员的AI之Spring AI(一)

SpringAI 基础使用 前言Spring AIChatClientImageClientOpenAiAudioTranscriptionClientEmbeddingClient 总结 前言 Spring AI&#xff0c;听着名字就感觉很好使用&#xff0c;快速上手&#xff0c;虽然功能没有太完善&#xff0c;但是社区活跃度很高&#xff0c;可以看看源码…

PG 17 增量备份功能介绍

背景 PG 17 新增了增量备份功能&#xff0c;可以通过 pg_basebackup --incrementalPATH_TO_MANIFEST 命令进行增量备份。 官方文档&#xff1a;https://www.postgresql.org/docs/current/app-pgbasebackup.html 在先前版本&#xff0c;其实我们也可以利用 WAL 进行增量备份&…

mysql-数据库的操作

目录 认识数据库的基本操作 1、创建数据库 &#xff08;1&#xff09;校验集、编码集 &#xff08;2&#xff09;指定字符集和校验集创建数据库 2、展示所建立的数据库&#xff1a; 3、查看自己当前数据库&#xff1a; 4、修改数据库 5、删除数据库 6、库的备份与恢复…

java HashMap源码剖析

HashMap 是 Java 集合框架中的一个重要类&#xff0c;它基于哈希表实现&#xff0c;提供了快速的插入、删除和查找操作。 以下是一些关键点&#xff1a; 序列化&#xff1a;HashMap 类实现了 Serializable 接口&#xff0c;这意味着它可以被序列化和反序列化。 初始容量和负载…