Moxa DA-681-I-DP-LX [24/65] Apt installing and removing packages

Moxa DA-681-I-SP-XPE [24/65] Apt installing and removing packages
DA-681 Linux Software Configuration
2-13
APTInstalling 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 http://archive.debian.org/debian etch main
deb-src http://archive.debian.org/debian etch main
deb http://archive.debian.org/debian/ etch main
deb-src http://archive.debian.org/debian/ etch main
deb http://archive.debian.org/debian-security/ etch/updates main contrib
deb-src http://archive.debian.org/debian-security/ etch/updates main contrib
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.

Содержание

Похожие устройства

Скачать