How to install software in Linux
How to install the application software?
Where can I install my software?
How can I delete unwanted applications?
......
Next, let's take a look at these issues.
I. parse the Linux application software installation package:
Generally, there are three installation packages for Linux application software:
1) tarpackages, such as software-1.2.3-1.tar.gz. It is packaged using tar, a packaging tool for UNIX systems.
2) rpm packages, such as software-1.2.3-1.i386.rpm. It is a package Encapsulation Format provided by RedHat Linux.
3) dpkg package, such as software-1.2.3-1.deb. It is a package Encapsulation Format provided by debain Linux.
In addition, the naming rules of most Linux application software packages follow the following rules:
Name-version-Revised version-type
For example:
1) software-1.2.3-1.tar.gz means:
Software name: Software
Version: 1.2.3
Revised version: 1
Type: tar.gz, which indicates a tar package.
2) sfotware-1.2.3-1.i386.rpm
Software name: Software
Version: 1.2.3
Revised version: 1
Available platform: i386, applicable to Intel 80x86 platform.
Type: rpm, which indicates an RPM package.
Note: The RPM format is usually compiled, so you need to specify the platform. Detailed descriptions will be provided later.
And software-1.2.3-1.deb don't have to say it again! You can practice it yourself.
2. Understand the content in the package:
A Linux application package contains two different types of content:
1) One is the executable file, that is, it can be run directly after the package is unwrapped. All software packages in windows are of this type. After installing this program, you can use it, but you cannot see the source program. When downloading the software, check whether the software is the platform you are using. Otherwise, the software cannot be installed normally.
2) The other is the source program. After the package is unwrapped, you also need to use the compiler to compile it into an executable file. This is almost impossible in Windows systems, because the idea of windows is not to open source programs.
Generally, all packages are source programs packaged with tar, while packages with rpm and dpkg are often executable programs. In general, it is more flexible to compile the source program by yourself, but it is also prone to various problems and difficulties. Relatively speaking, downloading executable packages makes it easier to install the software. Of course, the flexibility is much lower. Therefore, a software always provides installation programs in multiple packaging formats. You can choose based on your own situation.
3. Handle the application software packaged with tar
1. installation:
The installation process can be divided into the following steps:
1) application software acquisition: Obtained by downloading and purchasing CDs;
2) decompress the file: Generally, the tar package will be compressed again, such as gzip and bz2, so you need to decompress it first. If it is the most common GZ format, you can run "Tar-xvzf package name" to decompress and unpack the package in one step. If not, decompress the software and then run tar-xvf to decompress the package;
3) read the install and readme files;
4) execute the "./configure" command to prepare for compilation;
5) execute the "make" command for software compilation;
6) Execute "make install" to complete the installation;
7) Execute "make clean" to delete the temporary files generated during installation.
Now, we are done. We can run the application. However, some readers may ask, How can I implement it? This is also a Linux issue. In fact, the executable files of Linux applications are stored in the/usr/local/bin directory! However, this is not the truth of "universal availability". The most reliable part is the install and readme files of this software.
2. Uninstall:
Generally, software developers seldom consider how to uninstall their own software. tar is only a package, so it does not provide a good method to uninstall the software.
Can't you uninstall it! Actually, no. There are two software that can solve this problem: kinstall and kife. They are the golden partner for installing and uninstalling tar packages. Their usage will be further described by the author. I will not go into detail here.
4. Get the application software packaged with RPM
Rpm is a major contribution of RedHat, which makes Linux software installation easier.
1. installation:
I just need a simple sentence to finish. Run:
Rpm-ivh rpm package name
For more advanced information, see the following table:
Rpm parameter description
-I install software
-T test the installation.
-P: shows the installation progress.
-F ignore any errors
-U upgrade and Installation
-V check kit is correctly installed
These parameters can be used at the same time. For more information, see the RPM Command help.
2. Uninstall:
I just need a simple sentence to finish. Run:
Rpm-E Software name
Note that the software name is used later, not the software package name. For example, to install the software-1.2.3-1.i386.rpm package, execute:
Rpm-IVH software-1.2.3-1.i386.rpm
When uninstalling, execute:
Rpm-E software.
In addition, graphical RPM tools such as gnorpm and kpackage are provided in Linux to simplify the entire process. The specific application of these software will be introduced separately.
5. Use Deb to package applications.
This is a package manager provided by Debian Linux, which is very similar to rpm. However, since RPM appeared earlier, it is common in various versions of Linux. The Debian Package Manager dpkg only appears in debina Linux. it is not available in other Linux versions. Here we will briefly describe:
1. Install
Dpkg-I deb software package name
Such as: dpkg-I software-1.2.3-1.deb
2. Uninstall
Dpkg-E Software name
For example, dpkg-E Software
Now, let's talk about this. We hope to help you find the north. Please refer to www.linuxaid.com.cn/bbs/?installation and release, or e-mail to: fjxufeng@linuxaid.com.cn.
========================================================== ========================================================== ===
Software Installation
---- There are two different installation methods for software in Linux. The first installation file is filename.tar.gz. The Installation File is filename. i386.rpm. Most of the software released in the first method is sent as source code. The second method is directly issued in binary format. I386 indicates that the software is compiled and generated according to the inter 386 instruction set.
---- For the first method, the installation method is as follows:
---- First, copy the installation file to your directory. For example, if you log on as root, copy the software to/root.
---- # Cp filename.tar.gz/root
---- Because the file is compressed and packaged, decompress it. Command:
---- # Tar xvzf filename.tar.gz
---- After executing this command, decompress the installation file to the current directory by path. Run the LS command to view the decompressed file. The file named "Install" is usually generated after decompression. This file is a plain text file that describes the installation method of the software package in detail.
---- For most software to be compiled, the installation method is roughly the same. After decompression, an executable script program named configure is generated. 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
---- If an error is found during the check, configure will prompt and stop the check. You can configure the system as prompted. Run the program again. 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 size of the software and the performance of the computer. Command:
---- # Make
---- After compilation, enter the following command to start installation:
---- # Make install
---- After installation is completed, the temporary files generated during compilation and files generated during configuration should be cleared. Run the following command:
# Make clean
# Make distclean
So far, the software installation is complete.
---- For the second method, the installation method is much simpler.
---- 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:
---- # Rpm-I filename. i386.rpm
---- 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.
---- In addition, there are some commercial software on the Linux platform. In the installation file, there is a Setup installer, which is installed in the same way as on Windows. For example, Corel WordPerfect.
Uninstall Software
---- 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:
---- # Rpm-Q-
---- You can query all the software packages installed in the current system. The function of the Q parameter is to enable RPM to enter the query command mode. Parameter A is a subparameter of the query mode, meaning all ). You can use the less person screen to display more information.
---- Determine the name of the software to be detached, and you can start to uninstall the software. Type the following command:
---- # Rpm-E [package name]
---- You can uninstall the software. The function of parameter E is to enable RPM to enter the uninstall mode. Uninstall the software package named [package name. 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:
---- # Rpm-E [package name]-nodeps
---- Detaching dependencies may make other software unavailable in the system. You can use
---- # Rpm-E [package name]-test
---- Run the RPM command to uninstall the preview, instead of detaching the preview. This allows you to check whether the software has dependencies. Whether there is an error during the uninstall process.