How to install and uninstall software under Linux __linux

Source: Internet
Author: User

Under Linux There is a powerful software loading and unloading tool called RPM. It can be used to build, install, query, update, uninstall software. The tool is used at the command line. You can get help for this command by entering RPM after the shell's prompt. The installation and uninstallation of Linux software has been a challenge for many new users. In Windows, we can use the security loading program that comes with the software or Add/Remove Programs in Control Panel.

Installation of software under Linux:

There are two different forms of software installation under Linux. The first installation file name is xxx.tar.gz; another installation file name is xxx.i386.rpm. Software distributed in the first way is mostly sent in the form of source code, and the second is sent directly in binary form.

For the first, the installation method is as follows: 1. First, copy the installation files to your directory. For example, if you are logged on as root, copy the software to/root.

#cp Xxx.tar.gz/root 2. Because the file is compressed and packaged, it should be decompressed. The command is:

#tar Xvzf filename.tar.gz 3. After the command is executed, the installation file is decompressed in the current directory by path. Use the LS command to see the uncompressed file. Usually in the resulting file after the decompression, there are "Install" files. This file is a plain text file, detailing how the package is installed. 4. Perform a decompression of the resulting executable script named configure. It is the system information required for installation to check whether the system has the necessary libraries to compile, and whether the version of the library meets the needs of the compilation. Prepare for the subsequent compilation work. The command is: #./configure. 5. After the check is passed, the makefile file for compilation is generated. At this point, you are ready to start compiling. The process of compiling depends on the size of the software and the performance of the computer, and the time spent is different. The command is: #make. 6. After successful compilation, type the following command to start the installation:

#make install 7. After installation, you should clear the files generated during the process of compiling temporary files and configuration. Type the following command:

#make Clean
#make Distclean

At this point, the software installation is complete.

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

As in the first approach, copy the installation files to your directory. Then use RPM to install the file. The order is as follows:

#rpm-I. filename.i386.rpm

RPM will automatically unpack the installation files and install the software to the default directory. and register the software installation information into the RPM database. The function of the parameter i is to get the RPM into installation mode.

Software Uninstall under Linux: 1. Software uninstall is mainly done using RPM. The uninstall software first needs to know the name that the package registers in the system. Type the command:
#rpm-Q-A
You can query all the packages that are installed in the current system. 2. Determine the name of the software to uninstall, you can start to actually uninstall the software. You can uninstall the software by typing the following command:

#rpm-E [package name]

The function of the parameter e is to get the RPM into uninstall mode. Uninstall the package named [Package name]. There is a dependency between each package in the system. If you cannot uninstall because of dependencies, RPM prompts and stops uninstalling. You can use the following commands to ignore dependencies and start uninstalling directly:

#rpm-E [package name]-nodeps

Ignoring the uninstallation of dependencies can cause some other software in the system to be unusable.

I hope you will continue to learn about 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.