Monday, June 04, 2007

Playing With Ubuntu

On 18-22 June, my campus hold an event with Onno W. Purbo as the speaker (it's great to hear that he has recovered from his ill, even though not 100% yet). There will be a one day seminar and four days of workshop. The seminar is open for public, but for the workshop, it's intended for internal student, because it was offered like an ordinary class. The workshop will use Ubuntu as the operating system, so in the past two weeks, we have been quite busy preparing the lab for the events. Right now, most of them have been installed with Ubuntu Feisty Fawn (7.04). Some installation was painful, since the hardware is not that high, but when the RAM was upgraded, everything became painless. Installation was quite easy and quick and everything worked perfectly.

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 tongue since Slackware is still my favorite for now (and probably will still is in the future). It's just nice to know and play with Ubuntu.

No comments:

Post a Comment