Get the App
SLTechnology News&Howtos  ›  Servers  › 

Yum warehouse, common directory uses and soft and hard connections

Shulou Source: shulou.com Published: 2022-06-03 06:09:34 09月21日 Update

First of all, let's find out what Yum is. Its full spelling is Yellow dog Updater Modified, and Yum is also a command in Linux systems. Its purpose is to install, remove automated upgrade rpm packages (package management), and collect information about rpm packages. At the same time, check the package prompts the user that the installation software depends on. Its function is similar to that of windows's download tool, but Yum is more powerful.

When we know about Yum, let's take a look at the Yum warehouse.

The Yum repository uses the command Yum to download the image address of the software, and we often use yum-y install to install the software. In the CentOs system version, the main configuration file of Yum is operated under / etc/yum.repos.d:

Check the installation of the software package vsftpd

Real machine] $rom-Q vsftpd

Real machine] $systmctl staus vsftpd restart vsftpd service

Mounting

Real machine] $mkdir / var/ftp/centos-1804/

Real machine] $mount / iso/CentOS7-1804.iso / var/ftp/centos-1804

Real machine] $vim / etc/fstab

/ var/lib/libvirt/images/iso/CentOS7-1804.iso / var/ftp/centos-1804 iso9660 defaults

0 0

Airliner] $vim / etc/yum.repos.d/local.repo

[local_repo]

Name=CentOS-$releasever- Base

Baseurl= "ftp://192.168.4.254/centos-1804"

Enabled=1

Gpgcheck=0

Real machine] $yum-y install httpd

Here is some additional knowledge:

The use of common first-level catalogs

/ boot stores the files necessary to boot the system, including kernel and startup configuration.

/ bin or (sbin) stores various command programs

/ dev stores various device files such as hard disk, optical drive, etc.

/ etc stores configuration files of Linux system and various programs

/ root administrator root directory

/ home ordinary user home directory

/ var stores frequently changing files such as logs, mailboxes, etc.

/ tmp stores some temporary files

Soft connection and hard connection

Hard connection: similar to ordinary files, inode points to the blocks of the same file on the hard disk.

Soft connection: saves the absolute path represented by the file, is another kind of file, has a separate block on the hard disk, and replaces its own path when accessing.

] # rm-rf / opt/ (all in the / opt/ directory here)

] # echo 123456 > / opt/A

] # cat / opt/A

] # ln-s / opt/A / opt/B to make soft connection

] # ls / opt/

] # cat / opt/B

] # ln / opt/A / opt/C to make hard connection

] # ls / opt/

The above is the content of this time. There will be some loopholes in my blog. Bloggers who are familiar with this knowledge are very welcome to point it out to me. Thank you very much!

Tags: File software directory system command knowledge hard disk configuration warehouse normal block user program path software package production management common purpose powerful Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker vpn Shulou Information Huawei Linux