Home  >  Article  >  php教程  >  Detailed explanation of the steps for installing rpm packages under Linux operating system

Detailed explanation of the steps for installing rpm packages under Linux operating system

高洛峰
高洛峰Original
2017-01-07 13:58:413160browse

The second generation Linux operating system is quite simple in terms of installing software: the first step is to search for the software you want. For example, if you are looking for a game software, its name is myward. The description of this game software is: myown war game . To search for this software package in the Linux operating system, you only need to enter the command apt-cache searchmyward, or enter apt-cache searchwar as part of the software name, or you do not know the software name.

There is a picture below that can clearly show the architectural relationship of Linux software applications:

详解Linux 操作系统下安装rpm包的方法步骤

When Linux starts. First, the kernel is started. The kernel is a computer program. This program directly manages the hardware, including CPU, memory space, hard disk interface, network interface, etc. All computer operations are passed to the hardware through the kernel. We can see that Linux uses the kernel to realize the dialogue between software and hardware. Through this important interface of system calls, Linux completely separates the upper-layer application from the lower-layer kernel, hiding the underlying complexity for programmers (correspondingly, it also improves the portability of the upper-layer application). When we upgrade the kernel, we can also keep the system call statements unchanged, so that the upper-layer applications do not feel the changes in the lower-layer. Library functions use system calls to create modular functionality, while the shell provides a user interface and allows us to write scripts using shell syntax to integrate programs. With these ideas, we can quickly understand the installation and working principles of Linux software applications. Therefore, in order to facilitate and obtain more enterprise applications, we need to develop on the Linux system and produce various software packages through source code compilation to provide information services in the modern era.

It is particularly worth mentioning that there are many things worth learning about the Linux operating system. Here we mainly introduce the Linux operating system, including an introduction to the Linux operating system and other aspects. Summary of Linux operating system software installation methods

1. RPM package installation method steps:

Quote:

1. Find the corresponding software package, such as soft.version.rpm, Download to a directory on this machine;
2. Open a terminal, su - to become the root user;
3. cd the directory where soft.version.rpm is located;
4. Enter rpm -ivh soft.version .rpm

2. Steps to install the deb package:

Quote:

1. Find the corresponding software package, such as soft.version.deb, and download it to a certain location on your local computer. directory;
2. Open a terminal, su - to become the root user;
3. cd the directory where soft.version.deb is located;
4. Enter dpkg -i soft.version.deb

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

Quote:

1. Find the corresponding software package, such as soft.tar.gz, and download it to a directory on your local machine ;
2. Open a terminal, su - to become the root user;
3. cd the directory where soft.tar.gz is located;
4. tar -xzvf soft.tar.gz // Generally, a soft directory
5, cd soft
6, ./configure
7, make
8, make install

4. tar.bz2 source code package installation method:

Quote:

1. Find the corresponding software package, such as soft.tar.bz2, and download it to a directory on the local machine;
2. Open a terminal and su - to become the root user;
3. The directory where cd 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

5. Installation in apt mode:

Quote:

1. Open a terminal, su - 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 the software soft.version is found in 2, use the apt-get installsoft.version command to install it Software Note: As long as you have access to the Internet, you only need to use apt-cachesearch to find the software, and use apt-get install software

6. Bin file installation:

If the name of the software you downloaded is soft .bin is generally an executable file. The installation method is as follows:

Quote:

1. Open a terminal, su - to become the root user;
2. chmod +x soft .bin
3, ./soft.bin //Run this command to install the software

7. Software that does not need to be installed:

With some software, such as lumaqq, There is no need to install it, it can be run directly after decompressing the built-in jre. Assuming that you downloaded lumaqq.tar.gz, the usage method is as follows:

Quote:

1. Open a terminal, su - to become the 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 lumaqq program file to be runnable
5. Now you can run lumaqq, just use the command ./lumaqq, but you need to enter the full path each time you run it or switch to the one you just generated
6 in the LumaQQ directory. In order to ensure that it can be used without setting a path, you can create a lumaqq link in the /bin directory and use the command ln-s lumaqq /bin/. Open a terminal and enter lumaqq at any time in the future. You can start the QQ chat software
7. If you want lumaqq to have a menu item, use a menu editing tool, such as AlacarteMenuEditor, and find lumaqq in the LumaQQ directory generated above to set a menu item. Of course, you can also You can directly go to the /usr/share/applications directory and generate your own desktop file according to the format of other *.desktop files in it.

It is recommended that developers do not use first-generation Linux operating systems such as red hat/redflag/suse. There is nothing good about using these except for convenience (which means they are more fool-proof) and luxurious interfaces. Use debian/ubuntu or other second generation software. The apt command is the easiest to install software. The apt command will automatically solve dependency issues during software installation, install packages that are not available, and automatically upgrade packages with lower versions. Of course, this requires your confirmation.

If you use the first generation Linux system such as Red Hat, installing software is more troublesome. rpm-ivhsoftA.rpm is used to install softA software, but usually the problems you may encounter are prompts It says that you need to install a bunch of software such as softB1, softB2, softB3, etc., and then when you install the softB1 software package, you may be prompted to say that you need to install a bunch of software such as softC1, softC2, softC3, softC4... In this way, you only have enough time. I've been looking for these packages everywhere.

If it is not on the CD, you have to download it online. You have to search online for a long time, and all your time is spent searching for software packages. And even if you find these software packages, you may still encounter a problem: the softC2 software package must be installed before the softC1 software package. If the order is wrong, the installation will not be successful.

But who knows? It’s difficult. So, you don’t have time to install and experience the software’s features, let alone develop the software. It is recommended that you install the second generation Linux operating system, typically Debian Linux and Ubuntu Linux. I mentioned a concise installation manual in the article "How to install the Linux operating system on a computer with Windows operating system" before. You can download it and follow it. You can then install Ubuntu.

The second-generation Linux operating system is quite simple to install software: the first step is to search for the software you want. For example, if you are looking for a game software, its name is myward. The description of this game software is: my own war game. To search for this software package in the Linux operating system, you only need to enter the command apt-cache searchmyward, or enter apt-cache searchwar as part of the software name, or you do not know the software name.


For more detailed explanations on the methods and steps for installing rpm packages under the Linux operating system, please pay attention to the PHP Chinese website for related articles!


Statement:
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