Tutorials for installing, uninstalling, and upgrading programs in Linux systems

Source: Internet
Author: User
Tags manual file size md5 file permissions

For Linux beginners, the RPM installation is a good choice. If you want to really master the Linux system, the source code installation is still a software installation under Linux is an important means. Because the Linux system application software installation and familiar Windows under the installation process of the software is very different, in Linux, according to the format of downloading to the installation package of different installation methods, the following will be the application of Linux installation of the summary and induction.

1, the source code package installation

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

Tar xvf Apache_1.3.20.tar (unpack)

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 all of them, such as Webmin

To execute its directory./setup.sh into the interactive configuration installation

Uninstall with Uninstall program

Specifically, if you don't see the Readme file under the package you want to install

2, the installation of RPM package

An example of the RPM software package:

foo-1.0-1.i386.rpm

These include the package name (foo), the version number (1.0), the issue number (1), and the 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 ignores the error message.

B. File conflicts

If one of the packages you want to install is already installed when you install another package, you receive the following error message:

# 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

To allow RPM to ignore this error message, use the--replacefiles command-line option

C. Unresolved dependencies

The RPM package may depend on other software packages before the package can be installed after 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 packages you rely on to solve this problem. Use the-nodeps command-line option if you want to force the installation (however, you may not be able to run the installed package properly).

(2) Uninstall

# rpm-e Foo

Note: This uses the package name Foo, not the package file name "foo-1.0-1.i386.rpm".

If other packages depend on the package you want to uninstall, an error message is generated when uninstalling. Such as:

# rpm-e Foo

Removing these packages would break dependencies:

Foo is needed by bar-1.0-1

To have the RPM ignore the error message to continue uninstalling (however, programs that depend on the package may not be able to run), use the-nodeps command-line option.

(3) Upgrade

# RPM-UVH foo-2.0-1.i386.rpm

Foo

###############################

When you use an older version of the package to upgrade a new version of the software, 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 adhere to this "upgrade", use the--oldpackage command-line arguments.

(4) Query

# rpm-q Foo

Foo-2.0-1

Package Specify options:

-A query for all installed packages.

-F <file> packages with files included in the query

-P <packagefile> query package file name <packagefile> Package

Information selection options:

-I displays package information, such as description, distribution 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 labeled as Documents (man manual, info Manual, README ' s, etc).

-C Displays a list of files that are labeled as profiles. These are the files to be customized after installation (SENDMAIL.CF, passwd, Inittab, etc).

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

(5) Verify

The validation package is performed by comparing the original file information in the files and packages installed in the package. Among other things, validation is mainly to compare file sizes, MD5 check codes, file permissions, types, and user groups.

The RPM-V command is used to validate a package, such as

Rpm-v Foo

Verifying packages that contain specific files: Rpm-vf/bin/vi

Verify all installed packages: Rpm-va

Verify a package according to an RPM: RPM-VP foo-1.0-1.i386.rpm

If you're worried that the RPM database has been compromised, you can use this approach. If all checksums are normal, no output will be generated. If there is any inconsistency, it will be shown.

The output format is a 8-bit long string, and C is used to refer to the configuration file, followed by the filename. Each of the 8-bit characters represents the result of a comparison between a file and an attribute in the RPM database. “.” (point) 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 (includes permissions and file types)

If there is information output, it should be carefully considered, is deleted, reinstall, or fix the problem.

(6) Several examples of RPM applications

A. If you accidentally delete some files, but not sure which files are deleted. If you want to verify the entire system and see what files are missing, you can type: Rpm–va

B. If some files are missing or damaged, you can reinstall them or uninstall them before installing the package. If you encounter a file that you do not know, to investigate which package it belongs to, you can enter the following command: Rpm-qf/usr/x11r6/bin/xjewel

And the result of the output would be: xjewel-1.6-1

C. If there is a synthesis of the above two examples, there is a problem with/usr/bin/paste. You want to verify the software package that owns the file, but you don't know the name of the package, you can simply type: rpm-vf/usr/bin/paste

The corresponding package will be validated.

D. If you want to learn more about a program that you are using, you can type the following command to obtain document information from the package that owns the program: Rpm-qdf/usr/bin/ispell

The output results are:

/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

Graphics Management tools: KPackage

3. Shell or Java Script installation

Based on graphical interface 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, very easy, and windows like </ packagefile> </packagefile> </file></file>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.