How to install software in Linux operating system

  

Let's take a look at the Linux software extension. The software suffix is ​​. Rpm was originally a package wrapper format provided by Red Hat Linux and is now used by many Linux distributions; the suffix is ​​. Tar.gz, tar.Z, tar.bz2 or. Tgz is packaged using the Unix system packaging tool tar; the suffix is ​​. Bin is generally some commercial software. The extension can be used to understand the software format to understand the software installation.

Installation of RPM Format Packages

1. Introduction

Almost all Linux distributions use some form of package management to install, update and uninstall software. Package management is easy to install and uninstall compared to installing directly from source; it is easy to update installed packages; it is easy to protect configuration files; it is easy to track installed files.

The full name of PM is 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 main parameters:

-i install software.

-t Test installation, not really installed.

-p Shows the progress of the installation.

-f Ignore any errors.

-U Upgrade installation.

-v Check if the kit is installed correctly.

These parameters can be used simultaneously. More content can refer to the RPM command help.

3. Uninstall the software

# rpm -e Software name

It should be noted that the above code uses the software name instead of the package name. For example, to uninstall the software-1.2.-1.i386.rpm package, you should execute:

#rpm -e software 4. Forcibly uninstall the RPM package

Sometimes it is not possible to remove an RPM. Especially when there are other programs on the system that depend on it. If you execute the command, the following error message is displayed:

## rpm -e xsnow

error: removing these packages would break dependencies:

/usr/X11R6/bin/xsnow Is needed by x-amusements-1.0-1

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

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

xsnow

It is recommended to use the tool software Kleandisk, which can safely and completely clean up RPM packages that are no longer used.

5. Installation. Files of type src.rpm

Currently RPM has two modes, one is already encoded (i386.rpm) and the other is unencoded (src.rpm).

rpm --rebuild Filename.src.rpm

At this point the system will create a file Filenamr.rpm, in the /usr/src/redflag/RPMS/subdirectory, usually i386, The specific situation is related to the Linux distribution. Then execute the following code:

rpm -ivh /usr/src/regflag/RPMS/i386/Filename.rpm

Installing with deb packaged software

deb is A package manager provided by Debian Linux, which is very similar to RPM. However, because RPM appears early and widely used, it is common in all versions of Linux, and Debian package manager dpkg only appears in Debina Linux. Its advantage is that it doesn't have to be plagued by strict dependency checking. The downside is that this package management tool can only be seen in the Debian Linux distribution.

1. Installation

# dpkg -i MYsoftware-1.2.-1.deb

2. Uninstalling

# dpkg -e MYsoftware

Software installation using source code

Compared with RPM installation, using source code for software installation is more complicated, but installing software with source code is an important means of software installation under Linux. One of the main advantages of Linux. Using the source code to install the software, you can choose a custom installation method to install according to the user's needs, instead of relying solely on the pre-configured parameters in the installation package to choose to install. In addition, there are still some software programs that can only be installed from the source code.

There are a lot of places where source code packages are available, and where exactly to get depends on the special needs of the software. For those software that are more commonly used, such as Sendmail, you can download the source code package (such as http://www.sendmail.org) from the commercial website. A generic package can be downloaded from the developer's web site. The following describes the installation steps:

1. Decompress the data package

The source code software usually takes. Tar.gz is used as an extension, and there are also tar.Z, tar.bz2 or . Tgz is the extension. Different extension decompression commands are also different.

2. Compile the software

After successfully decompressing the source code file, enter the unpacked directory. Read the Readme file and the Install file before installing. Although many source code packages use basically the same commands, there are times when you can find some important differences when reading these files. For example, some software includes an install script (.sh) that can be installed. Read these documentation before installation to help you install successfully and save time.

Become a root user before installing the software. There are usually two ways to achieve this: log in as root on another terminal, or type "su”" and the system will prompt for the password of the root user. After entering the password, you will always have the privileges of the root user. If you are already a root user, you can proceed to the next step.

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

gunzip soft1.tar.gz

cd soft1

#. /configure #Configuration#

make #call make#

make install #install source##br>

Delete temporary files generated during installation:

# Make clean

Uninstalling the software:

#make uninstall

The source code of some packages can be uninstalled with the make uninstall command after compiling and installing. If this feature is not available, the uninstallation of the software must be removed manually. Since the software may distribute the files in multiple directories of the system, it is often difficult to remove them and should be configured before compilation.

.bin file installation

extension. The bin file is binary, which is also the machine language that the source program is compiled from. There are some software that can be released as . Bin is the installation package for the suffix, for example, the streaming media player RealONE. If you have installed the Windows version of RealONE, then installing the RealONE for Linux version (file name: r1p1_linux22_libc6_i386_a1.bin) is very simple:

#chmod +x r1p1_linux22_libc6_i386_a1.bin

./r1p1_linux22_libc6_i386_a1 .bin

Next, choose the installation method, there are two kinds of normal installation and advanced installation. If you do not want to change the installation directory, you can choose a normal installation, the entire installation process is almost the same as under Windwos.

Uninstalling the .bin file, taking RealONE for Linux as an example. If you use the normal installation method, there will be two Real and Realplayer9 folders in the user's home directory, delete them.

Linux Green Software

Linux also has some green software, but not many. The Linux system provides a mechanism for automatically responding to the requirements of the software running process and setting up an environment that can be run immediately. This mechanism can be an interface or a middleware. The program written by the programmer can be directly copied and distributed without installation. Just click the icon of the program, access the interface provided by the operating system, and set it to work. To delete the software, you can delete it directly without linking the file. This is the easiest way to install and uninstall software.

The above describes the Linux software installation method. For Linux beginners, RPM installation is a good choice. If you really want to master the Linux system, source code installation is still an important means of software installation under Linux.



Copyright © Windows knowledge All Rights Reserved