What are the ways to install software in Linux?

青灯夜游
Release: 2022-05-11 16:24:23
Original
11794 people have browsed it

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

What are the ways to install software in Linux?

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

Several ways to install software on Linux

1. Steps to install rpm package:

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

2. Open a terminal and su - to become the root user;

3. Enter the directory where the package is located

cd 目录名
Copy after login
Copy after login

4. Execute the installation command

rpm -ivh 包名
Copy after login

Detailed introduction:

1. Installation:

I only need one simple sentence to finish. Execute: rpm –ivh rpm package name More advanced

2. Uninstall:

I also only need a simple sentence to finish. Execution: rpm –e software name

But it should be noted that the software name is used later, not the software package name.

For example, to install the package software-1.2.3-1.i386.rpm, you should execute: rpm –ivh software-1.2.3-1.i386.rpm When uninstalling, you should execute: rpm –e software.

In addition, Linux also provides graphical RPM tools such as GnoRPM and kpackage, making the whole process easier.

2. Installation using yum: (Install rpm package)

rpm is a software package name for Linux, ending with .rmp. The syntax when installing is: rpm -ivh package name. A big disadvantage of the rpm package installation is that the files are too interrelated. Sometimes, installing a software requires installing many other software packages, which is very troublesome.

Therefore, Red Hat Little Red Hat developed the yum installation method. It can completely solve this correlation problem. It is very convenient. You only need to configure two files to install. The installation method is: yum install software package name. yum is not a package, but a software for installing packages

Simply put: rpm can only install rpm packages that have been downloaded to the local machine; yum can download and install rpm packages online, and can update the system. It can also automatically handle dependency issues between packages, which the rpm tool does not have.

Steps:

1. When using yum to install software, you must first determine whether the server can be connected to the Internet normally. If it cannot be connected to the Internet normally, you cannot use yum. Installation

What are the ways to install software in Linux?

#2. When the Internet connection is confirmed, you can install it directly with yum. The syntax isyum install software package name; If the software package name is too long If so, you can directly press the tab key twice and the relevant software will automatically be listed, and then you can install it, as shown below

What are the ways to install software in Linux?

3. deb package installation method Steps:

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

2. Open a terminal and su -Become the root user;

3. Enter the directory where the package is located

cd 目录名
Copy after login
Copy after login

4. Execute the installation command

dpkg -i 包名
Copy after login

Detailed introduction: This is a package manager provided by Debian Linux, which is very similar to RPM.

But because RPM appeared earlier, it is commonly seen in various versions of Linux.

The debian package manager dpkg only appears in Debina Linux, and is generally not available in other Linux versions.

1. Install

dpkg –i deb package name For example: dpkg –i software-1.2.3-1.deb

2. Uninstall

dpkg –e software name For example: dpkg –e software

3. Query: Query the software packages installed on the current system:

dpkg –l ‘*软件包名*’
Copy after login

For example: dpkg – l '*software*'

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

1. Find the corresponding software Package, such as soft.tar.gz, download to a directory on the local machine;

2. Open a terminal, su - to become the root user;

3. cd where soft.tar.gz is located Directory;

4, tar -xzvf soft.tar.gz //Generally, a soft directory will be generated

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) Obtain the application software: obtain it by downloading and purchasing a CD;

2) Decompress files: Generally, tar packages will be compressed again, such as gzip, bz2, etc., so you need to decompress them first. If it is the most common gz format, you can execute: "tar –xvzf package name" to complete the decompression and unpacking work in one step. If not, use decompression software first, and then execute "tar –xvf 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 Installation;

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

Okay, you’re done. We can now run the application. But at this time, some readers will ask, how do I execute it? This is also a Linux-specific problem. In fact, generally speaking, the executable files of Linux application software will be stored in the /usr/local/bin directory! However, this is not a "one-size-fits-all" truth. The most reliable thing is to look at the INSTALL and README files of the software, which usually have instructions.

2. Uninstall:

Usually software developers rarely consider how to uninstall their own software, and tar only completes the packaging work, so there is no Provide a good uninstall method. So does that mean it can’t be uninstalled? In fact, no, there are two software that can solve this problem, namely Kinstall and Kife. They are 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, download it to a directory on this machine;

2. Open a terminal and su - to become the root user;

3. cd the directory where soft.tar.bz2 is located;

4, tar -xjvf soft.tar.bz2 //Generally, a soft directory will be generated

5, cd soft

6, ./configure

7, make

8, make install

Six, apt installation: (install deb package)

##1 , open a terminal, su - to become the root user;

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

3. If found in 2 If you have installed the software soft.version, use the apt-get install soft.version command to install the software

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

Detailed introduction:

apt-get is a package management tool for debian and ubuntu distributions, which is very similar to the yum tool in Red Hat. The apt-get command generally requires root privileges to execute, so it is generally followed by the sudo command example sudo apt-get xxxx

    ##apt-get install packagename - install a new software package (see aptitude below )
  • apt-get remove packagename——Uninstall an installed software package (retain the configuration file)
  • apt-get –purge remove packagename - Uninstall an installed software package (delete configuration file)
  • dpkg –force-all –purge packagename – Some software is difficult to uninstall and blocks other software You can use this for applications, but it’s a bit risky.
  • apt-get autoremove——Because apt will back up all installed or uninstalled software on the hard disk, so if you need space, you can use this command to delete the software you have deleted. Lost software.
  • apt-get autoclean - Run this command regularly to clear the .deb files of uninstalled packages. In this way, a lot of disk space can be freed up. If the need is very urgent, you can use apt-get clean to free up more space. This command will delete the .deb files of the installed software packages together.
  • apt-get clean——This command will also delete the backup of the installed software, but this will not affect the use of the software.
  • apt-get upgrade——Update all installed software packages
  • apt-get dist-upgrade——Upgrade the system to the new Version
  • apt-cache search string——Search for string in the package list
  • apt-cache showpkg pkgs——Display software packages information.
  • apt-cache stats - Check how many software are in the library
  • apt-cache dumpavail - Print the list of available software packages.
  • apt-cache show pkgs - displays package records, similar to dpkg –print-avail.
  • apt-cache pkgnames - print the names of all packages in the package list (You need to run this command regularly to ensure that your package list is up to date)
  • Simply put: dpkg can only install deb packages that have been downloaded to the local machine. apt- get can download and install deb packages online and update the system. It can also automatically handle dependency issues between packages, which is something that the dpkg tool does not have.

7. Bin file installation: If the name of the software you download is soft.bin, generally The following is an executable file. The installation method is as follows:

1. Open a terminal and su - to become the root user;

2. chmod x soft.bin

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

Related recommendations: "Linux Video Tutorial"

The above is the detailed content of What are the ways to install software in Linux?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template