Skip to content
How to Build Your Own HTTP and FTP Yum Repository: Step‑by‑Step Guide
Operations 4 min read

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.

MaGe Linux Operations
MaGe Linux Operations
MaGe Linux Operations

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 metadata
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

RepositoryFTPYUM
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.