rpm常用用法

版权声明:20180913@wx:wenhs5479 https://blog.csdn.net/wenhs5479/article/details/82850857

1.下载一个centos6平台的vsftpd 包和httpd 包

wget https://mirrors.aliyun.com/centos/6.10/os/x86_64/Packages/vsftpd-2.2.2-24.el6.x86_64.rpm

wget https://mirrors.aliyun.com/centos/6.10/os/x86_64/Packages/httpd-2.2.15-69.el6.centos.x86_64.rpm

在这里插入图片描述

2.显示vsftpd包的安装进度

rpm -ih vsftpd-2.2.2-24.el6.x86_64.rpm

在这里插入图片描述

3.显示卸载vsftpd包的进度

rpm -eh vsftpd

在这里插入图片描述

4.删除vsftpd包的配置文件,然后使用rpm 命令恢复

rm -rf /etc/vsftpd/vsftpd.conf
ls  /etc/vsftpd/
rpm -ih --force vsftpd-2.2.2-24.el6.x86_64.rpm
ls  /etc/vsftpd/

在这里插入图片描述

5.查询vsftpd 包的所有文件

rpm -qlp vsftpd-2.2.2-24.el6.x86_64.rpm

在这里插入图片描述

6.查询vsftpd 包的帮助文档有哪些?

rpm -qpR vsftpd-2.2.2-24.el6.x86_64.rpm

在这里插入图片描述

7.查询vsftpd 包的安装卸载脚本

rpm -q --scripts vsftpd

在这里插入图片描述

8.检测httpd 包是否可以安装

rpm -ivh httpd-2.2.15-69.el6.centos.x86_64.rpm --test

在这里插入图片描述

9.安装httpd 包

rpm -ivh --force --nodeps httpd-2.2.15-69.el6.centos.x86_64.rpm

在这里插入图片描述

10.卸载httpd 包

rpm -evh httpd --nodeps

在这里插入图片描述

11.查询httpd 依赖的文件

rpm -qRp httpd-2.2.15-69.el6.centos.x86_64.rpm

在这里插入图片描述

12.运行vsftp 和 httpd

service vsftpd restart

service httpd restart      失败:缺少依赖关系

在这里插入图片描述

13.查询httpd 的安装卸载脚本

rpm -q --scripts httpd

在这里插入图片描述

14.查看httpd 包的详细信息

rpm -qi httpd

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/wenhs5479/article/details/82850857