Linux software package management, linux software package
Linux software package management
There are two main types of Linux software package management: Binary Package management and source code package management.
- Install
-- Ivh:-v,-vv,-vvv: the installation information displayed in sequence is detailed.
-- Nodeps: Ignore the package dependency and install it directly.
-- Replacepkgs: reinstall
-- Test: test the installation without executing the real installation process.
-- Force: force Installation
-U: if an earlier version of the package has been installed, upgrade the package. Otherwise, install the package.
-F: if an earlier version of the package has been installed, upgrade the package. Otherwise, the package is not installed.
-- Oldpackage: downgrade Installation
Note:: Do not upgrade the kernel package: linux supports coexistence of multiple versions of the kernel, so you can directly install the new version of the kernel
Instance:
When installing a package, this package may depend on other packages. The dependent package must be resolved before installation. Of course, you can also use the-nodeps option to force
But it is not recommended to install it like this, because this package may not be available after installation.
- Query
For the installed package to query its installation information, there are the following search parameters
1. query the Installed Package-qa
2. query Brief description of a package-qi
3. query the list of all files generated after a package is installed-ql
4. query the list of all configuration files generated after a package is installed:-qc
5. query the list of all help files generated after a package is installed:-qd
6. query the changelog list information that changes with version when a package is created: rpm-q -- changelog PACKAGE_NAME
7. query the capabilities rpm-q -- provides PACKAGE_NAME provided by a package
8. query the capabilities rpm-q -- requires PACKAGE_NAME on which a package depends
9. query the package generated by which a file is installed: rpm-qf/path/to/somefile
10. query uninstalled package information-p, which can be used together with other options, such as-qpl,-qpc...
For example:
- Uninstall
Rpm-e [-- nodeps] pack_name, for example
[Root @ steve data] # rpm-e rpc2
Note that if the package is dependent on other packages, you can use -- nodeps to forcibly uninstall the package.
The source code package of Apr is used as an example. Download the source code package before compilation and installation, and install the compiling environment. Generally, install "Development Tools" and "Server Platform Development"
[Root @ steve data] # yum grouplist "Development Tools" "Server Platform Development"
You can use-help to view the installation options.
To install apr in the/usr/bin/apr directory. You can specify any directory. If an error occurs during the compilation process, follow the prompts and proceed to the next step after resolving the error.
4. The above section briefly introduces the management of centos software packages.