3/11/2008

Creating a Local Update Repository for FC6

Creating a Local Update Repository for FC6

#------------------------------------------------------------------------------
# Pre Install
#------------------------------------------------------------------------------
mkdir -p /root/fc6base
cp /mnt/Fedora/RPMS/*.* /root/fc6base/
cp /mnt/repodata/comps.xml /root/fc6base

#------------------------------------------------------------------------------
# Install createrepo
#------------------------------------------------------------------------------
rpm -Uvh /mnt/Fedora/RPMS/createrepo*
createrepo /root/fc6base

createrepo -g comps.xml /root/fc6base

#When you use yum grouplist and it doesn't show anything. run
yum clean metadata

#------------------------------------------------------------------------------
# Edit Yum Configuration
#------------------------------------------------------------------------------
vi /etc/yum.repos.d/fedora-core.repo
#comment out any line starting with baseurl or mirrorlist

#add line on core
baseurl=file:///root/fc6base

#disable gpgcheck on core
gpgcheck=1
to
gpgcheck=0


#------------------------------------------------------------------------------
# Disable other repository
#------------------------------------------------------------------------------
#make sure other repo is disable if not it will try to connect to internet

cd /etc/yum.repos.d/

#change every *.repo except fedora-core.repo
enabled=1
to
enabled=0
#------------------------------------------------------------------------------
# Post Install
#------------------------------------------------------------------------------
mkdir -p /root/fc6base
cp /mnt/Fedora/RPMS/*.* /root/fc6base/
cp /mnt/repodata/comps.xml /root/fc6base

#------------------------------------------------------------------------------
# Install createrepo
#------------------------------------------------------------------------------
rpm -Uvh /mnt/Fedora/RPMS/createrepo*
createrepo /root/fc6base

createrepo -g comps.xml /root/fc6base

#When you use yum grouplist and it doesn't show anything. run
yum clean metadata

#------------------------------------------------------------------------------
# Edit Yum Configuration
#------------------------------------------------------------------------------
vi /etc/yum.repos.d/fedora-core.repo
#comment out any line starting with baseurl or mirrorlist

#add line on core
baseurl=file:///root/fc6base

#disable gpgcheck on core
gpgcheck=1
to
gpgcheck=0


#------------------------------------------------------------------------------
# Disable other repository
#------------------------------------------------------------------------------
#make sure other repo is disable if not it will try to connect to internet

cd /etc/yum.repos.d/

#change every *.repo except fedora-core.repo
enabled=1
to
enabled=0

沒有留言: