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

Package installation and uninstallation

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

I. three methods of installing software packages

1. Rpm tool

2. Yum tool

3. Source code package

2. Introduction of rpm package

1. Mount the CD image

Select the small CD icon in the lower right corner of the virtual machine, right-click to connect, and mount the connection to the / mnt directory.

Go to the / mnt directory. These are the files used in the system CD.

Check the rpm package in Packages

The meaning of each name:

Zip-3.0-11.el7.x86_64.rpm

Zip represents the package name

3.0 indicates the version number

11.el7 indicates that release number 7 stands for centos7

X86'64 represents 64-bit centos7 regardless of 32, 64-bit default is 64-bit 64-bit, you can install 32-bit installation package, as under Windows

Rpm stands for suffix name

III. Usage of rpm tools

Rpm option

-I stands for install

-v means visualization

-h indicates the progress of installation

-U stands for update

-e means to uninstall a package

-qa queries a package

-qi queries the specified package information

-ql lists the installation information of a package

-qf query file absolute path / / check which package this package is installed by

Rpm-qf 'which cd' to see where the path package for this command is

Installation:

Rpm-ivh rpm package file, add a path

Upgrade:

Rpm-Uvh rpm package file plus path

Uninstall:

Rpm-e rpm package name

Query installed packages

Rpm-qa

Query whether a package is installed

Rpm-Q package name

Query the information of the specified package

Rpm-qi yum

List the files installed by the package

Rpm-ql yum

Query which package a file is installed by

Absolute path to the rpm-qf + file

Use the backquotation mark which command to view commands that can only be checked for one line of path, not 2 lines

IV. Yum tools

Support for automatic installation of dependency packages

Usage:

List the available yum package yum list

Base represents the warehouse name. Check the warehouse name in the yum configuration file.

Ls / etc/yum.repos.d/ View

Use cat / etc/yum.repos.d/CentOs-base.repo

Search for a package yum search

Precisely find yum list | grep

Grep: filter specified string |: pipe character

Install yum package yum install (- y) name (package name)-y is not prompted to install

List available groups: yum grouplist

Installation group yum groupinstall (- y) "group name"

Uninstall package yum remove (- y) package name

Upgrade package yum update (- y)

If you do not add the package name, all packages will be upgraded, including the system version and kernel. It is recommended to use the newly installed system.

Command search package Note: this is for uninstalled commands

Yum provides "/ * / vim"

5. Yum builds a local warehouse

First mount the CD to the / mnt/ directory so that the system can access it

Yum cannot be used without networking, so you can build a local repository to facilitate the installation of packages and the packages it depends on.

Some things may be deleted during the operation, so you need to back up in advance.

Cp-r / etc/yum.repos.d / etc/yum.repos.d.bak

Delete the files under / etc/yum.repos.d/

Create dvd.repo

Vi / dvd.repo

Clear cach

Yum clean all with @ indicates the installed package, br/ > with @ indicates the installed package, and the following indicates the package that can be installed.

If the local or network source exists at the same time, if you want to install using the local source, you need to rename or delete the network source.

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