yum-用rpm查看软件是否安装以及安装目录

用rpm 安装软件  rpm -ivh  xxxx.rpm    软件名xxx要带.rpm 后缀
用rpm查看软件目录   rpm -ql  xxxx     软件名xxx不要带.rpm 后缀


yum list 《安装包》 其实是 查看 本地和网络 是否存在,两边都在看的。

利用 yum list installed 其实 也可以查看 本地安装 哪些 软件

[root@testdb ~]# yum list installed | grep mysql
mysql-community-client.x86_64 5.7.21-1.el7 installed
mysql-community-common.x86_64 5.7.21-1.el7 installed
mysql-community-libs.x86_64 5.7.21-1.el7 installed
mysql-community-libs-compat.x86_64 5.7.21-1.el7 installed
mysql-community-server.x86_64 5.7.21-1.el7 installed
mysql57-community-release.noarch el7-10 @mysql57-community
php71w-mysql.x86_64 7.1.11-1.w7 @webtatic
[root@testdb ~]#
# 查看 nginx 是否已经安装
sh-4.2# rpm -qa | grep -i nginx
nginx-1.12.2-1.el7_4.ngx.x86_64
# 查看 具体 软件名 的安装目录
sh-4.2# rpm -ql nginx-1.12.2-1.el7_4.ngx.x86_64
/etc/logrotate.d/nginx
/etc/nginx
/etc/nginx/conf.d
/etc/nginx/conf.d/default.conf
/etc/nginx/fastcgi_params
/etc/nginx/koi-utf
/etc/nginx/koi-win
/etc/nginx/mime.types
/etc/nginx/modules
/etc/nginx/nginx.conf
/etc/nginx/scgi_params
/etc/nginx/uwsgi_params
/etc/nginx/win-utf
/etc/sysconfig/nginx
/etc/sysconfig/nginx-debug
/usr/lib/systemd/system/nginx-debug.service
/usr/lib/systemd/system/nginx.service
/usr/lib64/nginx
/usr/lib64/nginx/modules
/usr/libexec/initscripts/legacy-actions/nginx
/usr/libexec/initscripts/legacy-actions/nginx/check-reload
/usr/libexec/initscripts/legacy-actions/nginx/upgrade
/usr/sbin/nginx
/usr/sbin/nginx-debug
/usr/share/doc/nginx-1.12.2
/usr/share/doc/nginx-1.12.2/COPYRIGHT
/usr/share/man/man8/nginx.8.gz
/usr/share/nginx
/usr/share/nginx/html
/usr/share/nginx/html/50x.html
/usr/share/nginx/html/index.html
/var/cache/nginx
/var/log/nginx
sh-4.2#
0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments