Home  >  Article  >  Operation and Maintenance  >  Graphical tutorial on how to view YUM's installation directory code on Linux

Graphical tutorial on how to view YUM's installation directory code on Linux

黄舟
黄舟Original
2017-06-05 10:25:462849browse

LinuxHow to check the installation path of the package installed using YUM? Before clarifying this issue, let's first understand YUM. YUM (full name Yellow dog Updater, Modified) is a Shell front-end package manager in Fedora, RedHat and CentOS. Based on RPM package management, it can automatically download and install RPM packages from designated servers. It can automatically handle dependencies and install all dependent software packages at once, avoiding the trouble of manual installation (searching for resources, downloading; placing them in the designated directory for installation). ; Process dependencies and download dependency packages for installation). Therefore, installing with yum is essentially installing with RPM, so the instructions for RPM to query information are available.

If used RPM installs some packages. Generally speaking, the default installation path of RPM is as follows:

#Directory

Contents of Directory

##/etc

##Some configuration Directory of file , such as /etc/init.d/mysql

/usr/bin

Some executable files

##/usr/lib

Dynamic functions used by some programs Library

##/usr/share/doc

##Some basic software manuals and Help documentation

#/usr/share/man

Some

man pageFile

##Taking the installation of MySQL as an example, we installed MySQL using RPM The two packages, in fact, rpm has two parameters -l and -c that can help us check the specific installation path.

#-l Display the file list in the package

-c Display the configuration file list

## Then we can use "rpm -ql Package name" to view the specific installation path. As follows:

 

Graphical tutorial on how to view YUMs installation directory code on Linux

 

 

[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
.....................................................


 

Graphical tutorial on how to view YUMs installation directory code on Linux

 

[root@DB-Server ~]# rpm -qc MySQL-server-advanced-5.6.20-1.rhel5
/etc/logrotate.d/mysql
/etc/my.cnf
[root@DB-Server ~]#

 

In the official MySQL documentation, you can see the installation directory where the RPM package is located. We used rpm -ql to compare and verify, and it was basically OK. But the strange thing is that in the above version, I did not find /etc/my.cnf, but /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

##Another test server, using yum to install mysql-community- server-5.7.18, the test and verification found that it is normal again. I don’t know the details yet.

Graphical tutorial on how to view YUMs installation directory code on Linux

#

The above is the detailed content of Graphical tutorial on how to view YUM's installation directory code on Linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn