#!/bin/bash

REPO_FILE="/etc/yum.repos.d/localrepo.repo"

echo "[localrepo]" > $REPO_FILE
echo "name=Local Repository from Server" >> $REPO_FILE
echo "baseurl=http://103.206.216.226/localrepo" >> $REPO_FILE
echo "enabled=1" >> $REPO_FILE
echo "gpgcheck=0" >> $REPO_FILE

sudo yum clean all
sudo yum repolist
sudo yum update

echo "Local repository has been configured."

