Žilinská univerzita > Fakulta riadenia a informatiky > Katedra informačných sietí

How to install Asterisk on Debian - APT repository

Latest Asterisk packages we should install now directly into our Debian/Ubuntu servers using the apt-get tool. More info at https://wiki.asterisk.org/wiki/display/AST/Asterisk+Packages#AsteriskPackages-APT%28Debian%2FUbuntu%29

 

Instructions Options 1) (debian and Ubuntu)

First, we will import Asterisk project apt key:

apt-key adv --keyserver pgp.mit.edu --recv-keys 175E41DF

Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /etc/apt/secring.gpg --trustdb-name /etc/apt/trustdb.gpg --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver pgp.mit.edu --recv-keys 175E41DF
gpg: requesting key 175E41DF from hkp server pgp.mit.edu
gpg: key 175E41DF: public key "Asterisk Packaging Team <packages@asterisk.org>" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
or, in a case of problems, do it manually
wget http://packages.asterisk.org/keys/175E41DF.pub -O - | apt-key add -
Now we will edit apt sources, so add the lines to your /etc/apt/sources.list. Open the file witch your preferred editor, for example with vim 
vim /etc/apt/sources.list
and, depends on your debian distribution, which we may check this with
lsb_release -cs
squeeze
 add lines (here for squeeze)
deb http://packages.asterisk.org/deb squeeze main
deb-src http://packages.asterisk.org/deb squeeze main

 

Instructions Options 2) (Ubuntu)

Install package used to manage package repositories using add-apt-repository command

apt-get install python-software-properties

now import Asterisk project apt key:

apt-key adv --keyserver pgp.mit.edu --recv-keys 175E41DF

and run for Ubuntu

sudo add-apt-repository "deb http://packages.asterisk.org/deb `lsb_release -cs` main"
sudo add-apt-repository "deb-src http://packages.asterisk.org/deb `lsb_release -cs` main"

Update Package list 

In both cases we have to update local apt-get database running  apt-get update

...
Get:1 http://packages.asterisk.org squeeze Release.gpg [490 B]
Ign http://packages.asterisk.org/deb/ squeeze/main Translation-en
Ign http://packages.asterisk.org/deb/ squeeze/main Translation-en_US
Get:2 http://packages.asterisk.org squeeze Release [2,226 B]
Ign http://packages.asterisk.org squeeze/main Sources
Ign http://packages.asterisk.org squeeze/main i386 Packages
Get:3 http://packages.asterisk.org squeeze/main Sources [1,525 B]
Get:4 http://packages.asterisk.org squeeze/main i386 Packages [6,156 B]
Fetched 10.4 kB in 1s (9,382 B/s)
Reading package lists... Done
 
and check which version of the Asterisk server package exist there, for example, for stable version of debian squeeze it is asterisk 1.6, now it should be higher, we should find something like this:
apt-cache show asterisk

Package: asterisk
Version: 1:1.8.11.1-1digium1~squeeze
Architecture: i386
Maintainer: Paul Belanger <pabelanger@digium.com>
Installed-Size: 9304
Now we may install main asterisk
apt-get install asterisk
or upgrade previous one.
 
 
Groups: