Get the App
SLTechnology News&Howtos  ›  Servers  › 

Cloud Computing Learning Route course syllabus Courseware: managing RPM packages using RPM tools

Shulou Source: shulou.com Published: 2022-06-02 14:30:35 10月02日 Update

Cloud Computing Learning Route course syllabus Courseware: use RPM tools to manage RPM packages:

=

Need to consider:

OS version, e.g. Centos6/7 # cat / etc/redhat-release

System architecture, e.g. I386/x86_64 # uname-m

Dependency, e.g. Ntfs-3g-devel needs to rely on ntfs-3g

Version of the rpm package, e.g. 2015 and 2017

= = install

Rpm-ivh local_path

Rpm-ivh url_path

[root@tianyun ~] # rpm-ivh ntfs-3g-2017.3.23-1.el7.x86_64.rpm package name

[root@tianyun ~] # rpm-Uvh ntfs-3g-2017.3.23-1.el7.x86_64.rpm package name

[root@tianyun ~] # rpm-ivh http://dl.fedoraproject.org/pub/epel/7/x86_64/n/ntfs-3g-devel-2017.3.23-1.el7.x86_64.rpm

Additional options:

-- nosignature / / does not verify the signature of the software package

-- force / / forced installation of the software package yum reinstall

-- nodeps / / ignore dependencies

Software uninstall

# rpm-e Software name

-e erase

-- force is used during installation (force override installation)

-- nodeps is used when uninstalling (dependencies are not checked when uninstalling)

The RPM package installation information is stored in the local RPM database.

= = query

(from the local rpm database)

[root@tianyun ~] # rpm-Q ntfs-3g / / query whether the specified package is installed

[root@tianyun ~] # rpm-qa | grep ntfs

[root@tianyun ~] # rpm-ql ntfs-3g / / query the files installed by ntfs-3g

[root@tianyun ~] # rpm-qf / usr/bin/ntfs-3g / / query which rpm package the file belongs to

[root@tianyun ~] # rpm-qi ntfs-3g / / query package information

[root@tianyun ~] # rpm-qc ntfs-3g / / query the configuration file installed by a package

[root@tianyun ~] # rpm-qd vsftpd / / check the installation help documentation

= = Uninstall

[root@tianyun] # rpm-e ntfs-3g

[root@tianyun] # rpm-e ntfs-3g-- nodeps! Uninstall directly without detecting dependencies

Case 3: install the following software packages

Vsftpd

Samba

Nfs-utils

Httpd

Dhcp

Postfix

Mysql-server

Php

Lftp

Dos2unix

Unix2dos

Tigervnc

[root@tianyun Packages] # pwd

/ media/cd/Packages

[root@tianyun Packages] # rpm-ivh samba-3.0.33-3.37.el5.i386.rpm samba-common-3.0.33-3.37.el5.i386.rpm

Summary of the rpm tool management package:

It is difficult to solve package dependencies

If a file does not exist, it is difficult to know which rpm package provides it, for example, which package provides the semanage or tree commands?

Remote copy

[root@test tmp] # scp / tmp/aa.txt 172.16.110.1:/tmp/

[root@robin ~] # scp / root/install.log 172.16.110.30:/tmp/

[root@robin ~] # scp 172.16.110.30:/tmp/aa.txt 172.16.110.40:/tmp/

Tags: Software query file software package e.g. time tool management suite data database version mandatory outline tutorial courseware route study information name Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology macOS Apple NVidia Microsoft