How to install software in Linux (. rpm. SRC .tar.gz. Bin ))

Source: Internet
Author: User

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.

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
Xsnow

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, you can download source code packages (such as http://www.sendmail.org) from a commercial website ). 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 tar.zw.tar.bz2 or. tgz as the extension name. Different extension decompression commands are also different, as shown below:

Reference:
Compressed package type commands
. GZ gunzip
. Z uncompress
. Zip unzip
. Bz2 bunzip2

Note: Some parameters need to be added when using these commands. However, in the graphic interface, you can use special software to decompress them directly. This is what I use, which is more convenient, it can be used in the same way as in windows.

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 instructions 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
./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 a software package, you can directly delete it without link files. 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. (End)

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.