Installation and uninstall commands for software in Linux __linux

Source: Internet
Author: User

installation and uninstall commands for software in Linux

The installation and uninstall of Linux software has always been a puzzle for many beginners. Because Linux and windows in the system directory structure, system configuration and many other aspects of the major differences, so that the two software security loading and unloading mode is also very different. In Windows you use Add/Remove Programs in Control Panel, and similar to Linux, there is a powerful software security loading tool called RPM. Its full name is Red Hat Package Manager. 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.
  
  
Installation of software
  
----Linux Software Installation is mainly in two different forms. The first installation file name is filename.tar.gz. Another installation file name is filename.i386.rpm. Software distributed in the first way is sent in the form of source code. The second method is directly distributed in binary form. i386 means that the software is compiled according to the Inter 386 instruction set.
  
  
----for the first type, the installation method is as follows:
  
  
----First, copy the installation files to your directory. For example, if you are logged on as root, copy the software to/root.
  
  
----#cp Filename.tar.gz/root
  
  
----Because the file is compressed and packaged, it should be decompressed. The command is:
  
  
----#tar Xvzf filename.tar.gz
  
  
----The command is executed, the installation file is decompressed in the current directory by path. Use the LS command to see the uncompressed file. A file known as "INSTALL" in a file that is typically produced after decompression. This file is a plain text file, detailing how the package is installed.
  
  
----for most software that needs to be compiled, they are installed in roughly the same way. An executable script named Configure that is produced after the decompression is performed. 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
  
  
----If an error is found during the inspection, configure will give a prompt and stop checking. You may be prompted to configure the system. Re-execute the program again. 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
  
  
After the----compiles successfully, type the following command to start the installation:
  
  
----#make Install
  
  
----installation is complete, the files generated during the compilation process should be purged from the temporary files and configuration. Type the following command:
  
  
#make Clean
  
#make Distclean
  
At this point, the software installation is complete.
  
----for the second, the installation method is much simpler.
  
  
----the same as the first way, 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.
  
  
----In addition, there are some commercial software under the Linux platform. In its installation files, there is a setup installer that is installed the same way as under the Windows platform. such as: Corel WordPerfect.
  
  
Uninstall of software
  
The uninstall of----software 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
  
  
----can query all the packages installed in the current system. The function of the parameter q is to make the RPM Enter Query command mode. Parameter A is a child of the query mode, meaning all. Query to more information, you can use the less screen display.
  
  
----Determine the name of the software you want to uninstall, you can start to actually uninstall the software. Type the command:
  
  
----#rpm-E [package name]
  
  
----can uninstall the software. 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 uninstall of dependencies can cause other software in the system to be unusable. You can use
  
----#rpm-E [package name]-test
  
----make RPM perform an uninstall preview instead of actually uninstalling it. This allows you to check whether the software has dependencies. There is an error during the uninstall process.


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.