Software Installation in Linux

Source: Internet
Author: User
When installing software in Windows, you only need to double-click the software installation program, or decompress the software by using Zip or other decompress to install the software. Installing software in Linux is more difficult for beginners than installing software in Windows. Next I will explain in detail how to install software in Linux. Let's take a look at Lin...

When installing software in Windows, you only need to double-click the software installation program, or decompress the software by using Zip or other decompress to install the software. Installing software in Linux is more difficult for beginners than installing software in Windows. Next I will explain in detail how to install software in Linux.

Let's take a look at the Linux software extension. The software suffix is. rpm was originally a package encapsulation format provided by Red Hat Linux. it is currently used in many Linux distributions and is suffixed. deb is a package type of Debain linux.pdf suffixed with .tar.gz?tar.z=tar.bz2 or. tgz is packed with tar, a Unix packaging tool, with the suffix. bin is generally a number of commercial software. You can use the extension to understand the software format and then the software installation.

Installation of RPM-format software packages

1. Introduction
Almost all Linux distributions use some form of software package to manage installation, update, and uninstall software. Compared with installing software packages directly from source code, software package management is easy to install and uninstall; installed software packages are easy to update; configuration files are easy to protect; installed files are easy to track.

RPM stands for Red Hat Package Manager (Red Hat Package Manager ). RPM is essentially a package that contains Linux software that can be installed and run on a specific machine architecture immediately. See RPM.


Most Linux RPM packages follow the naming rules-version-revision-type-MYsoftware-1.2-1. i386.rpm.

2. install RPM Package software
# Rpm-ivh MYsoftware-1.2-1. i386.rpm

RPM command parameters:

-I install software.
-T test the installation.
-P shows the installation progress.
-F ignores any errors.
-U upgrade and installation.
-V check whether the kit is correctly installed.

These parameters can be used at the same time. For more information, see The RPM command help.

3. uninstall software
# Rpm-e software name

It should be noted that the software name is used in the code above, rather than the software package name. For example, to uninstall the software-1.2.-1. i386.rpm package, run:

# Rpm-e software

4. forcibly uninstall the RPM Package
It is not possible to remove an RPM, especially when other programs on the system depend on it. If the command is executed, the following error message is displayed:

# Rpm-e xsnow
Error: removing these packages wowould break dependencies:
/Usr/X11R6/bin/xsnow is needed by x-amusements-1.0-1

In this case, you can use the -- force option to reinstall xsnow:

# Rpm-ivh -- force xsnow-1.41-1.i386.rpm

We recommend that you use the tool software Kleandisk to safely and thoroughly clear RPM packages that are no longer in use.

5. Install. src. rpm files
At present, there are two RPM modes, one is already encoded (i386.rpm), and the other is unencoded (src. rpm ).
Rpm -- rebuild Filename. src. rpm

At this time, the system will create a file Filenamr. rpm, under the/usr/src/redflag/RPMS/subdirectory, it is generally i386, the specific situation is related to the Linux release version. Then execute the following code:
Rpm-ivh/usr/src/regflag/RPMS/i386/Filename. rpm

Use deb package software for installation

Deb is a package manager provided by Debian Linux, which is very similar to RPM. But because RPM appears early and is widely used, it is common in various versions of Linux, and Debian's ensure processor dpkg only appears in Debina Linux. Its advantage is that it does not need to be troubled by strict dependency check. The disadvantage is that this package management tool can be seen only in the Debian Linux release.

1. install
# Dpkg-I MYsoftware-1.2.-1.deb

2. uninstall
# Dpkg-e MYsoftware

Install software using source code

Compared with the RPM installation method, installing software using source code is more complex. However, installing software using source code is an important tool for installing software in Linux and one of the main advantages of running Linux. You can use the source code to install the software by selecting a customized installation method based on your needs, instead of installing the software by selecting pre-configured parameters in the installation package. In addition, some software programs can only be installed from the source code.

Currently, source code packages are provided in many places. The exact location of the source code depends on the special needs of the software. For software that is commonly used, such as Sendmail, source code packages such as can be downloaded from commercial websites ). General software packages can be downloaded from the developer's Web site. The following describes the installation steps:

1. decompress the data packet
The source code software usually uses .tar.gzas as the extension name, and also has or. tgz as the extension name. Different extension decompression commands are also different, as shown in Table 1.

2. Compile the software
After the source code file is decompressed, enter the directory for unpacking. Read the Readme and Install files before installation. Although many source code packages use the same command, there are some important differences when reading these files. For example, some software contains an installation script (. sh) that can be installed ). Read these instruction files before installation to facilitate installation and save time.

You must be the root user before installing the software. There are two methods to achieve this: log on to another terminal as a root user, or enter "su". The system will prompt you to enter the password of the root user. After you enter the password, you will always have the permissions of the root user. If you are already a root user, you can proceed to the next step.

The common installation method is to execute the following command from the installation package directory:

Gunzip soft1.tar.gz
Cd soft1
#./Configure # Configuration #
Make # Call make #
Make install # install source code #

Delete the temporary files generated during installation:
# Make clean

Uninstall software:
# Make uninstall

You can run the make uninstall command to uninstall the source code of some software packages. If you do not provide this function, you must manually delete the software. Because the software may install files in multiple directories of the system, it is often difficult to delete the files, and should be configured before compilation.

. Binfile installation

The. binfile extension is binary, and it is also the machine language obtained after the source program is compiled. Some software can be released as an installation package suffixed with. bin, such as the streaming media player RealONE. If you have installed RealONE for Windows, it is very easy to install RealONE for Linux (File name: r1p1_linux22_libc6_i1__a1.bin:
# Chmod + x r1p1_linux22_libc6_i1__a1.bin

Next, select the installation method, which includes general installation and advanced installation. If you do not want to change the installation directory, you can select normal installation. the installation process is almost the same as that in Windwos.

Unmount the. bind file. take RealONE for Linux as an example. if you use the normal installation method, there will be two folders, Real and Realplayer9, in the user's home directory, and you can delete them.

Linux Green software

Linux also has some green software, but not many. The Linux system provides a mechanism to automatically respond to the requirements of software running processes and set the environment for immediate running. This mechanism can be an interface or middleware. Programs compiled by programmers can be directly copied and distributed without installation. you only need to click the program icon to access the interface provided by the operating system and set it to work. To delete the software, you can directly delete it without having to link the file. This is the simplest way to install and uninstall software.

The above describes how to install Linux software. for Linux beginners, RPM installation is a good choice. If you really want to master the Linux system, installing source code is still an important tool for installing software in Linux.

From: lovedreamland's blog

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: 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.