next up previous
Next: Installing the kernel and Up: Installing Planet CCRMA on Previous: Downloading the cdrom images

Subsections



Installing apt (Advanced Package Tool)

The Planet CCRMA package collection is managed through the apt apt (Advanced Package Tool) utilities. The first step is to add apt to the programs that are already installed in your Linux machine and configure it so that it can access the Planet CCRMA online repository and/or the Planet CCRMA cdroms.

To do this, and almost all subsequent configuration work, you must be ``root''. So fire up a terminal and ``su'' root to aquire the mythical root superpowers. You can run most programs from your normal login account, but to install and upgrade software you need to be root.

Note: the apt tools will only work if you have clean dependencies in your rpm package database, if you have installed or removed rpms with either --nodeps or --force, chances are you will have unmet dependencies (ie: package ``a'' needs package ``b'' to be able to work, but package ``b'' is not installed). ``apt-get'' will warn you of any conflicts or unmet dependencies, and you will have to fix them before trying to install packages with apt-get.

Warning: for full installs of RedHat 7.3 (ie: you selected ``Custom'' installation and installed all packages) there is a guaranteed packaging conflict. The RedHat installer installs two packages (zebra and routed) that are mutually exlusive. Instead of choosing one or the other it just goes ahead and installs both. The results in an apt-get conflict as both packages should NOT be installed at the same time. To fix the conflict just erase one of them, for example rpm -e gated.


Package signatures

All packages in Fedora Core 2 are signed (that is, rpm will know if the package has been altered). Not all packages in previous versions are signed yet. The GPG key for Planet CCRMA packages can be found here:

Download the file and import it into rpm:

rpm -import RPM-GPG-KEY.planetccrma.txt


Getting the apt rpms

Internet install:

You can install from the Planet CCRMA main site in California, USA, or from one of the Planet CCRMA mirrors at IRCAM, ICEM, PlanetMirror or ATrpms (the links will take you to this section in the server you choose).

You need to know which version of RedHat or Fedora Core and which version of rpm you are running on your system so that you can select the proper set of apt rpms to download.

  • to find out which version of RedHat you have installed type:
    cat /etc/redhat-release

  • to find out which version of rpm is installed type:
    rpm -q rpm

According to which versions you have installed download one of the following sets of rpms (see below if the version of rpm does not match any of the choices):

If the version of rpm you have installed is older than the ones I'm currently supporting please upgrade to the latest version from RedHat. You can also search for older apt rpms that are linked with older versions of the rpm library in the Freshrpms web site or in the TuxFamily web site. Beware, older versions may not work correctly with the supplied apt.conf configuration files.

If you still don't find an rpm of apt that matches your version of rpm you can always download the current source rpm (apt-0.5.5cnc6-1.src.rpm) and rebuild binary rpms from it.

Cdrom install:

The apt rpms are included in your Planet CCRMA Applications cdrom (not the Planet CCRMA Core), just go ahead and install them.


Installing apt

Internet install

Go to the directory where you saved the downloaded rpms and type (use the proper version number, this is just an example):

rpm -Uvh apt-0.5.5cnc6-1.i386.rpm
rpm -Uvh apt-devel-0.5.5cnc6-1.i386.rpm

Cdrom install

Change to the directory in the cdrom where the apt rpms are located. The name of the directory depends on the version of RedHat you are running, for an 8.0 system it would be:

cd /mnt/cdrom/mirror/redhat/linux/planetccrma/8.0/en/os/i386/

Install the rpms:

rpm -Uvh apt-*.i386.rpm


Configuring apt

There are two configuration files for apt that need to be customized (/etc/apt/sources.list - points to repository URL's and /etc/apt/apt.conf - the apt configuration file). Which sources.list file to download depends on which version of RedHat you are running (7.3, 8.0, 9 or Fedora Core 1).

Internet install: getting the files

Download the appropriate sources.list file:

Download the apt.conf file:

Cdrom install: getting the files

The files are included in the cdrom (the following links assume that the Planet CCRMA cdrom is currently mounted in ``/mnt/cdrom''):

Copy the apt.conf file:

Replace the existing configuration files:

Make a backup copy of the existing source.list file first:

cp /etc/apt/sources.list /etc/apt/sources.list.ORIG

And then copy the downloaded or copied file over the existing one:

cp sources.list /etc/apt/sources.list

Now make a backup copy of the apt.conf file:

cp /etc/apt/apt.conf /etc/apt/apt.conf.ORIG

And then copy the downloaded or copied file over the existing one (note that the exact name of the file will depend on which one you need):

cp apt.conf /etc/apt/apt.conf

Tweak the sources.list configuration file:

  • Cdrom only install (no network connection)

    If you plan on using just the Planet CCRMA cdroms and do not have a network connection, you need to edit /etc/apt/sources.list and comment out all the lines that start with ``rpm http'' (add a ``#'' at the start of each ``rpm http'' line that does not have one). If you have a network connection latter on you can always uncomment the lines that correspond to the desired server.

  • Using the mirrors

    If you are using a Planet CCRMA mirror instead of the main site, edit the /etc/apt/sources.list, comment out the main server at CCRMA (put a ``#'' at the start of each ``rpm http'' line that is pointing to ccrma.stanford.edu) and uncomment the URL's of the desired server (erase the ``#'' at the start of each ``rpm http'' line).


Adding the Planet CCRMA cdroms to apt

This is only needed if you are going to be using the Planet CCRMA cdroms.

Cdrom install:

If you are installing from the Planet CCRMA cdroms you need to configure apt to use the cdroms in addition to the internet connection to the repository (which is what you just set up by installing the custom sources.list file).

Unmount your Planet CCRMA cdrom first and type:

apt-cdrom add

Insert the first cdrom (it does not matter which) when prompted, and press enter when ready so that apt-cdrom can scan it. When it is done it will prompt for a name for that particular cdrom, just type in whatever you scribbled on it to differentiate it from the other(s). Do the same with the other cdrom(s).

If you now look at the /etc/apt/sources.list file you will see that apt-cdrom has added several lines before the ones that were there before. They start with ``rpm cdrom:'' instead of ``rpm http:'' and point to the cdroms you just inserted. From now on apt-get knows about your cdroms (in addition to the Planet CCRMA apt repository) and your cdroms will have precedence over the network when versions match (the network URLs will override the cdrom if the online version of a package is newer than the cdrom version).

If you ever want to get rid of the cdroms just erase those lines from /etc/apt/sources.list (or comment them out by prepending a ``#'') and do an ``apt-get update''.

That's it. If something you want to install is in the cdroms you will be prompted by apt-get (or synaptic, see below) to insert it and the packages will be copied from it to the hard disk before the installation begins. If there is a newer version in the CCRMA apt repository it will be downloaded instead.

If you do not have a network connection at all in the install machine you should comment out all the /etc/apt/sources.list entries that begin with ``rpm http:''. In that way apt will not try to load the network repository apt databases. Caveat: if you do not have the full set of Planet CCRMA cdroms (including the custom RedHat install cdroms) you may not be able to install all Planet CCRMA packages if you did not originally install all RedHat packages. Some Planet CCRMA packages may depend on original RedHat packages that are not installed in your computer, and the apt database only knows about what you have installed and the cdroms you have fed to apt-cdrom.

Caveat: depending on your desktop settings it might happen that the desktop itself mounts the cdrom before apt-cdrom gets to see it and then the subsequent mount attempt will fail (and you have to unmount and try again). You'll have to be fast or just disable the obnoxious (IMHO) automatic mounting of removable media in your desktop of choice (for Gnome go to ``Settings'', ``Peripherials'' and ``CD Properties'' and uncheck the autorun boxes - for manual ``gui'' oriented mounting you can always add the ``Drive Mount'' applet to your panel and configure it to point to the cdrom drive).


Synchronizing with the repository

After you have configured apt (and maybe added the cdroms to the mix) type:

apt-get update

This will load the package database from the Planet CCRMA repository. You will have to do that whenever you start a new session of upgrades or installs as the repository might have changed since the last time you accessed it.

You are now ready to install the kernel and sound drivers.


A graphical user interface for apt

As soon as you have done an:

apt-get update

You can install Synaptic, a graphical user interface to apt. Just type:

apt-get install synaptic

To run the program, type ``synaptic'' in a terminal but don't do that yet!. You still need to install the kernel and sound drivers, that's best done by following the instructions in the next pages. If you skip steps then there are things that will not work. You are not done till you are done.

You might want to use synaptic latter in the install process when you start selecting which applications you want to have installed.


Some apt related links

If you are at Stanford the SuLinux site is a very good resource.

Here are some places where you can find information about apt for rpm:


next up previous
Next: Installing the kernel and Up: Installing Planet CCRMA on Previous: Downloading the cdrom images

© Copyright 2001...2005 Fernando Lopez-Lezcano, CCRMA, Stanford University.
All rights reserved.