Installation and uninstallation commands for software in Linux

Source: Internet
Author: User

The installation and uninstallation of Linux software has been a puzzle for many beginners. Because Linux and windows in the system directory structure, system configuration, and many other aspects of the significant differences, so that the two software loading and unloading method is very different. Using Add/Remove Programs in Control Panel in Windows, like this, there is a powerful software-on-load tool called RPM under Linux. Its full name is "Red Hat package Manager". It can be used to establish, install, query, update, uninstall software. The tool is used under the command line. You can get help for this command by entering RPM after the shell prompt.
  
  
Installation of software
  
There are two main types of software installation----Linux. The first installation file is named filename.tar.gz. The other installation file is named filename.i386.rpm. Most of the software released in the first way is sent in the form of source code. The second approach is distributed directly in binary form. i386 means that the software is generated by compiling 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 uncompressed. The command is:
  
  
----#tar Xvzf filename.tar.gz
  
  
----After the command is executed, the installation files are extracted in the current directory by path. You can see the extracted files with the LS command. Files that are usually named "INSTALL" are in the resulting file after decompression. This file is a plain text file, detailing how the package is installed.
  
  
----for most software that needs to be compiled, it is installed in much the same way. An executable script named Configure that was produced after the decompression was performed. It is used to check whether the system has a library that is required for compilation, and whether the version of the library meets the required system information for installation such as compilation. Prepare for the subsequent compilation work. The command is:
  
  
----#./configure
  
  
----If an error is found during the inspection, configure will give a hint and stop the check. You can follow the prompts to configure the system. Then re-execute the program. After the check passes, the makefile file is generated for compilation. At this point, you can 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
  
  
----The installation is complete, you should clear the files generated during the compilation process and the temporary files generated during the configuration process. Type the following command:
  
  
#make Clean
  
#make Distclean
  
This concludes the installation of the software.
  
----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 command is as follows:
  
  
----#rpm-I filename.i386.rpm
  
  
----RPM will automatically unpack the installation files and install the software into the default directory. and register the installation information of the software in the RPM database. The function of the parameter i is to get the RPM into the installation mode.
  
  
----In addition, there are some commercial software under the Linux platform. In its installation file, there is the setup installer, which is installed in the same way as the Windows platform. such as: Corel WordPerfect.
  
  
Uninstalling the Software
  
The uninstallation of----software is mainly done using RPM. To uninstall the software, first know the name of the package registered in the system. Type the command:
  
  
----#rpm-Q-A
  
  
----can query to all packages installed on the current system. The function of parameter q is to make RPM into query command mode. Parameter A is a sub-parameter of the query pattern, meaning all. More information is available and can be displayed using the less person screen.
  
  
----Determine the name of the software to be uninstalled, you are ready to actually uninstall the software. Type the command:
  
  
----#rpm-E [package name]
  
  
You can uninstall the software----. The function of the parameter e is to allow the RPM to enter the Unload mode. Uninstall the package named Packages name. Because of the dependencies between the various packages in the system. If there is a dependency that cannot be uninstalled, RPM will give you a hint and stop uninstalling. You can use the following command to ignore dependencies and start unloading directly:
  
----#rpm-E [package name]-nodeps
  
Unloading----ignoring dependencies may cause other software in the system to be unusable. You can use
  
----#rpm-E [package name]-test
  
----Let RPM do an uninstall preview instead of actually uninstalling it. This will allow you to check if the software has dependencies. Whether there are errors during the uninstallation process.

Installation and uninstallation commands for software in 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.