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

What are the ways in which linux installs the software

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly explains "what are the ways to install software in linux". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "what are the ways to install software in linux".

Installation method: 1, rpm mode, download the software package to the specified directory, and execute the "rpm-ivh package name" command in that directory. 2. In deb mode, download the software package and execute the command "dpkg-I package name". 3, yum mode, determine normal networking, execute "yum install package name" command, and so on.

The operating environment of this tutorial: linux5.9.8 system, Dell G3 computer.

Several ways of installing Software in linux

1. Steps for installing rpm package:

1. Find the corresponding software package, such as soft.version.rpm, and download it to a directory on this machine.

2. Open a terminal and su-become a root user

3. Enter the directory where the package is located

Cd directory name

4. Execute the installation command

Rpm-ivh package name

Detailed introduction:

1. Installation:

All I need is a simple sentence to finish. Execution: the package name of rpm-ivh rpm is more advanced

two。 Uninstall:

I also need only a simple sentence to finish. Execution: rpm-e 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, execute: rpm-ivh software-1.2.3-1.i386.rpm and when uninstalling: rpm-e software.

In addition, graphical RPM tools such as GnoRPM and kpackage are provided in Linux to make the whole process easier.

2. Yum installation: (install rpm package)

Rpm is a package name for linux that ends with .rmp and is installed with the syntax: rpm-ivh package name. Rpm package installation has a big disadvantage is that the file relevance is too large, sometimes install a software to install a lot of other software packages, it is very troublesome.

So for this RedHat Little Red Riding Hood developed the yum installation method, he can completely solve this correlation problem, very convenient, as long as the configuration of two files can be installed, the installation method is: yum install package name. Yum is not a package, but the software that installs the package

To put it simply: rpm can only install rpm packages that have been downloaded to the local machine; yum can download and install rpm packages online, update the system, and automatically deal with package-to-package dependencies, which rpm tools do not have.

Steps:

1. When using yum for software installation, you must first determine whether the server can be connected to the network properly. If not, you cannot use yum to install the software.

2. In the case of networking, you can directly yum to install the yum install package name; if the package name is too long, you can press the tab key twice to automatically list the relevant software, and then install it, as shown in the following figure

3. The steps of deb package installation:

1. Find the corresponding software package, such as soft.version.deb, and download it to a directory on this machine.

2. Open a terminal and su-become a root user

3. Enter the directory where the package is located

Cd directory name

4. Execute the installation command

Dpkg-I package name

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.

1. Installation

The package name of dpkg-I deb is dpkg-I software-1.2.3-1.deb.

two。 Unloading

Dpkg-e software name such as: dpkg-e software

3. Query: query the software packages currently installed on the system:

Dpkg-l'* package name *'

Such as: dpkg-l'* software*'

4. Installation method of tar.gz source code package:

1. Find the corresponding software package, such as soft.tar.gz, and download it to a directory on this machine.

2. Open a terminal and su-become a root user

3. The directory where cd soft.tar.gz is located

4. Tar-xzvf soft.tar.gz / / generally generates a soft directory

5 、 cd soft

6 、. / configure

7 、 make

8 、 make install

Detailed introduction:

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-xvzf package name" to unpack and unpack in one step. If not, use the decompression software first, and then execute the "tar-xvf decompressed"

Unpack the tar package

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.

5. Installation method of tar.bz2 source code package:

1. Find the corresponding software package, such as soft.tar.bz2, and download it to a directory on this machine.

2. Open a terminal and su-become a root user

3. The directory where cd soft.tar.bz2 is located

4. Tar-xjvf soft.tar.bz2 / / generally generates a soft directory

5 、 cd soft

6 、. / configure

7 、 make

8 、 make install

6. Apt installation: (install deb package)

1. Open a terminal and su-become a root user

2. Apt-cache search soft Note: soft is the name or related information of the software you are looking for

3. If the software soft.version is found in 2, install the software with the apt-get install soft.version command

Note: as long as you have access to the Internet, you only need to use apt-cache search search software and apt-get install software

Detailed introduction:

Apt-get is the package management tool for the debian,ubuntu distribution, very similar to the yum tool in Red Hat. The apt-get command generally requires root permission to execute, so it usually follows the sudo command example sudo apt-get xxxx

Apt-get install packagename-- installs a new software package (see aptitude below)

Apt-get remove packagename-- uninstalls an installed package (retains configuration files)

Apt-get-purge remove packagename-- uninstalls an installed package (removes the configuration file)

Dpkg-force-all-purge packagename-some software is difficult to uninstall and blocks other software applications, so you can use this, but it's a bit risky.

Apt-get autoremove-- because apt backs up installed or uninstalled software on your hard drive, you can use this command to delete software you have deleted if you need space.

Apt-get autoclean-- runs this command periodically to clear the .deb files of packages that have been uninstalled. In this way, a large amount of disk space can be freed. If the need is urgent, you can use apt-get clean to free up more space. This command deletes the .deb file of the installed software package as well.

The apt-get clean-- command will also delete the backup of the installed software, but this will not affect the use of the software.

Apt-get upgrade-- updates all installed software packages

Apt-get dist-upgrade-- upgrades the system to a new version

Apt-cache search string-- searches for strings in the package list

Apt-cache showpkg pkgs-- displays package information.

Apt-cache stats-- to see how much software is in the library.

Apt-cache dumpavail-- prints a list of available packages.

Apt-cache show pkgs-- displays package records, similar to dpkg-print-avail.

Apt-cache pkgnames-- prints the names of all packages in the package list (you need to run this command periodically to make sure your package list is up to date)

To put it simply: dpkg can only install deb packages that have been downloaded to the local machine. Apt-get can download and install deb packages online, update the system, and automatically deal with package-to-package dependencies that dpkg tools do not have.

7. Bin file installation:

If the software you downloaded is named soft.bin, which is usually an executable file, the installation method is as follows:

1. Open a terminal and su-become a root user

2. Chmod + x soft.bin

3. / soft.bin / / run this command to install the software

Thank you for your reading, the above is the content of "what is the way linux installs software?" after the study of this article, I believe you have a deeper understanding of the way linux installs software, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

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