Saturday, March 2, 2013

Local Repositories

My debian iso dvd is unreadable for some reason. Fortunately, I copied that dvd to my brother's machine, which contains 500GB of hard drive. My PC has a smaller disk, and I'm afraid to waste it for replicating. My problem was, how to add that copied dvd to my repositories ?
After a google search, I found a solution. Let me briefly share it with you.
If you really want to maintain a local repository which is in your network, you can use NFS server.
package: nfs-kernel-server
  • create a directory, "mkdir -p /repo/deb"
  • edit "etc/exports" file and add the following line,
"/repo 192.168.1.0/24(ro,root_squash,sync,no_subtree_check)"
  • restart "nfs-kernel-server"
Optionally, you can use "chkconfig -e" to add nsf-server as a start-up service
and perform "showmount -e localhost" command to get the export list. After all, you can extract the iso image to "deb" directory. (or replicate)
In your client machine, you can add "nfs://<server ip>/repo/deb <alias>" line to "sources.list".
This is useful, if you run a local network with many Linux hosts.

No comments:

Post a Comment