Detailed software installation under Linux

xiaoxiao2021-03-05  31

When installing the software under Windows, simply double-click the software installer, or decompress the software to decompress the software with ZIP. Installing software under Linux For beginners, difficulty is higher than Windows software installation. Let's explain how to install the software under Linux in detail. Let's take a look at the Linux software extension. Software suffix is ​​.RPM originally a package format provided by Red Hat Linux, now many Linux distributions are used; the suffix is ​​.deb is a packaged format provided by Debain Linux; suffix is ​​.tar.gz, tar. Z, tar.bz2 or .tgz is packaged using UNIX system packaging tools; the suffix is ​​generally some commercial software. You can learn about the software format by extension, and then understand the software installation. The installation of the RPM format package 1. Introduction Almost all Linux distributions use some form of package management installation, update, and uninstall software. Package management is easy to install and uninstalling with the source code installation; easy to update the installed package; easy to protect the configuration file; easy to track the installed file. RPM is full of RED HAT Package Manager (Red Hat Pack Manager). RPM is essentially a package that contains Linux software that can be installed and running on a specific machine architecture. RPM is shown in Figure 1.

Figure 1 Schematic diagram of RPM structure

Most Linux rpm packages have certain rules, which follows Name - Version - Revigree - Type -Mysoftware-1.2 -1.i386.rpm.

2. Install the RPM package software

# Rpm -ivh mysoftware-1.2 -1.i386.rpm

RPM command main parameters:

-i installation software.

-t test installation, not really installed.

-p Displays the installation progress.

-f ignores any errors.

-U Upgrade installation.

The -v detection kit is installed correctly.

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

3. Uninstall the software

# Rpm -e software name

It should be noted that the software name is used in the above code, not the software package name. For example, when you want to uninstall Software-1.2.-1.I386.rpm, you should execute:

#Rpm -e software

4. Force to uninstall the RPM package

Sometimes the removal of an RPM is not good, especially if there are other programs on the system depend on it. If the execution command will display the following error message:

## 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

Here is recommended to use tool software Kleandisk, use it to securely completely clean up the RPM package that is no longer used. For details, please see the 2003 "Open System World" No. 12.

5. Files for installing .src.rpm

At present, RPM has two modes, one is already encoded (i386.rpm), one is not encoded (SRC. rpm).

RPM --Rebuild filename.src.rpm

At this time, the system will create a file filenamr.rpm, in the / usr / src / redflag / rpms / subdirectory, generally I386, specific situations, and Linux distributions. Then do the following code:

RPM -IVH /USR/SRC/REGFLAG/rpms/i386/filename.rpm Install software installation using DEB package

DEB is a package manager provided by Debian Linux, which is very similar to RPM. However, since RPM appears early, and is widely used, it is often seen in various versions of Linux, while Debian's package manager DPKG only appears in Debina Linux. Its advantage is that it is not necessary to be strictly redeemed, and the disadvantage is that this package management tool can only be seen in the Debian Linux release.

Installation

#DPKG -I MySoftware-1.2.-1.Deb

2. Uninstall

# DPKG-E MySoftware

Software installation with source code

Compared with the RPM installation method, software installation is complex, but the source code installation software is an important means of software installation under Linux, which is also one of the most important advantages of Linux. Using the source code installation software, you can install the custom installation method according to the needs of the user, rather than just relying solely on the parameters of the pre-configured parameters in the installation package. In addition, there are still some software programs that can only be installed from the source code.

There are now many places to provide source code packages, where they depends on the special needs of the software. For those common software, such as Sendmail, you can download the source code package (such as http://www.sendmail.org) from the commercial website. A general package that can be downloaded from the developer's Web site. Let's introduce the installation steps:

Decompression packet

Source code software usually uses .tar.gz as an extension, Tar.z, tar.bz2 or .tgz is extension. Different extensions decompressed commands are also different, see Table 1.

2. Compile software

After successfully decompress the source code file, enter the dispenser. Read the ReadMe file and install file before installation. Although many source code files use basic identical commands, sometimes some important differences can be found when reading these files. For example, some software contains a installation script program (.sh). Read these instructions before installation, help to install success and save time.

Before installing the software, it is necessary to become a root user. There are usually two ways to achieve this: on another terminal login in root, or enter "SU", the system will prompt the access to the root user. After entering your password, you will always have ROOT users. If it is already a root user, you can perform the next step.

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

Gunzip Soft1.Tar.gz

CD Soft1

#. / Configure # Configure #

Make # calls make #

Make Install # Install Source Code #

Temporary files generated when deleting installation:

#Make clean

Uninstall software:

#Make uninstall

Some package source code can be uninstalled with the make uninstall command after compiling. If this feature is not provided, the uninstall of the software must be deleted manually. Since the software may disperse files in multiple directories of the system, it is often difficult to delete it, and should be configured before compiling.

.bin file installation

The extension is the .bin file is binary, it is also a machine language obtained after the source program is compiled. Some software can be released to install packets for .bin suffix, for example, streaming media player Realone. If you install Realone's Windows version, install 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, select the installation method, there are two common installations and advanced installations. If you don't want to change the installation directory, you can choose normal installation, and the entire installation process is almost in WINDWOS.

. BIN file uninstallation, with Realone for Linux as an example, if a normal installation method is used, there will be two folders in the user's home directory, and delete them.

Linux green software

Linux also has some green software, but not a lot. The Linux system provides a mechanism: automatically responding to the requirements of the software running process, setting the environment that can be run immediately. This mechanism can be an interface or an middleware. The programmapped program written directly to copy distribute, no installation, just click the program's icon, access the interface provided by the operating system, you can work. To delete the software, you can delete it directly, you don't have to link files. This is the simplest software installation, uninstalling.

The method of Linux software installation is introduced above. For Linux beginners, RPM installation is a nice choice. If you want to truly master Linux systems, the source code installation is still an important means of installation under Linux.

转载请注明原文地址:https://www.9cbs.com/read-32662.html

New Post(0)