First, source code control
The vast majority of open source software is published directly in the source code form, and is generally packaged as tar.gz Archive compressed files. The program source code needs to be compiled into a binary executable file before it can be run in use. The basic compilation process for the source code is:
- ./configure: Run the command after decompression, which primarily checks the compilation environment, the associated library files, and configuration parameters and generates makefile
- Make: Compile the source code to generate the executable file
- Make install: Installs the resulting executable file to the computer
The source code form of the software is cumbersome to use, but the compatibility and controllability is better. and open source software will generally use a lot of other open source software features, so open source software will have a lot of dependencies (using a software need to install other software first).
Second, RPM (RPM Package MANAGER,RPM Pack manager)
The advantage of installing software in source form is that it is suitable for all systems, customizable, and the disadvantages are complex operations, long compilation times, and very easy errors. For ease of use, Erik Troan and Marc Ewing developed rpm (RPM Package manager,rpm Pack manager), and RPM was first applied in RedHat (Red Hat).
1. Design goals
RPM simplifies the installation management of open source software by compiling source code into executables based on a specific platform system and saving dependencies. RPM is designed with the following objectives:
- Easy to use
- Publish with a single package format file (. rpm file)
- Can be upgraded
- Tracking software Dependencies
- Basic Information Inquiry
- Software validation Features
- Multi-platform Support
2. Naming conventions
packagename-1.2.0-30. el6. x86_64. rpm
( package Name - version number - operating system - hardware platform )
which
Operating system: EL6 represents RedHat 6.x or CentOS 6.x operating system.
Hardware platform: x86_64 represents a 64-bit platform, I386 represents a 32-bit platform, noarch means that no specific hardware platform (cross-platform) is required.
3. Basic commands
Installation package:
Installation package: Rpm-i packagename.rpm
To uninstall a package:
RPM-E PackageName
Upgrade Package:
Rpm-u packagename-new.rpm
Install via HTTP, FTP protocol:
RPM-IVH http://www.domainname.com/packagename.rpm
Common parameters:
-V Show details -H Show progress Bar-I install package-e Uninstall Package -u update (upgrade) package-Q query-a query all installed packages-I display package information-H Take hash (hash)-F query file belongs to which package -P does not install package information-L lists the files in the package
Third, RPM query
RPM-QA list all installed RPM Packages Rpm-qa | grep '. *gnome.* ' lists all packages that contain GNOME RPM-QF filename queries which package the destination file belongs to Rpm-qi package< c3/> get information about an installed package RPM-QIP package.rpm get information about a package that is not installed RPM-QL the package gets a list of files in the installed packages RPM-QLP package.rpm Lists a list of files in a package that is not installed
Iv. Verification of rpm
Packages may be maliciously modified during the propagation process, so for security reasons, modern systems have added validation capabilities to the software package.
Authentication typically uses an asymmetric encryption algorithm, so a public key is required. The way to import the public key is:
RPM--import/path/to/key_file
To verify that a package is not installed :
Rpm-k package.rpm
To verify the installed packages:
RPM-V Package
Reference Links:
RPM package naming rules in Linux
YUM Public key authentication and import
Linux entry record: 19, Linux package management tool RPM