aptとはDebian GNU Linux用に開発されたパッケージ管理システムである。パッケージ間の依存関係を自動的に解決する機能を持つため、Redhat Linux系に採用されているRPMより使い勝手が良いことが特徴である。また、Redhat Linuxに採用されている有料の自動アップデート機能(up2date)と同等の処理を行うことができる。
本来はDebian用のツールであるが、Redhat系ディストリビューションに対応したバージョンが公開されているため、up2dateを使用せずにRedhat系ディストリビューションのアップデートを行うことが可能である。
rpmパッケージを取得する。
wget http://ftp.freshrpms.net/pub/freshrpms/redhat/9/apt/apt-0.5.5cnc6-fr1.i386.rpm wget http://ftp.freshrpms.net/pub/freshrpms/redhat/9/apt/apt-0.5.5cnc6-fr1.src.rpm wget http://ftp.freshrpms.net/pub/freshrpms/redhat/9/apt/apt-devel-0.5.5cnc6-fr1.i386.rpm
RPMパッケージを展開する。
rpm -ivh apt-0.5.5cnc6-fr1.i386.rpm warning: apt-0.5.5cnc6-fr1.i386.rpm: V3 DSA signature: NOKEY, key ID e42d547b Preparing... ########################################### [100%] package apt-0.5.5cnc6-fr1 is already installed
以下の書式でコマンドでインストール状況を確認。
rpm -qa | grep apt
Proxy越しにaptを使用する場合には以下の環境変数を指定する。
以下をコマンドとして実行すれば一時的な設定として有効化する。
設定の恒久化をする場合は~/.bashrcまたは~/.bash_profileに記述する。
export http_proxy=http://[IP Address]:[Port] export ftp_proxy=http://[IP Address]:[Port]