How to Build Your Own HTTP and FTP Yum Repository: Step‑by‑Step Guide
This tutorial walks you through setting up both HTTP and FTP based Yum repositories on two Linux machines, covering environment preparation, server and client configuration, mounting media, creating metadata, and essential Yum commands for managing packages.
Yum Repository Experiment
HTTP Yum Repository
Environment Preparation
1. Two machines: one as the server, one as the client.
2. Disable the firewall on both machines.
3. The server provides the installation packages.
4. Write the repository configuration on the client.
Server Configuration
1. Install and start the httpd service.
2. Mount the CD/DVD device.
Server configuration completed.
Client Configuration
1. Adjust the Yum directory.
# Create a folder named bak and move all files ending with repo into it.
2. Write the repository configuration file.
# Download from server 192.168.116.10.
3. Clean the environment.
4. Create repository metadata.
5. Client configuration completed; attempt to download.
# Installation successful, experiment finished.
FTP Yum Repository
Environment Preparation
Same steps as the HTTP repository: two machines, firewall disabled, server provides packages, client writes configuration.
Server Configuration
1. Install and start the vsftpd service.
2. Create a folder ky33 under /var/ftp.
3. Mount the CD/DVD device to /var/ftp/ky33.
# Server configuration completed.
Client Configuration
1. Adjust the Yum directory.
2. Write the repository configuration file.
# Point the path to the server's ky33 directory.
3. Clean the Yum environment.
4. Create repository metadata.
5. Client configuration completed; attempt to download.
# Installation successful, experiment finished.
Useful Yum Commands
yum list # show all available packages
yum info # display package information
yum search ftp # search for packages containing "ftp" (fuzzy search)
yum provides ftp # find which package provides a command
yum history # view all Yum operations
undo # undo the last operation
redo # redo an undone operation
yum remove <package_name> # uninstall a single package
# Repository groups
base # basic repository
extra # extra repository
epel # third‑party repository
update # update repository metadataSigned-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
MaGe Linux Operations
Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
