Install and uninstall software in Linux (1)

Source: Internet
Author: User
  1. How to uninstall installed software in Linux.
  2. 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 "Add/delete programs" in the control panel. Similarly, in Linux, there is a powerful software installation and uninstallation tool named rpm. It can be used to establish, install, query, update, and uninstall software. This tool is used in the command line. Enter rpm at the shell prompt to obtain help information for this command.
  3. Software Installation
  4. The installation of software in Linux is mainly in two different forms. The first installation file is xxx.tar.gz, and the other is named XXX. i386.rpm. Most of the software released in the first method is sent in the source code form, and the second method is directly sent in binary form.
  5. For the first method, the installation method is as follows:
  6. 1. First, copy the installation file to your directory. For example, if you log on as root, copy the software to/root.
  7. # Cp xxx.tar.gz/root
  8. 2. Because the file is compressed and packaged, decompress it. Command:
  9. # Tar xvzf filename.tar.gz if it is in the filename.tar.bz2 format, it should be tar jxvf filename.tar.bz2 to decompress
  10. 3. After executing this command, extract the installation file to the current directory by path. Run the LS command to view the decompressed file. Generally, the files generated after decompression contain the "Install" file. This file is a plain text file that describes the installation method of the software package in detail.
  11. 4. Execute the decompressed command to generate an executable script program named configure. It is used to check whether the system has the library required for compilation, and whether the library version meets the compilation requirements and other system information required for installation. Prepare for subsequent compilation. Command: #./configure
  12. If you want to install the software to a specified directory, use #. /configure -- prefix =/the directory you specify. For example, if you want to install an mlterm in the/opt/mlterm directory, enter
  13. #./Configure -- prefix =/opt/mlterm
  14. 5. After the check is passed, the MAKEFILE file for compilation will be generated. Now you can start compiling. The compilation process varies depending on the software scale and computer performance. Command: # Make.
  15. 6. After compilation, enter the following command to start installation:
  16. # Make install
  17. 7. After installation is complete, clear the temporary files generated during compilation and files generated during configuration. Run the following command:
  18. # Make clean
  19. # Make distclean
  20. Eg. install Apache
  21. # Tar zxvf httpd-2.0.50.tar.gz
  22. # Cd httpd-2.0.50
  23. #./Configure -- prefix =/usr/local/apache2 -- enable-module = so
  24. # Make
  25. # Make install
  26. So far, the software installation is complete.
  27. For the second method, the installation method is much simpler.
  28. Copy the installation file to your directory in the same way as the first method. Then use RPM to install the file. The command is as follows:
  29. # Rpm-I filename. i386.rpm
  30. Rpm automatically unpacks the installation file and installs the software in the default directory. And register the software installation information to the RPM database. The role of parameter I is to enable RPM to enter the installation mode.
  31. Uninstall Software
  32. 1. The software is mainly detached using rpm. To uninstall a software package, you must first know the name registered in the system. Type the following command:
  33. # Rpm-Q-
  34. You can query all the software packages installed in the current system.
  35. 2. Determine the name of the software to be detached, and you can start to uninstall the software. Type the following command:
  36. # Rpm-E [PackageName]
  37. You can uninstall the software. The function of parameter E is to enable RPM to enter the uninstall mode. For [PackageTo uninstall the software package. 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:
  38. # Rpm-E [PackageName]-nodeps
  39. Uninstalling dependencies may make other software unavailable in the system.
  40. If you want to know where the RPM package is installed?
  41. Use # rpm-QL [PackageName]
  42. 3. How to uninstall the software installed with the source code package?
  43. It is best to look at readme and install. In general, it is said, but most of the software does not provide the uninstallation method of the source code package; we can find the Software Installation Point to delete. It mainly depends on where you installed it.
  44. For example:
  45. If the software is installed, specify a directory. This problem will not be difficult;
  46. For example, use the source code package to install Gaim
  47. #./Configure -- prefix =/opt/Gaim
  48. # Make
  49. # Make install
  50. If you install mlterm
  51. #./Configure -- prefix =/opt/mlterm
  52. # Make
  53. # Make install
  54. Install the software installed in the source code package in the/OPT directory;
  55. If deleted, the corresponding software directory will be deleted;
  56. Some software needs to execute make Uninstall in the decompressed installation directory so that it can be uninstalled.
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.