Basic installation and uninstallation of Linux operating system RPM and TAR

  

Installation and uninstallation of Linux software has been a problem that has plagued many new users. In Windows, we can use the installation uninstaller that comes with the software or "Add/Remove Programs" in the Control Panel. Similarly, there is a powerful software installation and uninstallation tool under Linux called RPM. It can be used to build, install, query, update, and uninstall software. This tool is used at the command line. You can get help for the command by typing rpm at the shell prompt.

Software installation.

There are two different forms of software installation for Linux. The first installation file is named xxx.tar.gz; the other installation file is named xxx.i386.rpm. The software distributed in the first way is mostly sent in source form; the second way is sent directly in binary form.

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

1. First, copy the installation file to your directory. For example, if you are logged in as root, copy the software to /root.

#cp xxx.tar.gz /root

2 Since the file is compressed and packaged, it should be unzipped. The command is:

#tar xvzf 2004109124523.htm.tar.gz

3. After executing this command, the installation file is decompressed in the current directory by path. Use the ls command to see the decompressed file. Usually there is a "Install" file in the file generated after decompression. This file is a plain text file that details how to install the package.

4. Execute a decompressed executable script called configure. It is used to check whether the system has the required library at compile time, and whether the version of the library meets the needs of the compilation and other system information required for the installation. Prepare for subsequent compilation work. The command is: #./configure

5. After the check is passed, the MakeFile file for compilation will be generated. At this point, you can start compiling. The compilation process varies depending on the size of the software and the performance of the computer. The command is: #make.

6. After successful compilation, type the following command to start the installation:

#make install

7. After the installation, the temporary files and configuration generated during the compilation process should be cleared. The files produced during the process. Type the following command:

#make clean

#make distclean

At this point, the installation of the software ends.

For the second, the installation method is much simpler.

As in the first method, copy the installation files to your directory. Then use rpm to install the file. The command is as follows:

#rpm -i 2004109124523.htm.i386.rpm

rpm will automatically unpack the installation files and install the software to the default directory. Register the software installation information into the rpm database. The role of the parameter i is to bring the rpm into the installation mode.

Uninstalling the software

1. The uninstallation of the software is mainly carried out using rpm. To uninstall the software, you first need to know the name of the package registered in the system. Type the command:

#rpm -q -a

to find all the packages installed on the current system. 2. Once you have determined the name of the software you want to uninstall, you can start to actually uninstall the software. Type the command:

#rpm -e [package name]

to uninstall the software. The role of the parameter e is to bring the rpm into the unload mode. Uninstall the package named [package name]. Because each package in the system has a dependency on each other. If it cannot be uninstalled due to a dependency, rpm will prompt and stop the uninstall. You can use the following command to ignore dependencies and start uninstalling directly:

#rpm -e [package name] -nodeps

Copyright © Windows knowledge All Rights Reserved