Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The method of installing and uninstalling Software under Linux system

2025-01-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces the "installation and uninstallation methods of software under the Linux system". In the daily operation, I believe that many people have doubts about the installation and uninstallation methods of the software under the Linux system. The editor consulted all kinds of materials and sorted out the simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts about the installation and uninstallation methods of the software under the Linux system. Next, please follow the editor to study!

First, understand the Linux application software installation package:

There are usually three installation packages for Linux applications:

1) tar package, such as software-1.2.3-1.tar.gz. It is packaged using tar, the packaging tool of the UNIX system.

2) rpm package, such as software-1.2.3-1.i386.rpm. It is a package encapsulation format provided by Redhat Linux.

3) dpkg package, such as software-1.2.3-1.deb. It is a package encapsulation format provided by Debain Linux.

Moreover, the naming of most Linux application packages has a certain rule, which follows:

Name-version-revision-Type

For example:

1) software-1.2.3-1.tar.gz means:

Software name: software

Version number: 1.2.3

Revised version: 1

Type: tar.gz, which means it is a tar package.

2) sfotware-1.2.3-1.i386.rpm

Software name: software

Version number: 1.2.3

Revised version: 1

Available platform: i386, suitable for Intel 80x86 platform.

Type: rpm, which means it is a rpm package.

Note: since the rpm format is usually a compiled program, you need to specify the platform. It will be explained in more detail later.

And software-1.2.3-1.deb need not talk about it! Practice by yourselves.

Second, understand the contents of the bag:

The package of a Linux application can contain two different kinds of content:

1) one is the executable file, which can be run directly after unpacking the package. All packages available in Windows are of this type. After installing this program, you can use it, but you can't see the source program. And when downloading, you should pay attention to whether the software is the platform you use, otherwise it will not be able to install normally.

2) the other is the source program, that is, after unpacking the package, you need to use the compiler to compile it into an executable file. This is rarely seen in Windows systems, because the idea of Windows is not open source.

Usually, source programs are packaged with tar, while executable programs are often packaged with rpm and dpkg. Generally speaking, it is more flexible to compile the source program yourself, but it is also easy to encounter all kinds of problems and difficulties. Relatively speaking, downloading those executable packages makes it easier to install the software, and of course it is much less flexible. So in general, a software will always provide a variety of packaged formats of the installer. You can choose according to your own situation.

Third, use tar packaged application software

1. Installation:

The entire installation process can be divided into the following steps:

1) obtaining application software: obtained by downloading and purchasing CD-ROMs

2) unzip files: generally tar packages will be compressed again, such as gzip, bz2, etc., so you need to extract them first. If it is the most common gz format, you can execute "tar Cxvzf package name" to unpack and unpack in one step. If not, first use the decompression software, and then execute "tar Cxvf decompressed tar package" to unpack.

3) read the attached INSTALL file and README file

4) execute the ". / configure" command to prepare for compilation

5) execute the "make" command to compile the software

6) execute "make install" to complete the installation

7) execute "make clean" to delete temporary files generated during installation.

All right, we're done here. We can run the application. But at this point, some readers will ask, how can I do it? This is also a characteristic problem of Linux. In fact, generally speaking, the executable files of Linux applications are stored in the / usr/local/bin directory! However, this is not the truth of "everywhere". The most reliable thing is to look at the INSTALL and README files of the software, which are generally explained.

two。 Uninstall:

Usually, software developers seldom think about how to uninstall their software, and tar only completes the packaging work, so it does not provide a good uninstall method.

So does it mean that you can't uninstall it! In fact, there are two software that can solve this problem, that is, Kinstall and Kife, which are the golden partners for installing and uninstalling tar packages. Also, use the command whereis to find out all the installation directories of the software and delete them all.

Application software packaged with rpm

Rpm is a major contribution of Redhat, which makes the installation of Linux software easier.

1. Installation:

All I need is a simple sentence to finish. Execute:

Rpm Civh rpm package name

Parameter description of rpm

-I install the software

-t test installation, not real installation

-p shows the progress of installation

-f ignore any errors

-U upgrade installation

-v check if the kit is installed correctly

These parameters can be used simultaneously. For more information, please refer to the command help of RPM.

two。 Uninstall:

First query: rpm-ql software name, confirm and then execute: rpm Ce software name

Note, however, that the software name is used later, not the package name. For example, to install the package software-1.2.3-1.i386.rpm, you should execute:

Rpm Civh software-1.2.3-1.i386.rpm

When uninstalling, you should execute:

Rpm Ce software .

In addition, graphical RPM tools such as GnoRPM and kpackage are provided in Linux to make the whole process easier. The author will introduce the specific application of these software in a separate article.

Applications packaged with deb

This is a package manager provided by Debian Linux, which is very similar to RPM. However, because RPM appeared earlier, it is common in various versions of Linux. Debian's package manager dpkg appears only in Debina Linux, and there are generally no other Linux versions. Let's briefly explain here:

1. Installation

Dpkg Ci deb package name

Such as: dpkg Ci software-1.2.3-1.deb

two。 Unloading

Dpkg Ce Software name

Such as: dpkg Ce software

At this point, the study of "the method of installing and uninstalling software under the Linux system" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report