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

Build a remote yum repository (FTP service)

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

Share

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

Experimental environment: two centos7 virtual machines.

The process of the experiment:

Configure the server, mount the local image, install the FTP service (default path of FTP service: / var/ftp), create a site, copy the image to the source point centos7/, create an extended directory / other to store the unofficial (dependent) RPM package group, use the createrepo command

[root@server ~] # mount / dev/sr0 / mnt/ mount image to local / mnt

[root@server var] # yum install vsftpd-y install FTP service

[root@server ftp] # mkdir centos7 creates a directory as the source point for the remote yum repository

[root@server ftp] # cp-rf / mnt/* centos7/ & copy the image to the source directory and run it in the background

[root@server ftp] # mkdir other create an extension directory

[root@server ftp] # createrepo-g / mnt/ repodata/ repomd.xml other/ uses the createrepo command to create warehouse data files

Open the FTP service (the name of the service is vsftps). Turn off the firewall and turn off the enhanced security features to ensure that the client can access it successfully.

[root@server ~] # systemctl start vsftpd enable FTP service

[root@server ~] # systemctl stop firewalld.service turn off the firewall

[root@server ~] # setenforce 0 turns off the enhanced security feature

Third, use the client to access the server, first install the FTP service, and then go to the server. The success of the access indicates that the remote yun repository can be used.

[root@client ~] # yum install ftp-y install ftp service

[root@client ~] # ftp 192.168.195.128 use ftp service to access the server

4. Back up the local yum repository and move it to the new backup directory (because the system reads the official default directory yum.reops.d by default, if you move it somewhere else, it cannot be read and installed when using yum install), and clear the local yum repository.

[root@client ~] # cd / etc/yum.repos.d/ switch to the local yum repository configuration file directory

[root@client yum.repos.d] # mkdir bak create a new backup directory

[root@client yum.repos.d] # mv * .repo bak/ moves the local yum warehouse configuration file to the backup directory

[root@client yum.repos.d] # yum clean all clears the yum repository cache

Edit the configuration file to specify the location of the remote yum repository for the client (the key file can be copied under the server / centos7 directory)

[root@client yum.repos.d] # vim sentos7.repo Editing configuration File

6. Test whether the remote yum warehouse can be used properly

Root@client yum.repos.d] # yum install httpd-y install httpd service test

7. Update the yum repository (either on the server or on the client):

[root@client yum.repos.d] # yum update updates the software package and updates the software and system kernel

[root@client yum.repos.d] # yum upgrade updates software packages only

[root@server other] # yum upgrade updates the yum repository on the server

The remote yum warehouse has been built.

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