Asterisk – VOIP Server on Linux FedoraCore

March 14, 2009 / Dedicated Server Hosting vps hosting

Asterisk – VOIP Server on FedoraCore

Please check sure you install no pre-configured options. Once installed :

Logon as Root

Mount the CDROM
mkdir /mnt/cdrom
mount /dev/cdrom /mnt/cdrom

YUM Installation :

rpm -i /mnt/cdrom/Fedora/RPMS/rpm-python-4.4.2-32.i386.rpm
rpm -i /mnt/cdrom/Fedora/RPMS/python-elementtree-1.2.6-5.i386.rpm
rpm -i /mnt/cdrom/Fedora/RPMS/python-sqlite-1.1.7-1.2.1.i386.rpm
rpm -i /mnt/cdrom/Fedora/RPMS/python-urlgrabber-2.9.9-2.noarch.rpm
rpm -i /mnt/cdrom/Fedora/RPMS/yum-metadata-parser-1.0-8.fc6.i386.rpm
rpm -i /mnt/cdrom/Fedora/RPMS/yum-3.0-6.noarch.rpm

Kernel Sources Installation :

rpm -i /mnt/cdrom/Fedora/RPMS/kernel-devel-2.6.18-1.2798.fc6.i686.rpm
ln -s /usr/src/kernels/2.6.18-1.2798.fc6-i686/ /usr/src/linux

Compiler Installation :

yum install gcc ncurses-devel openssl-devel gcc-c++ gnutls-devel make -y

WGET Installation :

rpm -i /mnt/cdrom/Fedora/RPMS/wget-1.10.2-7.i386.rpm

SSH Installation :

yum install openssh openssh-clients openssh-server -y

Start SSH Daemon :

/etc/init.d/sshd start

VSFTP Installation :

yum install vsftpd -y

VSFTP Daemon Start on Boot :

/etc/init.d/vsftpd start
chkconfig vsftpd on

Source files in /usr/src/

Via CDROM

cd /
umount /dev/cdrom

Change CD :

mount /dev/cdrom /mnt/cdrom
cp /mnt/cdrom/* /usr/src/ -R
rpm -i /mnt/cdrom/Fedora/RPMS/lsof-4.78-3.i386.rpm
cd /
kill -9 `lsof -t /dev/cdrom`
umount /dev/cdrom
rpm -e lsof

Open Linux Conifugration : vi /etc/selinux/config

change SELINUX=enforcing to SELINUX=disabled

vi /etc/vsftpd/user_list

remove root from the list

vi /etc/vsftpd/ftpusers

Please make sure you remove root and Reboot

Login to to through FTP

wget http://ftp.digium.com/pub/zaptel/releases/zaptel-1.2.16.tar.gz
wget http://ftp.digium.com/pub/libpri/releases/libpri-1.2.4.tar.gz
wget http://ftp.digium.com/pub/asterisk/releases/asterisk-1.2.17.tar.gz
wget http://ftp.digium.com/pub/asterisk/releases/asterisk-sounds-1.2.1.tar.gz
wget ftp://rpmfind.net/linux/SuSE-Linux/i386/update/9.3/rpm/i586/madplay-0.15.2b-32.i586.rpm
wget http://ftp.freshrpms.net/pub/freshrpms/fedora/linux/6/libmad/libmad-0.15.1b-4.fc6.i386.rpm

Madplay Installation

yum install libid3tag -y
rpm -i /usr/src/libmad-0.15.1b-4.fc6.i386.rpm
rpm -i /usr/src/madplay-0.15.2b-32.i586.rpm

MPG123 Installation

Install MPG123 (MOH)
cd /usr/src/mpg123-0.65/
./configure
make
make install
ln -s /usr/local/bin/mpg123 /usr/bin/mpg123

Zaptel Installation

Here, please make sure /li’b/modules/2.6.18-1.2798.fc6-i686/build and /usr/src/2.6.18-1.2798.fc6-i686/ are linked.

cd /usr/src/zaptel-1.2.16/
make clean
make
make install
make install-udev
make config

Change Code 2,16,19 to 2,6,18

#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19) to
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
vi /usr/src/zaptel-1.2.16/xpp/xbus-core.c

Start Zaptel :

/ect/init.d/zaptel start

LibPRI Installation :

cd /usr/src/libpri-1.2.4/
make clean
make
make install

Asterisk Installation :

cd /usr/src/asterisk-1.2.17/
make clean
make
make install
make samples
make config

Asterisk Sound Pack Installation

cd /usr/src/asterisk-sounds/
make install

mkdir /tftpboot
useradd usr
passwd usr
1234 enter
1234 enter
vi /etc/passwd

vi /etc/vsftpd/vsftpd.conf

change the following:
chroot_list_enable=YES
userlist_enable=YES
userlist_deny=NO
vi /etc/vsftpd/chroot_list

In the file : vi /etc/vsftpd/user_list, add “usr” and remove all through Text Editor

cd /tftpboot/

chown usrprovis /tftpboot/
chmod u-w . (note the period)
mkdir contacts
mkdir log
mkdir overrides
chown usrprovis log
chgrp usrprovis log
chown usrprovis contacts
chgrp usrprovis contacts
chown usrprovis overrides
chgrp usrprovis overrides

Firewall should be turned :

chkconfig iptables off

In order to check the services : chkconfig –list

Root SSH should be disabled and creation of account with permissions.

Edit sshd config and remove # PermiRootLogin and change yes to no. : vi /etc/ssh/sshd_config

Perl Module

Install Perl – Makefile.PL

wget through any website for Perl
perl Makefile.PL

DHCP Installation :

yum install dhclient -y

Troubleshooting tools Installation :

yum install yum install iftop -y

Configuration : Realtime DEP :

yum install mysql mysql-server mysql-devel

Add-on Compile :

./configure –with-mysqlclient=/usr