Quantcast
Channel: » Linux
Viewing all articles
Browse latest Browse all 15

How to create a DVD Repo for RHEL

$
0
0

This is a simple script who creates a DVD Repository for your RHEL, just create a new file named repo_creator.sh, put this lines below into the file and run.

#!/bin/bash
echo " Midia está no driver ? (sim)"
read aceite

if test "$aceite" = sim
then
echo " Realizando instalacao…"
mkdir /mnt/cdrom
mount /dev/cdrom /mnt/cdrom
echo "[dvd]" > /etc/yum.repos.d/rhel-dvd.repo
echo "name=RHEL DVD" >> /etc/yum.repos.d/rhel-dvd.repo
echo "baseurl=file:///mnt/cdrom/Server" >> /etc/yum.repos.d/rhel-dvd.repo
echo "enabled=1" >> /etc/yum.repos.d/rhel-dvd.repo
echo "gpgcheck=0" >> /etc/yum.repos.d/rhel-dvd.repo
yum update
else
exit
fi


Viewing all articles
Browse latest Browse all 15

Trending Articles