CentOS software installation, update and uninstall commands

Source: Internet
Author: User
Common Linux installation methods include tar, zip, gz, rpm, deb, and bin. We can simply divide it into three categories. 1. package or compress the tar, zip, and gz files. generally, unzip the files, or decompress the files to run the sh FILES. 2. corresponding deb and rpm tools are available, in general, such installation files can be easily installed through a third-party command line or UI, such as apt in Ubuntu

Common Linux installation methods include tar, zip, gz, rpm, deb, and bin. We can simply divide it into three categories.

 

1. package or compress the tar, zip, and gz files. generally, unzip the files, or decompress the files to run the sh FILES;

 

Second, corresponding to deb and rpm with management tools. generally, such installation files can be simply installed through a third-party command line or UI, such as apt in Ubuntu.

Deb, Redhat yum to install rpm;

 

Third: image. the bin class is to package sh and zip as bin, or package sh and rpm as bin. when you run the bin installation file on the command line, it is actually the sh in the bin.

Zip or rpm installation in the bin

 

 

1. rpm installation, update, and uninstall


RPM Package. this kind of software package is just like the windows EXE installation file. various files have been compiled and packaged, and the folder to which the files should be put has been specified,
Installation is very convenient. in the graphic interface, you only need to double-click to automatically install. But it's a bit bad, that is, the dependency of the package. this will be annoying.

 

A. rpm installation


1) find the corresponding software package, such as soft. version. rpm, and download it to a local directory;
2) open a terminal and su it as the root user;
3) directory where cd soft. version. rpm is located;
4) input rpm-ivh soft. version. rpm

 

B. Rpm update
# Rpm-Uvh soft. version. rpm

 

C. Rpm uninstall


1) find the software package rpm-qa | grep × XXX ×
2) for example, find the software mysql-4.1.22-2.el4_8.4 and execute the rpm-e mysql-4.1.22-2.el4_8.4

 

Note: query the installation directory of the software by using the command rpm-ql mysql-4.1.22-2.el4_8.4

 

2. installation package ending with. bin
Bin is similar to rpm Package installation, and is also relatively simple

 

Bin installation
1) open a SHELL, that is, the terminal
2) run the CD command to enter the directory where the source code package is located.
3) add executable attributes to the File: chmod + x *******. bin (in the middle of the letter x, in lower case)
4) execute the command:./******. bin or directly execute sh ******. bin.

 

Bin uninstall
Delete the installation directory selected during installation.

 

3. source code package ending with tar.gz (bz or bz2)


These software packages are all source programs that have not been compiled. they must be compiled before they can be installed.

Source code installation
1) open a SHELL, that is, the terminal
2) run the CD command to enter the directory where the source code package is located.
3) decompress the file based on the compressed package type (* indicates the compressed package name)
Tar-zxvf ***** .tar.gz
Tar-jxvf ****. tar. bz (or bz2)
4) run the CD command to enter the decompressed directory.
5) enter the command to compile the File:./configure (some compressed packages have been compiled, this step can be omitted)
6) then run the command: make
7) run the "make install" command to install the file.

Note: You can use./configure -- help to view the functions of the configuration software. most of the software provides the./configure configuration software,
If you don't have one, you don't need to use./configure; just make; make install; a more important parameter of./configure is -- prefix, and the -- prefix parameter is used.

Number, we can specify the software installation directory


Uninstall source code
1) open a SHELL, that is, the terminal
2) run the CD command to enter the compiled Software Directory, that is, the installation directory.
3) execute the anti-Installation Command: make uninstall

 

4. install yum
Yum is a rpm management tool. it manages a software library and can solve dependencies well.

1) yum installation
Yum install-y software name

 

2) yum update

Yum update-y software name

 

3) uninstall yum

Yum remove-y software name
Or
Yum erase-y software name


5 apt-get installation
Apt-get is a deb management tool, similar to yum

 

Apt-get install package installation package
Apt-get reinstall package re-installation package
Apt-get upgrade: update installed packages
Apt-cache rdepends package is used to check which packages are dependent on this package.
Apt-cache depends package for dependency usage
Apt-get clean & apt-get autoclean clear useless packages
Apt-cache show package obtains package information, such as description, size, and version.
Apt-get remove package Delete package
Apt-get purge package: Delete a package, including deleting a configuration file.

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.