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

Configuration of SHELL script remote yum source and installation of yum repository

2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

Remote yum warehouse 1. The remote server yum source script is as follows: #! / bin/bash# mount image file mount / dev/sr0 / mnt# install ftp service yum install vsftpd-y # create ftp site cd / var/ftpmkdir centos7mkdir othercp-rf / mnt/* centos7/ & createrepo-g / mnt/repodata/repomd.xml other/# enable service systemctl start vsftpd# close firewall systemctl stop firewalld.servicesetenforce 02. The local server installs the yum repository script as follows #! / bin/bash# installs the ftp service yum install ftp-y # backup file cd / etc/yum.repos.dmkdir bakmv * .repo bak# clears the yum cache yum clean allyum list# settings yum repository package source echo "[base] name=centos7.Packagesbaseurl= ftp://192.168.102.128/centos7enable=1gpgkey=1gpgkey=ftp://192.168.102.128/centos7/RPM-GPG-KEY-CentOS-7[other]name=other.Packagesbaseurl=ftp:" / / 192.168.102.128/otherenable=1gpgkey=0 "> centos7.repo# reloads yum repository yum list

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