How to install software packages using RPM in Linux

Source: Internet
Author: User
Tags bz2 chmod documentation hash

I've been studying Linux recently, and it's easy to summarize some common commands
Mainly rpm installation command uninstall and query
Tar uncompressed, tar software Installation
File deletion rm is available for file and folder deletion, and rmdir is used to delete empty folders
User-related Useradd and passwd
Permission related chmod, etc.
Mobile and rename MV

Tar
Tar xvfz xampp-linux-1.7.7.tar.gz-c/opt [. tar.gz]
Tar xvfj filezilla.tar.bz2-c/opt [. tar.bz2]
Rpm:
Installation
RPM-IVH ***.rpm
Inquire
RPM-Q * * *
Unloading
RPM-E * * *
View installation Location
RPM-QL * * * * * [RPM-QAL]
Rm:
deleting directories and files
Rm-rf/opt/dir

User:
Add user
Useradd username
Modify password
passwd username
Permissions:
Add permissions
chmod 777/opt/lampp/htdocs
Add write permissions to other groups
chmod o+w xxx.xxx
Change file Owner
Chown username File
View:
View Permissions
Ls-l
Compression:
Zip
Unzip
Move & Rename:
Mv

RPM Uninstall operation

Command:

RPM-E installation packages that need to be uninstalled

Before uninstalling, you usually need to use the rpm-q ... command to identify the installation package name that needs to be uninstalled.

Examples are as follows:

RPM-E TOMCAT4 Uninstall TOMCAT4 Package

RPM Upgrade operation

Command:

Rpm-u packages that need to be upgraded

Examples are as follows:

RPM-UVH example.rpm Upgrade EXAMPLE.RPM Package

RPM Verification operation

Command:

Rpm-v the package that needs to be validated

Examples are as follows:

Rpm-vf/etc/tomcat4/tomcat4.conf

The output information is similar to the following:

S.5 ..... T c/etc/tomcat4/tomcat4.conf

Where S indicates that the file size has been modified, T indicates that the file date has been modified. For more information on verification, please refer to the RPM Help file: Man rpm


Command format:

Rpm-i (or--install) options file1.rpm ... filen.rpm

Parameters:

file1.rpm ... filen.rpm the name of the RPM package that will be installed

Detailed options:

-H (or--hash) output hash mark (' # ') at installation
The--test is only tested for installation and is not actually installed.
--percent the progress of the installation as a percentage.
--excludedocs does not install document files in the package
--includedocs Installation Documentation
--replacepkgs forced reinstallation of installed packages
--replacefiles replace files that belong to other packages
--force ignores package and file conflicts
--noscripts does not run preinstallation and post-Setup scripts
--prefix installs the package to the specified path
--ignorearch does not verify the structure of the package
--ignoreos does not check the operating system on which the package runs
--nodeps does not check dependency relationships
--ftpproxy used as an FTP agent
--FTPPORT specifies that the port number for FTP is

Common options

-V Display additional information
-VV Display Debugging Information
--root lets rpm make the specified path "root" so that the installer and the post-Ann
The installer will be installed in this directory
--rcfile set RPMRC file as
--dbpath the path to set the RPM data inventory is

Second, delete

Command format:

RPM-E (or--erase) options pkg1 ... pkgn

Parameters

Pkg1 ... pkgn: packages to be removed

Detailed options

--test only test for deletion
--noscripts does not run pre-installation and post-Setup scripts
--nodeps does not check dependencies

Common options

-VV Display Debugging Information
--root lets rpm make the specified path "root" so that the installer and the post installation
The program will be installed in this directory
--rcfile set RPMRC file as
--dbpath the path to set the RPM data inventory is

Third, upgrade

Command format

Rpm-u (or--upgrade) options file1.rpm ... filen.rpm

Parameters

FILE1.RPM the name of the FILEN.RPM software package

Detailed options

-H (or--hash) output hash mark (' # ') at installation
--oldpackage allows "Upgrades" to an older version
--test only for upgrade testing
--excludedocs does not install document files in the package
--includedocs Installation Documentation
--replacepkgs forced reinstallation of installed packages
--replacefiles replace files that belong to other packages
--force ignores package and file conflicts
--percent the progress of the installation as a percentage.
--noscripts does not run preinstallation and post-Setup scripts
--prefix installs the package to the specified path
--ignorearch does not verify the structure of the package
--ignoreos does not check the operating system on which the package runs
--nodeps does not check dependency relationships
--ftpproxy used as an FTP agent
--FTPPORT specifies that the port number for FTP is

Common options

-V Display additional information
-VV Display Debugging Information
--root lets rpm make the specified path "root" so that both the preinstallation program and the post installer are installed in this directory
--rcfile set RPMRC file as
--dbpath the path to set the RPM data inventory is

Four, inquiries

Command format:

Rpm-q (or--query) options

Parameters:

Pkg1 ... PKGN: Querying Installed Packages

Detailed options

-P (or '-') to query the package's files
Which package the-F query belongs to
-A query for all installed packages
--whatprovides Query provides a functional package
-G query for packages that belong to a group
--whatrequires query All software packages that require functionality

Information options

Displays the full identity of the package
-I display the package's summary information
-L displays a list of files in the package
-C Display profile list
-D displays a list of document files
-S Displays the list of files in the package and displays the status of each file
--scripts display installation, uninstall, verify scripts
--queryformat (or--QF) displays query information in a user-specified manner
--dump displays all verified information for each file
--provides displays the functionality provided by the package
--requires (or-r) Displays the functionality required by the package

Common options

-V Display additional information
-VV Display Debugging Information
--root lets rpm make the specified path "root" so that both the preinstallation program and the post installer are installed in this directory
--rcfile set RPMRC file as
--dbpath the path to set the RPM data inventory is

V. Verify installed Packages

Command format:

Rpm-v (or--verify, or-y) options

Parameters

Pkg1 ... pkgn the package name that will be validated

Package options

-P Verify against package file
-F Checksum belongs to the package
-a Verify verifies all packages
-G verifies all packages that belong to the group

Detailed options

--noscripts does not run validation scripts
--nodeps Non-checksum dependency
--nofiles does not verify file properties

Common options

-V Display additional information
-VV Display Debugging Information
--root lets rpm make the specified path "root" so that both the preinstallation program and the post installer are installed in this directory
--rcfile set RPMRC file as
--dbpath the path to set the RPM data inventory is

Verify the files in the package

Grammar:

Rpm-k (or--checksig) options file1.rpm ... filen.rpm

Parameters:

file1.rpm. filen.rpm software package file name

checksig--Detailed Options

--NOPGP not verifying PGP signature

Common options

-V Display additional information
-VV Display Debugging Information
--rcfile set RPMRC file as


Vii. Other RPM options

--REBUILDDB Rebuild RPM Database
--INITDB Create a new RPM database
--quiet as much as possible to reduce output
--help Display Help files
--version shows the current version of RPM

Related Article

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.