How to install application software in Linux

Source: Internet
Author: User
Most of the Linux software packages found on websites or on CD-ROM are in rpm, tar, GZ, tgz, BZ, bz2, and other formats. Next we will introduce their installation methods.

I. Installation of RPM files

Rpm is the abbreviation of RedHat Package Manager (RedHat package management tool. Currently, mainstream Linux releases use this widely recognized open industry standard (including Red Hat Linux, open Linux, S. U. s.e Linux, and Turbo Linux ).

The installation of RPM files in Linux is very simple. The following is an example:

Suppose we have an RPM file "Imail-3.10a-13.i386.rpm", which is a server-side messaging system.

In terminal, the installation command is:

Rpm-I Imail-3.10a-13.i386.rpm

Common RPM parameters include:

-E. Uninstall related applications.

-The installation progress is displayed in the text-to-text box.

-U upgrade package

-Qpl: Used to list RPM package information

-QF: Find the software package to which the specified file belongs.

-Va verifies all RPM packages

For other parameters, you can view the RPM help document.

Installing the RPM file in X Windows is easier. Find an RPM file in the file manager and right-click it. In the pop-up menu, there will be three commands for the RPM file: Show INFO (show description), upgrade (upgrade), install (install ). Select the corresponding command.

Sometimes there are some errors when installing the RPM package. The most common one is to try to install a software that has been installed, and the software package to be installed must be supported by other software or system library files. The situation is similar to that of windows. For the latter errors, install these software or system library files first.

Installation Method of binary tarw.tar.gz, tar. Z, tgz and bz2 software packages

These software packages are essentially compressed after some files are packaged (tar files are not compressed. Therefore, you must unpack the package before installation and use. The command for unpacking various files is as follows:

1、decompressing imail.tar XF imail.tar

2nd release imail.tar.gz tar zxf imail.tar.gz

3rd release imail.tar. Z tar zxf imail.tar. Z

4. Solution IMail. Taz tar zxf IMail. Taz

5、imail.bz2 bumzip2 imail.bz2

After unpacking, you will get some files, which are usually stored in a directory. Go to the file directory and run the "ls-F-color" command to view the obtained file. Generally, there are two different situations depending on the author of the software: 1. The file is a compiled program, and the command used to view the file above will be highlighted in green with the "*" mark. 2. More is the source code that needs to be compiled by yourself.

You can run the compiled program directly. If we get the source code, we need to compile it ourselves to get the executable program.

Compiling source code is also very simple. First, read the redme, install, and other related documents in the directory, and then execute the following command:

./Configure

Make

Make install (only the root identity can execute this command)

After compilation, the executable program of the software is obtained in the current directory or the SRC subdirectory.

//////// The entire 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 "./configure" 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.
1. First, use tar-xzvf to unbind the package, for example:
# Tar-xzvf apache_1_3_6_tar.gz
In this example, a new directory (the directory name is similar to the file name of the .tat.gz package) is created in the current directory to store the extracted content. In this example, apache_1.3.6 is used.
2. Enter the Directory and run the LS command to view the files contained, such:
# Cd apache_1.3.6
# Ls
Check which of the following files is contained in the directory: Configure, makefile, or imake.
1) if the configure file is used, run:
#./Configure
# Make
# Make install
2) if it is a MAKEFILE file, execute:
# Make
# Make install
3) if it is an imake file, execute:
# Xmkmf
# Make
# Make install
3. If no error message is displayed, it will be done. Where the software is installed, it usually appears during installation. Otherwise, you can only check readme.
If an error is prompted, do not worry. It is usually a very simple problem:
1) C or C ++ compiler is not installed;
Diagnosis Method: Execute the command GCC (C ++ is g ++) and prompt that the command cannot be found.
Solution: mount the Linux installation disc and enter the RPMs directory. Run the following command:
# Rpm-ivh gcc * (haha, we used the second installation method)
2) The make tool is not installed;
Diagnosis Method: Execute the make command and prompt that the command cannot be found.
Solution: mount the Linux installation disc and enter the RPMs directory. Run the following command:
# Rpm-IVH make *
3) the Autoconf tool is not installed;
Diagnosis Method: Execute the make command and prompt that the command cannot be found.
Solution: mount the Linux installation disc and enter the RPMs directory. Run the following command:
# Rpm-IVH Autoconf *
4) Some link libraries are missing;
Diagnosis Method: some files are prompted during make.
Solution: Install the package containing this file, which requires accumulation.
Part 2: deal with. rpm
Rpm is a software package manager launched by red hat with RedHat Linux, which makes software installation easier.
1. Install software: run the rpm-ivh rpm package name, for example:
# Rpm-IVH apache-1.3.6.i386.rpm
2. Upgrade the software: run the rpm-uvh RPM package name.
3. reverse installation: run the rpm-e RPM package name.
4. query the detailed information of the software package: Run rpm-qpi rpm package name
5. query the RPM package where a file belongs: run the rpm-qf rpm package name
6. Check which files will be written to the system by executing the rpm-qpl RPM package name.
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, everything is done.

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.