How does LinuxRadhat install software?

Source: Internet
Author: User
Article Title: LinuxRadhat how to install software. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

Let's take a look at the Linux software extension. The software suffix is. rpm. Initially, Red Hat development or. tgz is packaged using the Unix packaging tool tar. Some commercial software is generally suffixed with. bin. 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.

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

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. However, since RPM appeared early and widely used, it is common in various versions of Linux, and the Debian Package Manager 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 http://www.sendmail.org 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 tar.zw.tar.bz2 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

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

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