Linux application software installation package type and installation introduction
Source: Internet
Author: User
I. parse the Linux application software installation package. Generally, there are four installation packages for Linux application software: 1)tarpackage, 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. He is RedhatLinux... 1. parse the Linux application software installation package. Generally, there are four installation packages for Linux application software:
1)tarpackage, 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.
4) bin package, such as jdk-1_5_0_05-linux-i586.bin, some Linux software does not disclose the source code, only release binary executable programs, such programs are generally marked with bin.
In addition, the names of most Linux application software packages also follow the following rules: name-version-revision-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, indicating 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. Pay attention to this software during download.
Whether it is the platform you are using. Otherwise, the installation will fail.
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 absent in the Windows system, because the Windows system is not open-source.
Generally, all packages are packaged with tar as source programs, while packages with rpm, bin, and dpkg are often executable programs. In general, it is easier to compile the source program by yourself, but it is also easy to encounter various problems and difficulties. In contrast, downloading executable packages makes it easier to install the software. of course, that flexibility is far worse. Therefore, a software always provides installation programs in multiple packaging formats. You can choose based on your own situation.
Three developers have decided to use the application software packaged by tar.gz (bz or bz2). These software packages are all source programs that have not been compiled and must be compiled before installation.
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 decompress the package. For example
If not, decompress the software and run "tar-xvf decompressed tar package" 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. Then we can run the application. However, some readers may ask, how can I implement it? This is also a Linux issue. In fact, generally, executable files of Linux applications are stored
Under 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:
1) open a SHELL, that is, the terminal
2) run the CD command to enter the configured software directory, that is, the directory during installation.
3) execute the anti-Installation Command: make uninstall
Installation directory: pay attention to the installation directory during the make install command process, or read the readme file in the installation directory. of course, the best way is to specify the installation directory during the installation process. /add the parameter -- prefix =/** after the configure command /**,
For example:
./Configure -- prefix =/usr/local/aaaa
Install the software in the aaaa Directory of the/usr/local/path. The default installation directory of common software is/usr/local or/opt. you can find it there.
Note: generally, software developers seldom consider how to uninstall their own software, and tar only completes packaging, so it does not provide a good uninstall method. 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.
4. get the application software packaged with rpm
Rpm is a major contribution of Redhat, which makes Linux software installation easier.
1. installation:
I can finish it with just one simple sentence. 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 all 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, image-based 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 is only available in Debina Linux.
Generally, none of them exist. Here we will briefly describe:
1. install
Dpkg-I deb software package name
For example, dpkg? I software-1.2.3-1.deb
2. uninstall
Dpkg-e software name
For example, dpkg? E software
VI. bin file
1. install
1) open a SHELL, that is, the terminal
2) run the CD command to enter the directory where the source code package is located.
3) add executable attributes to the File: chmod + x *******. bin (in the middle of the letter x, in lower case)
4) execute the command:./******. bin (this is the installation package for realplayer for linux). during installation, you can specify the installation directory, similar to Windows installation.
2. uninstall
1) delete the installation directory selected during installation.
7. how to execute the software after installation. After installing the software, you can execute the software in multiple ways:
1. some software will automatically add a shortcut to the application list after installation. just like Windows, you can find it there.
2. if the application list cannot be found, you can directly enter the command in the start/Run command. Generally, the startup command is the software name, such as firefox, realplay, and xmms.
3. you can also open a shell terminal and enter the software name, which is the same as running the command. If you do not know the full name of a command, you can enter a letter that begins with the command and press the tab key to search for it. The system will automatically display all the commands whose names start with the input letter.
.
4. you can also run the startup file directly in the installation directory. the executable icon in Linux is similar to the shell terminal icon.
5. search in the/usr/bin directory. In Linux, the/usr/bin directory starts a connection for all executable files. you can go to the directory to find the startup command for the files you have installed and double-click start.
VIII. differences between rpm. bin and bin files
1. bind files are the same as windows exe files.
2. rpm is like rar, whether willing or not, all in the same place. The good thing is to use vertices for confirmation.
3. some Linux software does not expose source code, but only releases binary executable programs. such programs are usually marked with bin;
4. another type of software is released together with the binary installer and source code. the binary program file is marked with bin. rpm (taking the RedHat package as an example), and the source code is marked with source. rpm.
5. bin is a binary file that can be run directly. rpm is the software package manager used by RedHat. Generally, you can install it directly by double-clicking it. However, it is only applicable to release versions that support RPM, such as Redhat.
Ubuntu does not support deb packages.
6. after the jdk-1_5_0_16-linux-i586-rpm.bin runs, it will extract an rpm Package and install it with the rpm-iUh command.
7. after the jdk-1_5_0_16-linux-i586.bin runs, it will directly extract all files to the jdk subdirectory of the current directory.
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.