Today, i set up a new server using Ubuntu-Server edition for repository purpose. This server will hold all of the 4 DVD of Ubuntu's repository and it's already running well. Why would i prepare a special repository and not using the Internet to get the packages? It's about efficiency. Just think if for example 100 users are accessing Ubuntu's repository at the same time and downloading the same packages. It would be time consuming and not efficient. The process will be faster if we set up a new repository which holds all of the packages needed and set the apt's source.list to point to that repository, so it will grab it from one central repository (and it's local, so it should be faster).
The server edition is quite unique for me, as it didn't ask anything at all about which packages should be installed. Later on, i found out that it only installed a really basic system. Not even a text-based browser is available, so i had to install it using apt-get install links. I also installed some other packages needed and finally, setting up the repository. Here's the HOWTO i got from Mr. Onno (with some modification because of some typos):
# mkdir /opt/feisty-repo
# cd /opt/feisty-repo
# dd if=/dev/cdrom of=ubuntu-7.04-repository-i386-1_contrib.iso
# dd if=/dev/cdrom of=ubuntu-7.04-repository-i386-2_contrib.iso
# dd if=/dev/cdrom of=ubuntu-7.04-repository-i386-3_contrib.iso
# dd if=/dev/cdrom of=ubuntu-7.04-repository-i386-4_contrib.iso
# mkdir /home/ftp/pub/feisty-repo1
# mkdir /home/ftp/pub/feisty-repo2
# mkdir /home/ftp/pub/feisty-repo3
# mkdir /home/ftp/pub/feisty-repo4
# mount -t iso9660 -o loop /opt/feisty-repo/ubuntu-7.04-repository-i386-1_contrib.iso /home/ftp/pub/feisty-repo1
# mount -t iso9660 -o loop /opt/feisty-repo/ubuntu-7.04-repository-i386-2_contrib.iso /home/ftp/pub/feisty-repo2
# mount -t iso9660 -o loop /opt/feisty-repo/ubuntu-7.04-repository-i386-3_contrib.iso /home/ftp/pub/feisty-repo3
# mount -t iso9660 -o loop /opt/feisty-repo/ubuntu-7.04-repository-i386-4_contrib.iso /home/ftp/pub/feisty-repo4
# vi /etc/apt/source.list
deb file:/home/ftp/pub/feisty-repo1 feisty main restricted
deb file:/home/ftp/pub/feisty-repo2 feisty universe
deb file:/home/ftp/pub/feisty-repo3 feisty universe
deb file:/home/ftp/pub/feisty-repo4 feisty universe multiverse
# apt-get update
I really enjoyed playing with apt-get as it's very easy and it will find the dependencies for you automatically, so you don't have to bother about it at all. It doesn't mean that i'm going leave Slackware and switched to Ubuntu
No comments:
Post a Comment