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 methods of installing software in linux

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

Share

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

This article will explain in detail the methods of installing software in linux. The editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.

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. The directory where cd soft.version.rpm is located

4. Enter rpm-ivh soft.version.rpm

Detailed introduction:

1. Installation:

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

Package name of rpm-ivh rpm

For more advanced, see the following table:

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:

I also need only a simple sentence to finish. Execute:

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, you should execute:

Rpm-ivh software-1.2.3-1.i386.rpm

When uninstalling, you should execute:

Rpm-e software.

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

2. Steps for installing deb package:

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. The directory where cd soft.version.deb is located

4. Enter dpkg-I soft.version.deb

Detailed introduction:

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

Such as: 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*'

3. 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 work of packaging, 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.

4. 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

5. 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 (deletes 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 package online and update the system.

It can also automatically deal with package-to-package dependencies, which dpkg tools do not have.

6. Yum installation: (install rpm package)

Rpm is a package name for linux that ends with .rmp and is installed with the syntax: rpm-ivh.

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 a yum installation method, he can completely solve this related problem, very convenient, as long as the configuration of two files can be installed, the installation method is: yum-y install.

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 package online and update the system.

It can also automatically deal with package-to-package dependencies, which rpm 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

Software that does not need to be installed:

Some software, such as lumaqq, does not need to be installed and can be run directly after being unzipped with JRE. Hypothetical

Download lumaqq.tar.gz and use it as follows:

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

2. Tar-xzvf lumaqq.tar.gz / / this step will generate a directory called LumaQQ

3 、 cd LumaQQ

4. Chmod + x lumaqq / / set the program file lumaqq to runnable

5. At this point, you can run lumaqq with the command. / lumaqq, but enter the full path or change to the LumaQQ directory you just generated.

6. In order to ensure that the path can be used without setting the path, you can set up a link to lumaqq in the / bin directory and use the command ln-s lumaqq / bin/. Any time later, you can open a terminal and type lumaqq to start QQ chat software.

7. If you want lumaqq to have a menu item, use a menu editing tool such as Alacarte Menu Editor to find the lumaqq in the LumaQQ directory generated above and set a menu item. Of course, you can also go directly to the / usr/share/applications directory and generate your own desktop file according to the format of other * .folders files.

Installation of software

There are mainly two different forms of software installation under Linux. The first installation file is called filename.tar.gz. The other installation file is called filename.i386.rpm. The software released in the first way is mostly sent in the form of source code. The second method is distributed directly in binary form. I386 means that the software is compiled and generated according to the Inter 386 instruction set.

For the first, the installation method is as follows:

First, copy the installation files to your directory. For example, if you are logged in as root, copy the software to / root.

# cp filename.tar.gz / root

Because the file is compressed and packaged, it should be extracted. The command is: # tar xvzf filename.tar.gz

After executing the command, the installation file is extracted in the current directory according to the path. You can see the unzipped file with the ls command. Usually in the unzipped file, there is a file named "INSTALL". The file is a plain text file, and the installation method of the software package is described in detail.

For most software that needs to be compiled, it is installed in much the same way. Execute an executable script named configure that is unzipped. It is used to check whether the system has the library needed for compilation, and whether the version of the library meets the needs of compilation and other system information needed for installation. Prepare for subsequent compilation. The command is: #. / configure

If an error is found during the inspection, configure will prompt you and stop the inspection. You can follow the prompts to configure the system. And then re-execute the program. After the check passes, the MakeFile file for compilation is generated. At this point, you can start compiling. The compilation process varies depending on the size of the software and the performance of the computer. The command is: # make

After successful compilation, type the following command to start the installation: # make install

After installation, the temporary files generated during the compilation process and the files generated during the configuration process should be cleared. Type the following command: # make clean # make distclean

At this point, the installation of the software is over.

For the second, the installation method is much simpler.

As in the first way, copy the installation files to your directory. Then use rpm to install the file. The command is as follows: # rpm-I filename.i386.rpm

Rpm will automatically unpack the installation files and install the software to the default directory. And register the installation information of the software into the database of rpm. The function of parameter I is to put rpm into installation mode.

In addition, there are some commercial software under the Linux platform. In its installation file, there is the Setup installer, which is installed in the same way as under the Windows platform. Such as: Corel WordPerfect.

Uninstall the software

Rpm is mainly used to uninstall the software. The first thing to uninstall the software is to know the name of the package registered in the system. Type the command: # rpm-Q-a

You can query all the software packages installed in the current system. The function of the parameter Q is to put rpm into query command mode. Parameter an is a child of the query pattern, meaning ALL. More information can be queried, which can be displayed by less human screen.

After determining the name of the software to be uninstalled, you can begin to actually uninstall the software. Type the command: # rpm-e [package name] to uninstall the software.

The function of the parameter e is to put the rpm into uninstall mode. Uninstall the package named [package name]. Because the software packages in the system depend on each other. If you cannot uninstall because of a dependency, rpm prompts you to stop the uninstall.

You can use the following command to ignore dependencies and start uninstalling directly: # rpm-e [package name]-nodeps ignoring the uninstallation of dependencies may cause other software in the system to be unavailable. You can use # rpm-e [package name]-test to make rpm do an uninstall rehearsal instead of actually uninstalling. This allows you to check whether the software has dependencies. Whether there are any errors during the uninstall process.

This is the end of this article on "what are the methods of installing software in linux?". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

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