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

How to install software program under Linux system

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

Share

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

This article mainly introduces "how to install software programs under the Linux system". In daily operation, I believe many people have doubts about how to install software programs under the Linux system. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts about "how to install software programs under the Linux system". Next, please follow the editor to study!

1. Installation of source code package

Gzip-d apache_1.3.20.tar.gz (decompression)

Tar xvf apache_1.3.20.tar (unpacking)

Cd apache_1.3.20

. / configure (configuration) -. / configure-help (view configure options)

Make (compiled)

Make install (installation)

Make clean (uninstall)

Note: typical source code packages can be installed like this, but not always, such as webmin

To execute the. / setup.sh in its directory to enter the interactive configuration installation

Uninstall the uninstall program

If you do not clearly look at the README file under the package to be installed

2. Installation of RPM package

An example of a RPM package:

Foo-1.0-1.i386.rpm

These include the name of the package (foo), version number (1. 0), release number (1), and hardware platform (i386).

(1) installation

# rpm-ivh foo-1.0-1.i386.rpm

Foo

# # #

a. The package has been installed

# rpm-ivh foo-1.0-1.i386.rpm

Foo package foo-1.0-1 is already installed

Error: foo-1.0-1.i386.rpm cannot be installed

If you still want to install the package, you can use the-- replacepkgs option on the command line, which will ignore the error message.

b. File conflict

If a file in the package you are installing is already installed when you install another package, the following error message appears:

# rpm-ivh foo-1.0-1.i386.rpm

Foo / usr/bin/foo conflicts with file from bar-1.0-1

Error: foo-1.0-1.i386.rpm cannot be installed

If you want RPM to ignore the error message, use the-- replacefiles command line option

c. Unresolved dependencies

The RPM package may depend on other packages and cannot be installed until a specific package has been installed.

# rpm-ivh bar-1.0-1.i386.rpm

Failed dependencies:

Foo is needed by bar-1.0-1

You must install the dependent software package to solve this problem. If you want to force the installation (however, the installed package may not work properly), use the-nodeps command line option.

(2) Uninstall

# rpm-e foo

Note: the name of the package foo is used here instead of the name of the package file "foo-1.0-1.i386.rpm".

If other packages depend on the package you are uninstalling, an error message will be generated when you uninstall it. Such as:

# rpm-e foo

Removing these packages would break dependencies:

Foo is needed by bar-1.0-1

If you want RPM to ignore the error message and continue to uninstall (however, programs that depend on the package may not run), use the-nodeps command line option.

(3) upgrade

# rpm-Uvh foo-2.0-1.i386.rpm

Foo

# #

When upgrading a new version of the software with an old version of the software package, the following error message is generated:

# rpm-Uvh foo-1.0-1.i386.rpm

Foo package foo-2.0-1 (which is newer) is already installed

Error: foo-1.0-1.i386.rpm cannot be installed

To make RPM persist in this "upgrade", use the-- oldpackage command-line argument.

(4) Enquiry

# rpm-Q foo

Foo-2.0-1

Package assignment options:

-a query for all installed software packages.

-f; query the software package containing the file;

-p

Query the package file named;

Information selection options:

-I displays package information, such as description, release number, size, build date, installation date, platform, and other information.

-l displays a list of files in the package.

-s displays the status of all files in the package.

-d displays a list of files marked as documents (man manual, info manual, README's, etc).

-c displays a list of files marked as configuration files. These are the files (sendmail.cf, passwd, inittab, etc) to be customized after installation.

For files that want to display a list of files, you can add the-v command line option to get output in the same format as ls-l.

(5) Verification

Verifying the package is done by comparing the files installed in the package with the original file information in the package. Among other things, validation is mainly about comparing file sizes, MD5 checkcodes, file permissions, types, owners and user groups, etc.

The rpm-V command is used to verify a software package, such as

Rpm-V foo

Verify the package that contains a specific file:

Rpm-Vf / bin/vi

Verify all installed packages:

Rpm-Va

Verify a software package against a RPM:

Rpm-Vp foo-1.0-1.i386.rpm

If you are worried that the RPM database has been corrupted, you can use this approach. If all the checks are normal, no output will be produced. If there is any inconsistency, it will be shown.

The output format is an 8-bit long string, c is used to refer to the configuration file, followed by the file name. Each 8-bit character is used to represent the result of a comparison between a file and an attribute in the RPM database. "." (dot) indicates that the test passed.

The following characters indicate the failure of a test:

5 MD5 check code

S file size

L symbolic connection

T file modification date

D equipment

U user

G user group

M mode e (including permissions and file types)

If there is information output, it should be carefully considered, whether to delete, reinstall, or correct the problem.

(6) several examples of RPM application

a. For example, you have deleted some files by mistake, but you are not sure which files have been deleted. If you want to verify the entire system to see which files are missing, you can type:

Rpm-Va

b. If some files are missing or corrupted, you can reinstall or uninstall the package before installing it. If you come across a file you don't know, to find out which package it belongs to, type the following command:

Rpm-qf / usr/X11R6/bin/xjewel

The result of the output will be:

Xjewel-1.6-1

c. If there is a combination of the above two examples, such as the article / usr/bin/paste has a problem. If you want to verify the package that owns the file, but you don't know the name of the package, you can simply type:

Rpm-Vf / usr/bin/paste

In this way, the corresponding software package will be verified.

d. If you want to know more about a program you are using, you can type the following command to get the documentation information in the package that owns the program:

Rpm-qdf / usr/bin/ispell

The output is as follows:

/ usr/man/man4/ispell.4

/ usr/man/man4/english.4

.

e. If you find a new koules RPM but don't know what it is, you can type the following command:

Rpm-qip koules-1.2-2.i386.rpm

f. Now you want to know the files installed by koules RPM. You can type:

Rpm-qlp koules-1.2-2.i386.rpm

Drawing management tool: kpackage

3. Shell or java script installation

Graphical interface-based installation, generally based on SHELL or Java language, mainly used in some office software and graphics software and installation programs, such as staroffice, oracle installation, is easy, just like windows

At this point, the study on "how to install software programs under the Linux system" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

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