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

Linux configure local YUM source

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

Most of the database servers in the production environment run on the intranet and will definitely not be connected to the public network, which is more dangerous, has great security risks, and does not rule out the possibility of being hacked.

The default linux is to make use of the yum resources of the network, so when there is no external network. We want to build a local yum source yum advantages, you can automatically analyze the dependency system, before the rpm command installation, if you encounter a dependency, install this to show.

1 Mount the CD to the directory can be viewed by the command mount, generally, it will be mounted automatically by default. If there is no automatic mount, the manual mount method looks at the cdrom command ll / dev | grep cdrom

Mount / dev/scd0 / media

2 copy the software package in the system disk to this system

Cp-r / mnt/Server/* / var/ftp/pub

Copy all the software packages in the CD to the / var/ftp/pub directory can be customized, but you can build a ftp server in the future, and the directory accessed by anonymous ftp users is in this place, so you can let others use the yum source you built through ftp.

3 generate dependency relationship createrepo-g / var/ftp/pub/repodata/comps-rhel5-server-core.xml / var/ftp/pub/ this step is mainly to use createrepo to save the dependency file generated by the software package in this directory in the repodata/comps-rhel5-server-core.xml file, when the package will first open this file to analyze the dependency. Comps-rhel5-server-core.xml is available on the default installation CD.

4 create a new warehouse file

Cd / etc/yum.repos.d (create a new warehouse file, must end with .repo) vi yum.repo [base] name=base / / the warehouse name can be customized baseurl= file:///var/ftp/pub / / this is the local yum source address

Enabled=1 / / whether to enable the source

Enter the command yum list to see the package.

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