


Graphical tutorial on how to view YUM's installation directory code on Linux
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: 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.
#[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 ~]#
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!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



The key differences between CentOS and Ubuntu are: origin (CentOS originates from Red Hat, for enterprises; Ubuntu originates from Debian, for individuals), package management (CentOS uses yum, focusing on stability; Ubuntu uses apt, for high update frequency), support cycle (CentOS provides 10 years of support, Ubuntu provides 5 years of LTS support), community support (CentOS focuses on stability, Ubuntu provides a wide range of tutorials and documents), uses (CentOS is biased towards servers, Ubuntu is suitable for servers and desktops), other differences include installation simplicity (CentOS is thin)

CentOS installation steps: Download the ISO image and burn bootable media; boot and select the installation source; select the language and keyboard layout; configure the network; partition the hard disk; set the system clock; create the root user; select the software package; start the installation; restart and boot from the hard disk after the installation is completed.

CentOS has been discontinued, alternatives include: 1. Rocky Linux (best compatibility); 2. AlmaLinux (compatible with CentOS); 3. Ubuntu Server (configuration required); 4. Red Hat Enterprise Linux (commercial version, paid license); 5. Oracle Linux (compatible with CentOS and RHEL). When migrating, considerations are: compatibility, availability, support, cost, and community support.

How to use Docker Desktop? Docker Desktop is a tool for running Docker containers on local machines. The steps to use include: 1. Install Docker Desktop; 2. Start Docker Desktop; 3. Create Docker image (using Dockerfile); 4. Build Docker image (using docker build); 5. Run Docker container (using docker run).

Docker uses Linux kernel features to provide an efficient and isolated application running environment. Its working principle is as follows: 1. The mirror is used as a read-only template, which contains everything you need to run the application; 2. The Union File System (UnionFS) stacks multiple file systems, only storing the differences, saving space and speeding up; 3. The daemon manages the mirrors and containers, and the client uses them for interaction; 4. Namespaces and cgroups implement container isolation and resource limitations; 5. Multiple network modes support container interconnection. Only by understanding these core concepts can you better utilize Docker.

After CentOS is stopped, users can take the following measures to deal with it: Select a compatible distribution: such as AlmaLinux, Rocky Linux, and CentOS Stream. Migrate to commercial distributions: such as Red Hat Enterprise Linux, Oracle Linux. Upgrade to CentOS 9 Stream: Rolling distribution, providing the latest technology. Select other Linux distributions: such as Ubuntu, Debian. Evaluate other options such as containers, virtual machines, or cloud platforms.

Troubleshooting steps for failed Docker image build: Check Dockerfile syntax and dependency version. Check if the build context contains the required source code and dependencies. View the build log for error details. Use the --target option to build a hierarchical phase to identify failure points. Make sure to use the latest version of Docker engine. Build the image with --t [image-name]:debug mode to debug the problem. Check disk space and make sure it is sufficient. Disable SELinux to prevent interference with the build process. Ask community platforms for help, provide Dockerfiles and build log descriptions for more specific suggestions.

VS Code system requirements: Operating system: Windows 10 and above, macOS 10.12 and above, Linux distribution processor: minimum 1.6 GHz, recommended 2.0 GHz and above memory: minimum 512 MB, recommended 4 GB and above storage space: minimum 250 MB, recommended 1 GB and above other requirements: stable network connection, Xorg/Wayland (Linux)
