Installing Asterisk 1.2.17 on Fedora Core 6 (zod)


This is the process I go through to install Asterisk on Fedora Core 6. I repeated the steps and documented them as thoughraly as I could. I would recommend reading over the entire tutorial first as some commands are eithier optional or only to be done if there is a problem. I have added solutions to each problem that I ran into while preforming this on various hardware so not all commands will be used. In addition, the method of placing source files is presented as three options and you will only need preform one. Enjoy! --kanderson


Install FC6 with no pre-configured options checked. NO CHECKS AT ALL, not even base! This will only require disk 1 (unless you have a RAID array then you will also need disk 3).

Take out the cdrom as instructed and reboot the computer, once you are at the terminal re-insert FC6 disk 1

Logon as Root

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

Install YUM
TIP: Ignore the warnings while installing RPMs
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

Install Kernel Sources
TIP: Do not use yum, get the kernel source off Fedora Core disk one!
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

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

Install WGET (optional)
rpm -i /mnt/cdrom/Fedora/RPMS/wget-1.10.2-7.i386.rpm

Install SSH
yum install openssh openssh-clients openssh-server -y

Start the SSH Daemon
/etc/init.d/sshd start

Install VSFTP
yum install vsftpd -y

Start VSFTP Daemon and Start on Boot
/etc/init.d/vsftpd start
chkconfig vsftpd on

Now place your source files for asterisk, mp3 players, zaptel, and other stuff in /usr/src/
A) via CDROM: (see bellow for what is on my "asterisk kit")
cd /
umount /dev/cdrom

Change cd now.
mount /dev/cdrom /mnt/cdrom
cp /mnt/cdrom/* /usr/src/ -R

TIP: If you get "umount: /mnt/cdrom: device is busy" preform the following commands otherwise skip them (thanks Morpheo)
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 (optional removal of list open files)

B) via FTP:
vi /etc/selinux/config

change SELINUX=enforcing to SELINUX=disabled
vi /etc/vsftpd/user_list

remove root from the list
vi /etc/vsftpd/ftpusers

remove root from the list

You can now log in using your root account via FTP, later we will be changing the FTP files but remember to change SELINUX back to enforcing when done.

C) other methods:
Just worth mentioning that you could use SVN repositories, but we have not installed any method to checkout. Furthermore, you can use wget but I do not have the URL for all the files...


Install Madplay (MOH)
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

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

Install Zaptel
''TIP: If you get a you do not appear to have the source installed error try rebooting (if you have not done so) or that the source is for i686. Also ensure that the /li'b/modules/2.6.18-1.2798.fc6-i686/build is linked to /usr/src/2.6.18-1.2798.fc6-i686/'
cd /usr/src/zaptel-1.2.16/
make clean
make install
make install-udev
make config

TIP: (from a unknown forum) if you get a error referring to inode change this file then repeat the zaptel install. Change the code 2,6,19 to 2,6,18 as follows:
vi /usr/src/zaptel-1.2.16/xpp/xbus-core.c

Start Zaptel
/ect/init.d/zaptel start

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

Install Asterisk
TIP: If you get a cleantest error make sure you have the latest build of 1.2.17! The first build seemed to have compilation errors on FC6.
cd /usr/src/asterisk-1.2.17/
make clean
make install
make samples
make config

Install Asterisk Sound Pack
cd /usr/src/asterisk-sounds/
make install

Setup Provision Folder from Asterisk@Home Handbook Wiki Chapter 7
TIP: This will create a provisioning account named usrprovis with a password 1234
mkdir /tftpboot
useradd usrprovis
passwd usrprovis
1234 enter
1234 enter
vi /etc/passwd

Change the line starting with usrprovis to read: usrprovis:x:500:500::/tftpboot:/sbin/nologin
vi /etc/vsftpd/vsftpd.conf

change the following:
chroot_list_enable=YES (make sure it is not commented #)
vi /etc/vsftpd/chroot_list

remove everything in this file and add usrprovis
vi /etc/vsftpd/user_list

remove everything in this file and add usrprovis
cd /tftpboot/

~Notice: You must employ provisioning files that implement the same directory structure or phones will not be able to upload logs!~
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

Turn off Firewall
TIP: I would recommend changing the rules instead
chkconfig iptables off

Disable Services
For services that are on for the varrious levels use the command chkconfig ${service_name} off to match the chart bellow.
If you want to list all the services out like you see bellow issue the command chkconfig --list
asterisk 0:off 1:off 2:on 3:on 4:on 5:on 6:off
haldaemon 0:off 1:off 2:off 3:on 4:on 5:on 6:off
ip6tables 0:off 1:off 2:off 3:off 4:off 5:off 6:off
iptables 0:off 1:off 2:off 3:off 4:off 5:off 6:off
kudzu 0:off 1:off 2:off 3:on 4:on 5:on 6:off
mcstrans 0:off 1:off 2:on 3:on 4:on 5:on 6:off
messagebus 0:off 1:off 2:off 3:on 4:on 5:on 6:off
netfs 0:off 1:off 2:off 3:off 4:off 5:off 6:off
netplugd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
network 0:off 1:off 2:on 3:on 4:on 5:on 6:off
rdisc 0:off 1:off 2:off 3:off 4:off 5:off 6:off
restorecond 0:off 1:off 2:on 3:on 4:on 5:on 6:off
sshd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
syslog 0:off 1:off 2:on 3:on 4:on 5:on 6:off
vsftpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
zaptel 0:off 1:off 2:on 3:on 4:on 5:on 6:off

Disable Root SSH
First create an account that you can use to login with limited permissions.
useradd sshlogin
passwd sshlogin
1234 enter
1234 enter

Then edit the sshd config
vi vi /etc/ssh/sshd_config

Uncomment PermitRootLogin and change the yes to a no.
TIP: I would recommend changing the port number by uncommenting the line and choosing a random port, the larger the safer. When you ssh the command on the remote client will look like
ssh ${domain_name} -l sshlogin -p ${choosen_port_num}

Install Perl Modules (optional - for Perl based AGI scripts)
perl Makefile.PL
make all
make install

Install DHCP Client (for initial DHCP config)
TIP: Always run production systems with a static IP or MAC reservation!! Asterisk and SIP are sensitive to changing IPs, NAT, and poor DNS.
yum install dhclient -y

Install Troubleshooting tools
yum install iftop -y

Realtime DEP (work in progress):
yum install mysql mysql-server mysql-devel
Compile the addons using
./configure --with-mysqlclient=/usr
make menuselect
unselected the already installed addons
make install

Remote VM (work in progress):
yum install libtool-ltdl libtool-ltdl-devel unixODBC unixODBC-devel mysql-connector-odbc
./configure --with-unixODBC=/usr/local --with-mysql-sources=/usr/local/mysql --enable-gui=no

Jabber DEP (work in progress):

Other (work in progress):
yum install curl curl-devel newt newt-devel net-snmp net-snmp-libs

Folders on cdrom mentioned above:
  • agi-bin - my agi scripts
  • asterisk-1.2.17 – asterisk source files
  • asterisk-sounds – asterisk sound pack
  • custom-sounds – sounds that I have added to the default pack
  • g729 – codec files
  • libpri-1.2.4 – pri source files
  • mpg123-0.65 – mpg source files
  • zaptel-1.2.16 – zaptel source files
  • sipp – sipp (SIP debuging tool) source files
  • iperf – network performance tool source files
  • libmad-0.15.1b-4.fc6.i386.rpm - dependency for madplay
  • madplay-0.15.2b-32.i586.rpm - madplay rpm
Created by: kanderson, Last modification: Mon 02 of Jul, 2007 (13:37 UTC)
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+