User`s manual
DA-710 Series Linux Software Configuration
2-13
APT—Installing and Removing Packages
APT is the Debian tool used to install and remove packages. Before installing a package, you need to configure
the apt source file, /etc/apt/sources.list, which is located in the read-only partition.
1. Mount the root file system with write permission.
MOXA:~# mount -o remount,rw /dev/hda1 /
2. Next, configure the /etc/apt/sources.list using vi editor.
MOXA:~# vi /etc/apt/sources.list
#
# deb cdrom:[Debian GNU/Linux 5.0.2a _Lenny_ - Official i386 NETINST Binary-1 20
090817-16:43]/ lenny main
#deb cdrom:[Debian GNU/Linux 5.0.2a _Lenny_ - Official i386 NETINST Binary-1 200
90817-16:43]/ lenny main
deb http://archive.debian.org/debian/ lenny main
deb-src http://archive.debian.org/debian/ lenny main
deb http://security.debian.org/ lenny/updates main contrib
deb-src http://security.debian.org/ lenny/updates main contrib
deb http://volatile.debian.org/debian-volatile lenny/volatile main
deb-src http://volatile.debian.org/debian-volatile lenny/volatile main
3. Update the source list after you configure it.
MOXA:~# apt-get update
MOXA:~#
4. Once you indicate which package you want to install (openswan, for example), type:
MOXA:~# apt-get install openswan
MOXA:~#
5. Use one of the following commands to remove a package:
(a) For a simple package removal:
MOXA:~# apt-get remove openswan
MOXA:~#
(b) For a complete package removal:
MOXA:~# apt-get remove openswan --purge
MOXA:~#
6. If the installation is complete, remember to umount the root directory back to read-only mode.
MOXA:~# umount /
MOXA:~#
ATTENTION
The APT cache space
/etc/cache/apt is located in tmpfs. If you need to install a huge package, link
/etc/cache/apt
to USB mass storage or mount it to an NFS space to generate more free space. Use df –h
to
check
how much free space is available on tmpfs.