第三次交卷.

1、RPM软件管理
   1> 通过rpm安装vsftpd软件。

[root@localhost ~]# find / -name  "vsftpd*"
/usr/lib/python3.9/site-packages/sos/report/plugins/__pycache__/vsftpd.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/sos/report/plugins/__pycache__/vsftpd.cpython-39.pyc
/usr/lib/python3.9/site-packages/sos/report/plugins/vsftpd.py
/usr/share/doc/python3-pycurl/tests/vsftpd.conf
/mnt/AppStream/Packages/vsftpd-3.0.3-49.el9.x86_64.rpm
[root@localhost ~]# rpm -ivh /mnt/AppStream/Packages/vsftpd-3.0.3-49.el9.x86_64.rpm
warning: /mnt/AppStream/Packages/vsftpd-3.0.3-49.el9.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Verifying...                          ################################# [100%]
Preparing...                          ################################# [100%]
Updating / installing...
   1:vsftpd-3.0.3-49.el9              ################################# [100%]

   2> 查询vsftpd软件包的信息。

[root@localhost ~]# rpm -qi vsftpd
Name        : vsftpd
Version     : 3.0.3
Release     : 49.el9
Architecture: x86_64
Install Date: Tue 28 Mar 2023 04:11:37 PM CST
Group       : Unspecified
Size        : 356096
License     : GPLv2 with exceptions
Signature   : RSA/SHA256, Wed 24 Nov 2021 07:31:28 PM CST, Key ID 199e2f91fd431d51
Source RPM  : vsftpd-3.0.3-49.el9.src.rpm
Build Date  : Tue 16 Nov 2021 07:17:01 PM CST
Build Host  : x86-vm-55.build.eng.bos.redhat.com
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
Vendor      : Red Hat, Inc.
URL         : https://security.appspot.com/vsftpd.html
Summary     : Very Secure Ftp Daemon
Description :
vsftpd is a Very Secure FTP daemon. It was written completely from
scratch.


   3> 卸载软件包vsftpd。

[root@localhost ~]# rpm -evh vsftpd
Preparing...                          ################################# [100%]
Cleaning up / removing...
   1:vsftpd-3.0.3-49.el9              ################################# [100%]
2、YUM软件管理
   1> 挂载本地光盘,配置yum源为rhel.repo。

[root@localhost ~]# mount /dev/cdrom /media
[root@localhost ~]# vim /etc/yum.repos.d/rhel.repo 
2> 通过yum来安装traceroute。

[root@localhost yum.repos.d]# yum install traceroute
Updating Subscription Management repositories.
Unable to read consumer identity
 
This system is not registered with an entitlement server. You can use subscription-manager to register.
 
appstream-rhel9                                                                                                                                                                   3.1 MB/s | 3.2 kB     00:00    
baseos-rhel9                                                                                                                                                                      2.7 MB/s | 2.7 kB     00:00    
Dependencies resolved.
==================================================================================================================================================================================================================
 Package                                            Architecture                                   Version                                                   Repository                                      Size
==================================================================================================================================================================================================================
Installing:
 traceroute                                         x86_64                                         3:2.1.0-16.el9                                            baseos                                          61 k
 
Transaction Summary
==================================================================================================================================================================================================================
Install  1 Package
 
Total size: 61 k
Installed size: 108 k
Is this ok [y/N]: y
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                                                          1/1 
  Installing       : traceroute-3:2.1.0-16.el9.x86_64                                                                                                                                                         1/1 
  Running scriptlet: traceroute-3:2.1.0-16.el9.x86_64                                                                                                                                                         1/1 
  Verifying        : traceroute-3:2.1.0-16.el9.x86_64                                                                                                                                                         1/1 
Installed products updated.
 
Installed:
  traceroute-3:2.1.0-16.el9.x86_64                                                                                                                                                                                
 
Complete!

   3> 使用yum查询ifconfig命令是由那个软件包提供的。

[root@localhost yum.repos.d]# yum whatprovides ifconfig
Updating Subscription Management repositories.
Unable to read consumer identity
 
This system is not registered with an entitlement server. You can use subscription-manager to register.
 
Last metadata expiration check: 0:01:21 ago on Tue 28 Mar 2023 04:59:04 PM CST.
net-tools-2.0-0.62.20160912git.el9.x86_64 : Basic networking tools
Repo        : @System
Matched from:
Filename    : /usr/sbin/ifconfig
 
net-tools-2.0-0.62.20160912git.el9.x86_64 : Basic networking tools
Repo        : baseos
Matched from:
Filename    : /usr/sbin/ifconfig


   4> 卸载软件包httpd。

root@localhost yum.repos.d]# yum remove -y traceroute
Updating Subscription Management repositories.
Unable to read consumer identity
 
This system is not registered with an entitlement server. You can use subscription-manager to register.
 
Dependencies resolved.
==================================================================================================================================================================================================================
 Package                                            Architecture                                   Version                                                  Repository                                       Size
==================================================================================================================================================================================================================
Removing:
 traceroute                                         x86_64                                         3:2.1.0-16.el9                                           @baseos                                         108 k
 
Transaction Summary
==================================================================================================================================================================================================================
Remove  1 Package
 
Freed space: 108 k
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                                                          1/1 
  Erasing          : traceroute-3:2.1.0-16.el9.x86_64                                                                                                                                                         1/1 
  Running scriptlet: traceroute-3:2.1.0-16.el9.x86_64                                                                                                                                                         1/1 
  Verifying        : traceroute-3:2.1.0-16.el9.x86_64                                                                                                                                                         1/1 
Installed products updated.
 
Removed:
  traceroute-3:2.1.0-16.el9.x86_64                                                                                                                                                                                
 
Complete!
 3、通过pgrep和pidof命令查看sshd服务的进程号

[root@localhost ~]# pgrep -l sshd
1060 sshd
1925 sshd
1954 sshd
[root@localhost ~]# pidof sshd
1954 1925 1060
配置网络:为网卡添加一个本网段IPV4地址,x.x.x.123,并启用,然后在阿里镜像站GUN里,下载wget2的包

[root@localhost ~]# nmcli connection modify ens160 ipv4.method manual ipv4.addresses 192.168.72.123/24 ipv4.gateway 192.168.72.2 ipv4.dns 114.114.114.114 autoconnect yesal ipv4.addresses 192.168.72.123/24 ipv4.gateway 192.168.72.2 ipv4.
[root@localhost ~]# wget https://mirrors.aliyun.com/gnu/wget/wget2-latest.tar.gz
--2023-03-28 17:24:20--  https://mirrors.aliyun.com/gnu/wget/wget2-latest.tar.gz
Resolving mirrors.aliyun.com (mirrors.aliyun.com)... 140.249.32.203, 140.249.32.207, 140.249.32.205, ...
Connecting to mirrors.aliyun.com (mirrors.aliyun.com)|140.249.32.203|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3780748 (3.6M) [application/octet-stream]
Saving to: ‘wget2-latest.tar.gz’
 
wget2-latest.tar.gz                                  100%[====================================================================================================================>]   3.61M   443KB/s    in 8.4s    
 
2023-03-28 17:24:29 (439 KB/s) - ‘wget2-latest.tar.gz’ saved [3780748/3780748]
 
[root@localhost ~]# ls
1  a  anaconda-ks.cfg  files  test  tr.txt  wget2-latest.tar.g

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值