GD Inst Ubuntu
From giantdisc
Making a GiantDisc Server with Ubuntu
Contributed by Bob White Nov '06
I started with an old PC powered with a AMD K6-2/450. Quite a modest machine, but it handles GD quite adequately. Mine consisted of two hard drives – one for Ubuntu, and the other (larger) drive to be mounted as the /home partition. /home is where GD stores all the .mp3 files.
Download a Ubuntu (or Kubuntu) install CD from one of the Ubuntu sites. I downloaded the Kubuntu 5.10 (Breezy Badger) CD as my install CD.
But this will work also on Ubuntu 7.10 Gutsy Gibbon. The procedure below will install the basic Ubuntu server-type system. The X libraries and user interfaces, such as K or Gnome are not installed. If you need those, you'll need to install them separately from these instructions.
Reboot the PC with the install CD in the drive. At the boot> prompt, enter the following:
server-expert netcfg/disable_dhcp=true
This tells the installer that this PC will be a server, which means it doesn't install a bunch of extra stuff that you don't need. The rest of the command line tells the installer that you aren't going to be using DHCP to provide an IP address to your server. This allows you to give it a fixed address, so you don't have to search your network for your music.
You may take the defaults for most prompts. Pick your language, keyboard, time zone, and so forth. During the network install, I gave the server a particular IP address – 192.168.1.51. During the partitioning, instead of creating one large partition, which is the default, I used the primary drive (hda) for everything but the /home partition, and used the secondary drive (hdb) to host /home.
When you create the music user during the install process, it forces you to create a password. We'll delete that later.
Once the installation completes, the system will prompt you to remove the install CD and then reboot.
Once you reboot, you'll need to modify the sources.list file that controls where packages are downloaded from.
Log in as root, using the password you assigned during the install process. Change to the /etc/apt directory. Modify the sources.list file to look like the one shown below.
deb cdrom:[Kubuntu 5.10 _Breezy Badger_ - Release i386 (20051012)]/ breezy main restricted deb http://us.archive.ubuntu.com/ubuntu breezy main restricted deb-src http://us.archive.ubuntu.com/ubuntu breezy main restricted deb http://us.archive.ubuntu.com/ubuntu breezy-updates main restricted deb-src http://us.archive.ubuntu.com/ubuntu breezy-updates main restricted deb http://us.archive.ubuntu.com/ubuntu breezy universe deb-src http://us.archive.ubuntu.com/ubuntu breezy universe deb http://archive.ubuntu.com/ubuntu breezy multiverse deb http://archive.ubuntu.com/ubuntu breezy-backports main restricted universe multiverse deb-src http://archive.ubuntu.com/ubuntu breezy-backports main restricted universe multiverse deb http://security.ubuntu.com/ubuntu breezy-security main restricted deb-src http://security.ubuntu.com/ubuntu breezy-security main restricted deb http://security.ubuntu.com/ubuntu breezy-security universe deb-src http://security.ubuntu.com/ubuntu breezy-security universe
Some of the above changes may already have been activated, some may just require removing a leading “#”, and you may have to type a few. After modifying sources.list, execute the following commands to update your system and get it ready for GiantDisc. Some of these will install a bunch of other, related packages.
# Get the latest updates for your system apt-get update apt-get upgrade -y # Install these packages for the basic GD installation apt-get install mplayer-386 -y apt-get install lame -y apt-get install cdtool -y apt-get install netpbm -y apt-get install mp3info -y apt-get install aumix -y apt-get install mysql-server -y apt-get install libcddb-get-perl -y apt-get install libid3-3.8.3-dev -y apt-get install libdbd-mysql-perl -y apt-get install mpg321 -y apt-get install make -y apt-get install cdparanoia -y apt-get install pilot-link -y # Install these if you're going to use one of the web clients apt-get install apache2 -y apt-get install php4 -y apt-get install php4-mysql -y #Install these packages if you're going to download cover art apt-get install gcc -y apt-get install imagemagick -y apt-get install perlmagick -y
Delete music's login password if you were required to enter one during the install:
passwd -d music
(If you run into problems loggin in with "music" please look at http://ubuntucat.wordpress.com/2007/07/31/creating-a-passwordless-account-in-ubuntu)
Set read/write permissions on some of the devices to allow anyone to use them:
chmod 777 /dev/dsp chmod 777 /dev/ttyS0 chmod 777 /dev/rtc chmod 777 /dev/mixer chmod 777 /dev/null
I also set the permissions for the CD reader. Which device you change will depend on where your drive is configured in your system. In my case, it was the primary drive on the secondary IDE channel, or hdc. /dev/cdrom may also work.
chmod 777 /dev/hdc
You may now log out as root, and log back in as the music user.
Append the following line to the end of your .bashrc file in /home/music:
export PATH=$PATH:/home/music/bin
This tells the system where to find the GD program files.
Download the GiantDisc software (modify the path and file as necessary):
wget http://giantdisc.org/download/files/GiantDisc_1.44.tar.gz
Unpack the software and install it. Configure it according to the manual. Be sure to build the database (as root), then the tables.
tar zxvf GiantDisc_1.44.tar.gz cd GiantDisc_1.44 ./Install.sh
You'll need to transfer the GD client to your Palm. Assuming it's connected to the first serial port, use the following command, then start the hot sync on the Palm. The hotsync will take several minutes.
cd /home/music/PalmClient pilot-xfer -p /dev/ttyS0 -i gd.prc
At this point, the basic GD installation should be complete.
For to start GD on your machine follow "General Installation Instructions for the GiantDisc Software" item 8 and 9.
The Palm should be able to converse with the server, rip CDs, and so forth.
If you're going to use the script to download cover art, you'll need to install four Perl packages, some of which have other dependencies. Download the cover art script from the GiantDisc contributed files setion using wget as above. Use the following commands:
perl -MCPAN -eshell “install Log::Log4perl” perl -MCPAN -eshell “install LWP::UserAgent” perl -MCPAN -eshell “install XML::Simple2” perl -MCPAN -eshell “install Net::Amazon”
I had some difficulty with the Simple2 package (Simple2) – the test routines encountered a few errors, which required me to forcibly install the package. Whatever the errors were, they do not apparently impact how it works.
If you have to forcibly install Simple2, as root, go to /root/.cpan/build/XML-Simple-2.14 and execute the command “make install”. Installing Net::Amazon should proceed without errors at this point.
