Software Installation of Linux

Source: Internet
Author: User

Simply an operating system is no way to meet our needs, so we need to install a variety of software to meet our daily work, life needs. In general, there are two common ways to install Linux, with CentOS as an example:

1. Installing software from source code

Compiling the software source code is suitable for all software developed for Linux systems and some software developed for UNIX-like systems.

The steps are:

    • Executes configure, which is used to check if the system has a library that is required for compilation, and whether the version of the library meets the needs of the compilation and other system information required for installation. Prepare for the subsequent compilation work.

During the check, if there is a problem, will stop the check and prompt the error, convenient for users to reconfigure the installation environment according to the prompts, and then re-perform the inspection, after the inspection is completed, a Config.log document is generated and some run configurations are logged to help debug the installation. After the check is passed, a makefile file is generated for compilation, so you can start compiling it.

    • Make, the system starts to expand the compilation according to Makefile's instructions, and uses GCC to compile the source code into the target file, which generates a complete executable file through the library connection
    • Make install, start the installation, and install the compiled files into the intended directory. In general, there will be etc (configuration file), Bin (executable file), Lib (function library), Man (online manual) and other directories

2. Installing with software management tools

RPM (Redhat Package Manager) is the Red Hat company with Redhat Linux, which has introduced a bundle manager that makes it easier to install software.

Upload the rpm file to the system, you can do a series of query, uninstall, upgrade and other operations

    • Install software: Execute RPM-IVH RPM Package name
    • List all installed RPM package: Execute RPM-QA
    • Query whether a package is installed RPM-Q package name
    • Uninstall software: rpm-e RPM package name.

The other RPM parameters are as follows, turn from: http://www.360doc.com/content/10/1115/22/2054285_69685576.shtml

RPM Command Detailed (install, upgrade, uninstall) rpm Common commands1. Install a package # RPM-IVH2. Upgrade a package # RPM-UVH3. Uninstalling a package # RPM-e4. Installation Parameters--Force forces installation even if overwriting files belonging to other packages--Nodeps If the RPM package is installed depending on other packages, it is forced to install even if the other packages are not loaded. 5. Query whether a package is installed # RPM-Q < RPM package name>6. Get information on installed packages # RPM-qi < RPM Package name>7. List what files are in the package # RPM-QL < RPM Package name>8. Lists which rpm package a file on the server belongs to #rpm-QF9. Can be combined with several parameters with # RPM-qil < RPM Package name>Ten. List all installed RPM Package # RPM-QA One. List what files are included in the RPM package file that is not installed into the system? # RPM-qilp < RPM Package name><>First, the installation command format: RPM-I. (OR--InstallOptions file1.rpm ... filen.rpm parameters: file1.rpm. filen.rpm the file name details for the RPM package to be installed:-H (or--hash) output hash mark when installed (' # '"') --test only tests the installation and does not actually install it. --percent outputs the progress of the installation as a percentage. --Excludedocs do not install the documentation files in the package--Includedocs Installation Documentation--replacepkgs Force reinstallation of installed packages--Replacefiles replacing files belonging to other packages--Force ignores package and file conflicts--noscripts do not run pre-install and post-install scripts--prefix Install the package to the specified path--Ignorearch not verifying the structure of the package--Ignoreos does not check the operating system that the package runs--Nodeps does not check dependency relationships--Ftpproxy used as an FTP proxy--FtpPort specifying the port number for FTP is a common option-v Show additional information-VV displays debug information--root let RPM take the specified path as"root directory"so that both the preinstallation and post-Setup programs are installed in this directory--Rcfile Set the RPMRC file to--DBPath Setting the path of the RPM data inventory is two, delete the command format: RPM-E (Or--erase) Options pkg1 ... pkgn parameters pkg1 ... pkgn: Package detail options to remove--Test performs only the deleted tests--noscripts do not run pre-install and post-install scripts--Nodeps does not check dependency common options-VV displays debug information--root let RPM take the specified path as"root directory"so that both the preinstallation and post-Setup programs are installed in this directory--Rcfile Set the RPMRC file to--DBPath Setting the path of the RPM data inventory is three, upgrade the command format RPM-U (OR--upgrade) Options file1.rpm ... filen.rpm parameters file1.rpm ... filen.rpm software package name details-H (or--hash) output hash mark when installed (' # '"') --oldpackage allow"Upgrade"to an old version--test tests only for upgrade--Excludedocs do not install the documentation files in the package--Includedocs Installation Documentation--replacepkgs Force reinstallation of installed packages--Replacefiles replacing files belonging to other packages--Force ignores package and file conflicts--percent outputs the progress of the installation as a percentage. --noscripts do not run pre-install and post-install scripts--prefix Install the package to the specified path--Ignorearch not verifying the structure of the package--Ignoreos does not check the operating system that the package runs--Nodeps does not check dependency relationships--Ftpproxy used as an FTP proxy--FtpPort specifying the port number for FTP is a common option-v Show additional information-VV displays debug information--root let RPM take the specified path as"root directory"so that both the preinstallation and post-Setup programs are installed in this directory--Rcfile Set the RPMRC file to--DBPath Setting the path of the RPM data inventory is four, the query command format: RPM-Q (Or--query) options parameter: Pkg1 ... pkgn: Querying the installed package details options-P (or "-"') Query the package file-f query which package belongs to-a query all installed packages--whatprovides Query provides the functionality of the package-g querying packages belonging to groups--whatrequires Query All package information options that require functionality to display the full identity of the package-I display the package's summary information-l display the list of files in the package-c Display a list of configuration files-d display a list of document files-s Displays the list of files in the package and displays the status of each file--Scripts display install, uninstall, check script--queryformat (Or--QF) displays query information in a user-specified manner--dump displays all the verified information for each file--provides displays the functionality provided by the package--requires (OR-R) General options for displaying the functionality required by the package-v Show additional information-VV displays debug information--root let RPM take the specified path as"root directory"so that both the preinstallation and post-Setup programs are installed in this directory--Rcfile Set the RPMRC file to--DBPath Set the RPM data inventory path to five, verify the installed Package Command format: RPM-V (or--verify, or-y) options parameter pkg1 ... pkgn package name package option to validate-P Verify against packagefile-f Verify which package belongs to-a Verify check all the packages-g Verify all package detail options belonging to the group--noscripts do not run a validation script--nodeps not verifying dependencies--Nofiles General Options for not verifying file properties-v Show additional information-VV displays debug information--root let RPM take the specified path as"root directory"so that both the preinstallation and post-Setup programs are installed in this directory--Rcfile Set the RPMRC file to--DBPath Setting the path of the RPM data inventory is six, check the file syntax in the package: RPM-K (Or--checksig) Options file1.rpm ... filen.rpm parameter: file1.rpm ... filen.rpm package filename Checksig--Detailed Options--NOPGP Common options for not verifying PGP signatures-v Show additional information-VV displays debug information--rcfile set RPMRC file to seven, other RPM options--rebuilddb Rebuilding rpm database--Initdb Create a new RPM library--quiet reduce the output as much as possible--Help displays the assistance file--version Show current version of RPM
View Code3.YUM Installation

Sometimes installing a software needs to install several other software first, the manual solution is very complex, using Yum can solve this problem

    • Automatically resolve dependencies
    • You can group RPMs and install actions based on your organization
    • Introduces warehouse concept and supports multiple warehouses.

Warehouses can be local, or they can use centralized, unified network warehouses in the form of HTTP, FTP, or NFS.

Yum uses the warehouse save management RPM software, the warehouse configuration file is saved in the/etc/yum.repos.d/directory, the format is as follows:

[Warehouse shorthand name]name= warehouse name, typically warehouse description BaseURL= Warehouse path, can be on the Internet, or localenabled = whether enabled (1, enabled; 0 , disabled) gpgcheck= Open Check (1, open;0, off)

Warehouses can use file, HTTP, FTP, MFS

Yum configuration file must end with. Repo

You can save configuration information for multiple warehouses in a single configuration file

More than one configuration file can exist in the/etc/yum.repos.d/directory

Simple configuration

Installing the Software

Yum Install software name

Uninstalling software

Yum Remove software name

Upgrade software

Yum Update software name

Search software based on keywords

Yum search keyword

Display specified software information

Yum info software name

Emptying cache information

Yum Clean All

Organized by: MU class network (www.imooc.com) linuxcast (www.LinuxCast.net)

Software Installation of Linux

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.