Linux如何查看YUM的安装目录
来源:互联网 发布:网络言论自由弊端事例 编辑:程序博客网 时间:2024/06/05 16:39
转载自:Linux如何查看YUM的安装目录
Linux下如何查看使用YUM安装过的包的安装路径呢? 在搞清楚这个问题前,我们先来了解一下YUM。 YUM(全称为 Yellow dog Updater, Modified)是一个在Fedora和RedHat以及CentOS中的Shell前端软件包管理器。基于RPM包管理,能够从指定的服务器自动下载RPM包并且安装,可以自动处理依赖性关系,并且一次安装所有依赖的软件包,避免了手动安装的麻烦(寻找资源、下载;放到指定目录安装;处理依赖关系并下载依赖关系的包进行安装)。所以用yum安装,实质上是用RPM安装,所以RPM查询信息的指令都可用。
如果使用RPM安装了一些包,一般来说,RPM默认安装路径如下:
Directory
Contents of Directory
/etc
一些配置文件的目录,例如/etc/init.d/mysql
/usr/bin
一些可执行文件
/usr/lib
一些程序使用的动态函数库
/usr/share/doc
一些基本的软件使用手册与帮助文档
/usr/share/man
一些man page文件
以MySQL的安装为例,我们使用RPM方式安装了MySQL的两个包,其实rpm有两个参数-l和-c可以帮助我们查看具体的安装路径。
-l 显示软件包中的文件列表
-c 显示配置文件列表
那么我们可以使用“rpm -ql 包名”来查看具体的安装路径。如下所示:
[root@DB-Server ~]# rpm -qa | grep -i mysql
MySQL-server-advanced-5.6.20-1.rhel5
MySQL-client-advanced-5.6.20-1.rhel5
[root@DB-Server ~]# rpm -ql MySQL-client-advanced-5.6.20-1.rhel5
/usr/bin/msql2mysql
/usr/bin/mysql
/usr/bin/mysql_config_editor
/usr/bin/mysql_find_rows
/usr/bin/mysql_waitpid
/usr/bin/mysqlaccess
/usr/bin/mysqlaccess.conf
/usr/bin/mysqladmin
/usr/bin/mysqlbinlog
/usr/bin/mysqlcheck
/usr/bin/mysqldump
/usr/bin/mysqlimport
/usr/bin/mysqlshow
/usr/bin/mysqlslap
/usr/share/man/man1/msql2mysql.1.gz
/usr/share/man/man1/mysql.1.gz
/usr/share/man/man1/mysql_config_editor.1.gz
/usr/share/man/man1/mysql_find_rows.1.gz
/usr/share/man/man1/mysql_waitpid.1.gz
/usr/share/man/man1/mysqlaccess.1.gz
/usr/share/man/man1/mysqladmin.1.gz
/usr/share/man/man1/mysqlbinlog.1.gz
/usr/share/man/man1/mysqlcheck.1.gz
/usr/share/man/man1/mysqldump.1.gz
/usr/share/man/man1/mysqlimport.1.gz
/usr/share/man/man1/mysqlshow.1.gz
/usr/share/man/man1/mysqlslap.1.gz
[root@DB-Server tmp]# rpm -ql MySQL-server-advanced-5.6.20-1.rhel5
/etc/init.d/mysql
/etc/logrotate.d/mysql
/etc/my.cnf
/usr/bin/innochecksum
/usr/bin/my_print_defaults
/usr/bin/myisam_ftdump
/usr/bin/myisamchk
/usr/bin/myisamlog
/usr/bin/myisampack
/usr/bin/mysql_convert_table_format
/usr/bin/mysql_fix_extensions
/usr/bin/mysql_install_db
/usr/bin/mysql_plugin
/usr/bin/mysql_secure_installation
/usr/bin/mysql_tzinfo_to_sql
/usr/bin/mysql_upgrade
/usr/bin/mysql_zap
/usr/bin/mysqlbug
/usr/bin/mysqld_multi
/usr/bin/mysqld_safe
/usr/bin/mysqldumpslow
/usr/bin/mysqlhotcopy
/usr/bin/mysqltest
.....................................................
[root@DB-Server ~]# rpm -qc MySQL-server-advanced-5.6.20-1.rhel5
/etc/logrotate.d/mysql
/etc/my.cnf
[root@DB-Server ~]#
在MySQL的官方文档,你可以看到RPM包所在的安装目录。我们使用rpm -ql 对比验证了一下,基本都OK,但是很奇怪的是,在上面这个版本中,我没有找到/etc/my.cnf,而是/usr/my.cnf
MySQL 5.6
Directory
Contents of Directory
/usr/bin
Client programs and scripts
/usr/sbin
The mysqld server
/var/lib/mysql
Log files, databases
/var/lib/mysql-files
Value of secure_file_priv
/usr/share/info
MySQL manual in Info format
/usr/share/man
Unix manual pages
/usr/include/mysql
Include (header) files
/usr/lib/mysql
Libraries
/usr/share/mysql
Miscellaneous support files, including error messages, character set files, sample configuration files, SQL for database installation
/usr/share/sql-bench
Benchmarks
MySQL 5.7
Files or Resources
Location
Client programs and scripts
/usr/bin
mysqld server
/usr/sbin
Configuration file
/etc/my.cnf
Data directory
/var/lib/mysql
Error log file
For RHEL, Oracle Linux, CentOS or Fedora platforms:/var/log/mysqld.log
For SLES: /var/log/mysql/mysqld.log
Value of secure_file_priv
/var/lib/mysql-files
System V init script
For RHEL, Oracle Linux, CentOS or Fedora platforms: /etc/init.d/mysqld
For SLES: /etc/init.d/mysql
Systemd service
For RHEL, Oracle Linux, CentOS or Fedora platforms: mysqld
For SLES: mysql
Pid file
/var/run/mysql/mysqld.pid
Socket
/var/lib/mysql/mysql.sock
Keyring directory
/var/lib/mysql-keyring
Unix manual pages
/usr/share/man
Include (header) files
/usr/include/mysql
Libraries
/usr/lib/mysql
Miscellaneous support files (for example, error messages, and character set files)
/usr/share/mysql
另外一台测试服务器,使用yum安装了mysql-community-server-5.7.18,测试验证发现又是正常。 暂时不清楚这个细节问题。
- Linux如何查看YUM的安装目录
- 如何查看yum安装的软件被安装到了哪个目录
- 如何查看yum安装的软件被安装到了哪个目录
- 如何查看yum安装的软件路径
- 如何查看yum安装的软件路径
- linux 查看Yum包安装的位置
- linux如何安装yum
- linux查看软件的安装目录
- 查看Yum安装的路径
- linux如何查看“/”目录属性
- linux 查看 apt-get 安装的软件的安装目录
- linux查看程序安装目录
- linux 查看软件安装目录
- linux查看JDK安装目录
- linux查看服务安装目录
- 在linux下如何使用yum查看安装了哪些软件包
- 如何查看yum安装的软件路径_用yum查询想安装的软件_yum解析
- ubuntu下如何查看软件的版本以及安装目录
- 八.SpringBoot集成实例系列-持久化jpa
- 如何安装WindowsBuilder插件
- 高德地图Key添加之SHA1
- AJAX之利用时间戳解决缓存问题
- 使用Unity实现A*寻路算法
- Linux如何查看YUM的安装目录
- win10 安装VMware Workstation Pro 14出现无法连接 MKS: 套接字连接尝试次数太多;正在放弃.
- Android开发中如何使用抓包工具Fiddler更改后台接口数据
- 项目部署到阿里云登录页面图形验证码乱码问题的解决办法
- 文件上传进度条显示
- Log4j2中RollingFile的文件滚动更新机制 一、什么是RollingFile RollingFileAppender是Log4j2中的一种能够实现日志文件滚动更新(rollover)的
- hdoj 1005 number sequence(找规律)
- 众数
- Linux进程间通信——使用信号量