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 software installation packages under the Linux operating system

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

Share

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

This article mainly introduces what the software installation packages are under the Linux operating system, the article is very detailed, has a certain reference value, interested friends must read it!

One: rpm package

Rpm package, there are two kinds, binary rpm and source rpm

Binary rpm, which we usually use the most, has been compiled, just install it.

In the past, when I was learning linux, I always wanted to install software through rpm, but it is simple enough for you to install through rpm, but you don't have any place to set up, as a teacher said at that time, such as windows,ms expert installation and I install, there is no difference, because there is no place where you can operate.

In fact, this is the case with rpm installation, the advantage of course is simple, all installation default. Save time. Come on.

Two: source code

If we are downloading the source code, then this is about a compilation.

Under linux, all programs are developed with c, so how can programs developed with c be recognized by cpu? then we need a compiler, a compiler of gcc, to convert the code into machine-recognized code. Cpu only knows 0 and 1.

When the source code is compiled into binary code, that is, binary code, you can install it on your machine.

If we download binary code, binary code, this take mysql as an example, a lot of documents, mysql is download binary code, then after you decompress, you can actually use it directly.

Source code is a code written by a programmer

Binary code is the code that the machine runs.

Source code has to go through compile to become binary code.

How to divide it? Use the file command to take a look:

Tar-zxvf some.version.tar.gz

Cd some

File *

$file source.file

$file binary.file

There are two kinds of RPM: binary rpm and source rpm.

The former is a compiled binary, which is available for installation.

The latter is the source that has not been compiled yet, which can only be installed after rebuild.

How to install the .src.rpm package

Some packages end in .src.rpm, which are rpm packages that contain source code and need to be compiled at installation time. There are two ways to install this kind of software package

Method 1:

1. # rpm-I your-package.src.rpm

2. # cd / usr/src/redhat/SPECS

3. # rpmbuild-bp your-package.specs / / A specs file with the same name as your software package

4. # cd / usr/src/redhat/BUILD/your-package/ A directory with the same name as your package

5. #. / configure

6. # make

7. # make install

Method 2:

1. # rpm-I you-package.src.rpm

2. # cd / usr/src/redhat/SPECS

3. Rpmbuild-bb your-package.specs / / A specs file with the same name as your package. At this point, in / usr/src/redhat/RPM/i386/ (depending on the package, it could be i686 drawing noarch, etc.) in this directory, there is a new rpm package, which is the compiled binary.

4. # rpm-I new-package.rpm can be installed.

The above is all the contents of the article "what are the software installation packages under the Linux operating system". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

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