Web design course - Chapter 9 . Running Debian GNU/Linux 315 Managing
Chapter 9 . Running Debian GNU/Linux 315 Managing the List of Package Repositories The configuration file /etc/apt/sources.list contains a list of Debian package repositories that APT will use. Like most configuration files on a Linux system, this file is a plain-text file that can be viewed using any text editor or pager. To view its contents, run the following: # pager /etc/apt/sources.list deb cdrom:[Debian GNU/Linux _Sarge_ NetInst]/ stable main deb http://ftp.us.debian.org/debian/ stable main deb-src http://ftp.us.debian.org/debian/ stable main deb http://security.debian.org/ stable/updates main Depending on which pager is configured as your default, you may need to press the q key in order to return to a prompt. Your output will differ from this example s, of course, but the kind of information remains the same. The first part of each line indicates whether the repository is to be used for binary packages (indicated by the deb prefix) or source packages (deb-src). The rest of the line defines the method (in this case, cdrom or http), the location, the distribution (stable), and the sections (main). If you want to use software from the contrib and non-free sections, you can use a text editor to add them after main. Run man sources.list on any Debian system for more information. If you aren t going to have your Debian CD available all the time, you may want to remove the cdrom: entry from the file. Use a text editor (as root user) to edit the file: # editor /etc/apt/sources.list Make any changes you need to the file, exit the editor, and then update the package database as described in the following section. Astute readers may notice that the pager and editor commands used in this section are not common UNIX commands. Both are pointers to programs and are managed using Debian s alternatives system, which is discussed later in this chapter. Updating the APT Package Database Because the lists of packages available in the Debian package repositories may change from time to time, you need to instruct APT to download these lists and update its database occasionally. To perform this process, run the following command: # apt-get update Note Note Note
In case you need quality webspace to host and run your web applications, try our personal web hosting services.