3 Kinds of software installation methods commonly used under Linux

Source: Internet
Author: User

One: Linux source installation
1. Unzip the source package file
The source package is typically archived using the TAR tool and then compressed using Gunzip or bzip2, with the suffix format of. tar.gz and. tar.bz2, respectively, decompression method:
TAR-ZXVF FileName.tar.gz
TAR-JXVF FileName.tar.bz2

Tar to compress or decompress a file [parameter] [file]
-C Compressed File
-X Unzip the file
-T view what files are in the compressed package
-Z Compress or unzip with gzip
-j compression or decompression with BZIP2
-V displays compression or decompression process information
-F Target File name
-P retains original permissions and properties
-P Use absolute path compression
-c Specifies the directory to extract to

2. Switch to the extracted directory
CD FileDirectory

3, ready to compile work
Before you begin installing the service, you need to execute the Configure script, which automatically performs a series of evaluations of the current system, such as source files, software dependent libraries, compilers,
Assembler, connector check, and so on, if necessary, you can also use the-prefix parameter to specify the installation path of the program, and when the script checks that the system environment meets the requirements,
A makefile file is generated in the current directory.
./configure-prefix=/usr/local/program

4. Build the Installer
The makefile file that was generated in the previous step will save the installation rules for the system environment dependencies, and the make command will then be used to provide the makefile file
Rules use the appropriate shell to compile all dependent sources, and the make command generates a final executable installer.
Make

5. Installation Service Program
If the-prefix parameter is not used in the Configure script phase, the program is typically installed to the/usr/local/bin directory by default.
Make install

6. Clean up temporary files (optional):
Make clean

7, uninstall the Service Program command (need to execute)
Make Uninstall

8. View installation Information
The Whereis command locates the location of the executable file, the source code file, and the Help file in the file system. The properties of these files should belong to the original code, binary files, or Help files.
Whereis [-BMSU] [BMS directory name-f] File name
-B searches the binary part of the file.
-M Search the manual section of the file.
-S searches the source portion of the file.
-U file with no documentation
The-B,-M, and-s flags can be used to change or limit the location of the Whereis command search. Because the program uses the ChDir subroutine in order to run faster, the path names given with the-m,-S, and-B flag directories must be complete; For example, they must start with a/(slash).
-B is the same as-B, but adds a directory to search for. Changes or restricts the location of the Whereis command to search for binary files.
-M is the same as-M, but adds a directory to search for. Change or qualify the Whereis command to search the location of the manual section.
-S is the same as-s, but adds a directory to search. Change or qualify the location of the Whereis command search source.
-F terminates the last-m,-s, or-B directory list concurrent file name start position signal.

Source package installation will be slower than RPM package installation, because RPM packages are based on specific systems and platforms specified, often a program will provide a lot of RPM package
Format, the user chooses the appropriate RPM package according to the system condition to install directly, and the source package is equivalent to the general type, can be used in many systems, so need
Run the Configure script to detect the environment and generate the corresponding installation information.


Two: RPM Package installation

RPM [Options] [parameters]
-A: Querying all packages
-E: Delete the specified package
-f< file;: Query The suite that owns the specified file;
-H or--hash: Show progress information
-I: Show package details
-i< Package > or--install< package;: Install the specified package
-L: Displays a list of files for the package
-P: Query the specified RPM package
-Q: Using inquiry mode
-u< Package > or--upgrade< package;: Upgrading the specified package
-V: Displays the instruction execution process;
-VV: Shows the instruction execution process in detail, which is convenient for troubleshooting.

Common Command combinations:
-IVH: Installation shows installation progress--install--verbose--hash
-UVH: Upgrade package--update;
-QPL: Lists the file information in the RPM package [Query packages list];
-QPI: Lists the description information for RPM packages [Query Package Install pack (s)];
-QF: Find which rpm package the specified file belongs to [Query file];
-va: Check all RPM packages to find the missing files [View Lost];
-E: Remove Package
--force mandatory operations such as forced deletion;
--requires shows the dependency of the package;
--nodeps ignore dependencies and continue operation

1. Installation
Rpm-i package files that need to be installed
Rpm-iv the package files that need to be installed (show installation details)
RPM-IVH the package files that need to be installed (displays installation details and progress)

2. Upgrade
Rpm-u package files that need to be upgraded
RPM-UVH package files that need to be upgraded (show upgrade details and progress)

3. Uninstall
RPM-E packages that need to be uninstalled
Note: If other programs rely on the package to be uninstalled, the system will be prompted not to delete, if you need to forcibly delete plus--nodeps, will be forced to delete, but may cause
Software that relies on it cannot run.

4. View installed
Rpm-qa

5. View the specified package
Rpm-qa | grep "Software or package name"

Third, yum installation
1. Installation
Yum Install software

2. Upgrade
Yum Update software

3. Delete
Yum Remove software

4. View
Yum Info software

5. Search Software
Yum Search Software

6. View Dependencies
Yum Deplist Software

7. View installed software
Yum List installded

Yum Command parameter list:
-E Silent Execution
-T Ignore error
-r[minutes] Set the wait time
-Y Auto Answer Yes
--skip-broken Ignore dependency issues
--nogpgcheck Ignoring GPG validation

Check-update Checking for updatable packages
Clean all clears all
Clean Packages Cleanup Temporary package files (/var/cache/yum files)
Clean headers Clear RPM header file
Clean Oldheaders erase the old rpm header file
Deplist list the dependencies of a package
List installable and updatable RPM packages
List installed installed packages
List Extras packages that are installed and not in the resource pool
Info installable and updatable RPM package information
Info installed installed package information (-QA parameters are similar)
INSTALL[RPM Package] installation package
Localinstall installing the local RPM package
UPDATE[RPM Package] Update package
Upgrade Upgrade System
search[Keyword] Search package
provides[keyword] search for a specific package file name
REINSTALL[RPM Package] Reinstall package
Repolist displaying the configuration of the resource pool
RESOLVEDEP Specifying dependencies
REMOVE[RPM Package] Unload package

3 Kinds of software installation methods commonly used under Linux

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.