Basic installation and uninstallation of RPM and TAR in Linux

Source: Internet
Author: User
The installation and uninstallation of Linux software has been a problem for many new users. in Windows, we can use the installation and uninstallation programs that come with the software or & quot; in the control panel; add and delete programs & quot; to implement

The installation and uninstallation of Linux software has been a problem for many new users. in Windows, we can use the installation and uninstallation program that comes with the software or the "add/delete program" in the control panel. similar to this, there is a powerful software installation and uninstallation tool in Linux, the name is RPM, which can be used to create, install, query, update, and uninstall software. This tool is used in the command line and input rpm at the Shell prompt, you can obtain the help information of this command.

◆ Install the software.

Commonly used Linux software installation involves two different forms. The first installation file is xxx.tar.gz, the other is named xxx. i386.rpm, and most of the software released in the first method is sent in source code. The second is directly sent in binary format.

For the first method, the installation method is as follows:

1. first, copy the installation file to your Directory. for example, if you log on as root, copy the software to/root.

# Cp xxx.tar.gz/root

2. because the file is compressed and packaged, decompress the file with the following command:

# Tar xvzf 2002139124523.htm.tar.gz

3. after executing this command, extract the installation file to the current directory by path. run the ls command to view the decompressed file, which is usually in the file generated after decompression, there is a "Install" file, which is a plain text file, describes the installation method of the software package in detail.

4. execute the decompressed command to generate an executable script program named configure. it is used to check whether the system has any library required for compilation, and whether the library version meets the compilation needs and other system information required for installation, to prepare for subsequent compilation, the command is :#. /configure

5. after the check is passed, the MakeFile file for compilation will be generated. at this time, you can start compiling. the compilation process depends on the size of the software and the performance of the computer, the time consumed is also different. the command is: # make.

6. after compilation, enter the following command to start installation:

# Make install

7. after installation, clear the temporary files generated during compilation and the files generated during configuration. enter the following command:

# Make clean

# Make distclean

So far, the software installation is complete.

For the second method, the installation method is much simpler.

In the same way as the first method, copy the installation file to your Directory and use rpm to install the file. the command is as follows:

# Rpm-I 2002139124523.htm. i386.rpm

Rpm automatically unpacks the installation file, installs the software to the default directory, and registers the installation information of the software to the rpm database, the role of parameter I is to enable rpm to enter the installation mode.

◆ Uninstall software

1. the software is detached mainly by rpm. the software to be detached must first know the name of the software package registered in the system. Type the following command:

# Rpm-q-

You can query all the software packages installed in the current system.

2. determine the name of the software to be detached, and you can start to uninstall the software. Type the following command:

# Rpm-e [package name]

You can uninstall the software. The function of parameter e is to enable rpm to enter the uninstall mode. Uninstall the software package named [package name. Each software package in the system depends on each other. If the object cannot be detached because of dependency, the rpm prompts and stops uninstalling the object. You can run the following command to ignore the dependency and directly start detaching:

# Rpm-e [package name]-nodeps

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.