I. BACKGROUND
Because recently wanted to explore some of the Linux under the things, began to play the Linux system, in the process of installing the software has a lot of puzzled and confused, and now finally figure out how the specific installation procedures and procedures, first share to you at the same time also convenient for reviewing review.
Ii. Basic Overview
1.RPM
RedHat Package Manager short name, which is the RedHat pack manager.
Install the software to Liunx as a database record.
The packages are pre-compiled and packaged into a RPM-mechanism file, similar to the installation program for Windows.
Software information is recorded in the local database, easy to query, upgrade, uninstall.
Custom parameters and settings are not allowed and are more restrictive.
2.SRPM
source rpm, with source rpm package with extension SRC.RMP.
Can not be installed directly, it needs to be compiled and then installed.
You can modify the parameter file custom configuration item.
similar to RPM.
3.YUM
Yellow Dog updater,modified for short, based on RPM package management.
The ability to automatically download RPM packages from the specified server and install them, automatically handle dependencies, and install all dependent packages at once, without the hassle of downloading and installing them over and over again.
Simple and convenient to use.
Iii. Introduction of installation Method
1. Install Linux software by source mode
Download source package to/USR/LOCAL/SRC
Unzip the source package
View install and Readme file installation dependencies software
./configure installing software to a specific location
Make clean clear the target profile
Make compilation
Make install
Modify Path
Install Linux software in 2.rpm mode
Identify the path or website where the package is installed (find/dirname–name ' name* ')
Find out if RPM-QA has been installed in the RPM library | grep ' Softwarename '
Installing rpm–ivh/path/to/file.rpm
RPM Common parameters
-I: Installation
-U: After the software is installed if not installed, if installed and the version is older update
-F: After the software is not installed, do not install, if installed and the version is older update
-V: View detailed installation Information
-H: View installation progress
RPM Common long options
--nodeps: Ignore Dependency enforcement installation
--replacepkgs: Install the installed software files repeatedly
--force: Forced installation
--nosignature: Ignoring digital signature authentication
--prefix: Specifying the installation path
--relocate: Changing the installation path
--justdb: Perfect rpm database file for this software archive
--initdb: Initializing the RPM database
--rebuilddb: Rebuilding the RPM database
RPM Query: RPM [options] [filename]
-Q: Query whether the following software is installed
-QA: Lists all the software that is installed on this system
-QL: Lists the full list of all files generated after the installation of the software
-QD: Lists the full list of all man files generated after the installation of the software
-QF: Lists the installed software that the file belongs to
-qi: List details of the software
-QR: Lists files related to dependent software for the software
-P: Not installed Packages
-E: Remove a software (to start from the top level of dependencies)
RPM Upgrade: RPM–V[APF] [Filename/dirname]
-V: followed by the software name, showing the changed files contained in the software
-va: List all changed files on the system
-VF: List If a file has been altered
RPM Digital Signature Verification process
Get the Public key installation package
Install public key RPM--import/path/to/gpg-key
Get gpg-pubkey* file with signature information
When the original software is installed, the RPM instruction reads the signature information and compares it to the imported public key. Install if same, not allowed for different installations
3.SRPM Installing Linux Software
To compile the source package: rpmbuild [Options]
--rebuild: Compile the ***.src.rpm source code and package it into RPM package
--recompile: Compile, Package, and install the ***.src.rpm source code
-BA: Compiles data and produces both RPM and srpm
-BB: Compiles data only to the process rpm file
Note: srpm Pack rebuild built RPM package, inside there will be a *.spec configuration file
The following steps are the same as rpm
4.YUM Installing the Linux software
Configuring the Yum Warehouse/etc/yum.repo.d/*
Connect to Network
Yum Install Softwarename
Yum clean all deletes data from all Yum repositories
Query: yum[list|info|search|provides|whatprovides] Parameter
Search: Query the name or description of a program (yum search MySQL)
List: List all currently managed software and versions (RPM-QA)
Info similar to list, querying the software for features, Release notes (Rpm-qai)
Provides: Querying the owning software via file (RPM-QF)
Install, upgrade, yum [Install|update] program name
Install: Installing the Software
Update: Upgrade the software, do not specify a name to upgrade the entire system
Uninstall program: Yum[remove] Program name
Configuration of Yum
/etc/yum.repos.d/centos-base.repo
Yum Clean[package|headers|all]
/var/cache/yum
Iv. Summary
For software technology, I think the most important thing is the spirit of sharing and open source, because this and sharing the same principle of happiness, if you have a technology, I have a technology, then we share with each other, everyone has become a two-point technology, not only not reduced, but increased, this is not what we want to see? Why not? That's why I like to take some time off to write technical blogs tirelessly.
Learn four tricks to make it easy to install your program under Linux