There a nice guide in this particular sub-forum written by member Seve if you care to search for it. In a nutshell, make a folder, populate that folder, run createrepo, make a .repo file and go to town. I suggest maybe testing the process using the files on the install DVD. I'll make a quick one now.
Make a folder.
Code:
mkdir /temp/installfiles
Type mount to see where the DVD I just inserted is mounted.
Code:
mount
...
...
/dev/sr0 on /media/Fedora 12 i386 DVD type iso9660 (ro,nosuid,nodev,uhelper=devkit,uid=500,gid=500,iocharset=utf8,mode=0400,dmode=0500)
Copy the files (didn't work as regular user so I switched to root). Use tab completion for the command so the path to the source files is correct.
Code:
cp /media/Fedora\ 12\ i386\ DVD/Packages/* /temp/installfiles/
While the files are copying open another terminal and create the repo file.
Code:
vi /etc/yum.repos.d/test.repo
Add the following to the file.
Code:
[test]
Name=Test Repo - $releasever - $basearch
baseurl=file:///temp/installfiles/
enabled=1
Files are done copying. Run createrepo.
Code:
[root@leonardo glenn]# createrepo /temp/installfiles
2399/2399 - zsh-4.3.10-4.fc12.i686.rpm
Saving Primary metadata
Saving file lists metadata
Saving other metadata
[root@leonardo glenn]#
Test the new repository.
Code:
[root@leonardo glenn]# yum check-update
Loaded plugins: fastestmirror, presto, refresh-packagekit
Loading mirror speeds from cached hostfile
updates/metalink | 18 kB 00:00
* fedora: mirror.cogentco.com
* rpmfusion-free: mirror.liberty.edu
* rpmfusion-free-updates: mirror.liberty.edu
* rpmfusion-nonfree: mirror.liberty.edu
* rpmfusion-nonfree-updates: mirror.liberty.edu
* updates: ftp.us.unixeria.com
adobe-linux-i386 | 951 B 00:00
google | 951 B 00:00
repof12 | 1.3 kB 00:00
rpmfusion-free-updates | 3.3 kB 00:00
rpmfusion-nonfree-updates | 3.3 kB 00:00
test | 1.3 kB 00:00 ...
test/primary | 928 kB 00:00 ...
test 2399/2399
virtualbox | 951 B 00:00
[root@leonardo glenn]#
It worked. Just as a note of interest. I had been using rsync to populate my repositories in the past. I just discovered
reposync. It's part of the
yum-utils package (yum install yum-utils). Once installed you can
reposync fedora /temp/installfiles for example. This will put all of the files from the fedora repo into /temp/installfiles.
Code:
[root@leonardo glenn]# yum repolist
Loaded plugins: fastestmirror, presto, refresh-packagekit
Loading mirror speeds from cached hostfile
* fedora: mirror.cogentco.com
* rpmfusion-free: mirror.liberty.edu
* rpmfusion-free-updates: mirror.liberty.edu
* rpmfusion-nonfree: mirror.liberty.edu
* rpmfusion-nonfree-updates: mirror.liberty.edu
* updates: ftp.us.unixeria.com
repo id repo name status
adobe-linux-i386 Adobe Systems Incorporated enabled: 17
fedora Fedora 12 - i386 enabled: 15,366
google Google - i386 enabled: 1
repof12 Local Repository for Fedora 12 - i386 enabled: 15,235
rpmfusion-free RPM Fusion for Fedora 12 - Free enabled: 383
rpmfusion-free-updates RPM Fusion for Fedora 12 - Free - Updates enabled: 179
rpmfusion-nonfree RPM Fusion for Fedora 12 - Nonfree enabled: 124
rpmfusion-nonfree-updates RPM Fusion for Fedora 12 - Nonfree - Updates enabled: 97
test Test Repo - 12 - i386 enabled: 2,399
updates Fedora 12 - i386 - Updates enabled: 2,608
virtualbox Fedora 12 - i386 - VirtualBox enabled: 4
repolist: 36,413