Home arrow Asterisk arrow Asterisk/astguiclient install from scratch_v.2.0.3

Language Translator

Hacking Zone

Hacking Tools
Attacking

Configure Windows

Windows Configuration

Novels

Mix Novels

Human Personality

Body Language
Asterisk/astguiclient install from scratch_v.2.0.3 PDF Print E-mail
Written by Hemanshu Patel   
Wednesday, 17 October 2007
Article Index
Asterisk/astguiclient install from scratch_v.2.0.3
Page 2
Page 3
Page 4
Page 5
Page 6
Page 7
Page 8

PHASE 3: INSTALLING SOFTWARE BEFORE ASTERISK

In this step we will be installing software that Asterisk and/or astGUIclient needs to be able to function to its fullest ability. Not all of these software packages are manditory to successfully install Asterisk and some of them can be installed on other machines on your network like MySQL or Apache. But, in this installation we are assuming that there are no other machines on our network to help the Asterisk server, so it must have everything it needs installed locally.

SUBPHASE 3.0: install new Gnu Make

A new version of the "make" compilation application replaced the 4-year-old version that most Linux distros(Including Slackware) use. This is only needed if you will be building Asterisk from the 1.4 release tree.

- wget http://mirrors.kernel.org/gnu/make/make-3.81.tar.gz

- gunzip make-3.81.tar.gz

- tar xvf make-3.81.tar

- cd make-3.81

- ./configure

- make

- make install

SUBPHASE 3.1: MySQL requirements

You must at least have Mysql client installed on each VICIDIAL server, but you only need one database server.

MySQL is a fast database system that is very easy to integrate with any application. You can either install the server on the local Asterisk system or have one somewhere on your network. For our purposes, we are creating an Asterisk installation that is self contained and needs no other local servers to operate, so we will need to install mysql on this machine.

*REQUIRED and OPTIONAL* (only install MySQL server locally if you don't want to use an installation on another machine, Mysql client is required on all VICIDIAL servers) NOTE: a minimum of MySQL server 4.0.X is required

Go to http://www.mysql.com/ and download the mysql package

- to install this directly on the command line type:

- cd /usr/local

- wget http://mirror.trouble-free.net/mysql_mirror/Downloads/MySQL-4.0/mysql-4.0.27.tar.gz

- gunzip mysql-4.0.27.tar.gz

- tar xvf mysql-4.0.27.tar

- cd mysql-4.0.27

- groupadd mysql

- useradd -g mysql mysql

- "./configure --prefix=/usr/local/mysql --enable-large-files --enable-shared=yes --with-readline"

**** If only MySQL client is needed for DBD::mysql then use this:

- "./configure --prefix=/usr/local/mysql --without-server --enable-shared=yes --with-readline"

**** If using version 5 tree MySQL client then use this:

- "./configure --prefix=/usr/local/mysql --without-server --enable-shared=yes --with-readline --enable-thread-safe-client"

- make

- make install

- scripts/mysql_install_db

- chown -R root /usr/local/mysql

- chown -R mysql /usr/local/mysql/var

- chgrp -R mysql /usr/local/mysql

- cp support-files/my-medium.cnf /etc/my.cnf

- /usr/local/mysql/bin/mysqld_safe --user=mysql &

- ln -s /tmp/mysql.sock /var/run/mysql/mysql.sock

**** For some systems you may need to add the mysql/bin directory to your PATH:

- PATH=$PATH:$HOME/bin:/usr/local/mysql/bin/

- export PATH

**** you may also want to add those two lines to your /root/.bash_profile file

**** For Mysql 5 tree only, you also may need to copy the libmysqlclient.so file to libs

- cp /usr/local/mysql-5.0.27/libmysql/.libs/libmysqlclient.so /usr/lib/

- cp /usr/local/mysql-5.0.27/libmysql/.libs/libmysqlclient.so.15 /usr/lib/

- you are done

***** NOTE: if you will be using any of the DBI perl scripts: *****

Every machine that you will be using the newer BDI perl scripts on will need to have the perl modules DBI and DBD::mysql installed on them. To do this you will also need to at least have the MySQL client installed on the server

(see above) then you will need to go to 'cpan' and "install DBI" and "install DBD::mysql". You may need to "force install DBD::mysql" if the DBD tests fail on your first try, but that is OK since the tests are not needed

SUBPHASE 3.2: Installing Perl Modules

NOTE - you can install ActiveState http://www.activestate.com perl which may improve performance, but it is not required. Here's the source for ActiveState Perl 5.8: (it's free)

http://downloads.activestate.com/ActivePerl/src/5.8/AP817_source.tgz

I hope to add the lengthy steps for installing it as your default perl on your server but I need some time and a free machine to do that.

cpan is the "Comprehensive Perl Archive Network". It's a mirrored archive of most of the perl modules out there complete with a installation and management command-line interface. Here's what you do to start it:

*REQUIRED* (needed for perl AGIs)

1. perl -MCPAN -e shell # type in the command line

2. You will then go through CPAN setup, just hit ENTER for most prompts except

for the mirrors list, you will want to select at least 4 mirrors

- yes for manual configuration

- enter for the next 18 prompts

- for the "make install options" it's a good idea to add UNINST=1

- enter for the next 4 prompts

- select your continent and country

- select a few cpan mirrors

- enter for the next 2 prompts

3. Once you see the cpan> prompt you can begin installing modules

4. If you've never installed cpan before you should probably install the

following modules first: (say YES if asked to install prerequisites)

- install MD5

- install Digest::MD5

- install Digest::SHA1

- install readline (just hit Enter when it asks for operator)

- install Bundle::CPAN

- reload cpan

- then you can install other modules:

- install DBI

- force install DBD::mysql (must at least have mysqlclientlibs installed)

- install Net::Telnet

- install Time::HiRes

- install Net::Server

- install Unicode::Map (needed for super list loader Excel)

- install Jcode (needed for super list loader Excel)

- install Spreadsheet::WriteExcel (needed for super list loader Excel)

- install OLE::Storage_Lite (needed for super list loader Excel)

- install Proc::ProcessTable (needed for super list loader Excel)

- install IO::Scalar (needed for super list loader Excel)

- install Spreadsheet::ParseExcel (needed for super list loader Excel)

- then quit cpan, you are done

5. Go to http://asterisk.gnuinter.net/ and download the asterisk-perl module

(backup link: http://www.freedomphones.net/files/asterisk-perl-0.08.tar.gz)

NOTE: Do NOT use the 0.09 version, it does not work with VICIDIAL

- to install this directly on the command line type:

- cd /usr/local

- wget http://asterisk.gnuinter.net/files/asterisk-perl-0.08.tar.gz

- gunzip asterisk-perl-0.08.tar.gz

- tar xvf asterisk-perl-0.08.tar

- cd asterisk-perl-0.08

- perl Makefile.PL

- make all

- make install

- you are done

SUBPHASE 3.3: Installing other utilities

Sox is an audio utility that allows you to mix audio files together at their start point into one file. it is necessary for Asterisk recordings that record in and out as separate files *REQUIRED* (needed for recording mixing)

1. Go to http://sourceforge.net/projects/sox/ and download the sox package

- to install this directly on the command line type:

- cd /usr/local

- wget http://easynews.dl.sourceforge.net/sourceforge/sox/sox-12.17.9.tar.gz

- gunzip sox-12.17.9.tar.gz

- tar xvf sox-12.17.9.tar

- cd sox-12.17.9

- ./configure

- make (if alsa.o errors add --disable-alsa-dsp to configure and redo)

- make install

- you are done

LAME is an MP3 encoder used to convert audio files from WAV to MP3. We prefer GSM usually, but some users have standardized on MP3 so they would need this utility to be loaded to use that option. *OPTIONAL* (only needed if you will be converting recordings to MP3)

2. Go to http://lame.sourceforge.net/ and download the lame package

- to install this directly on the command line type:

- cd /usr/local

-wget http://umn.dl.sourceforge.net/sourceforge/lame/lame-3.96.1.tar.gz

-gunzip lame-3.96.1.tar.gz

-tar xvf lame-3.96.1.tar

-cd lame-3.96.1

-./configure

-make

-make install

- you are done

Screen is a terminal emulator that allows you to run a process as command line and be able to detach from them('Ctrl+a' then 'd') and log all output of the terminal to a screenlog file if desired(add a '-L' to the launching command). In our installations this is how we launch Asterisk upon startup and still have the ability to log output and still attach to the screen that executed asterisk originally.

*REQUIRED* *MANDITORY FOR VICIDIAL SERVERS*

3. Go to http://www.gnu.org/software/screen/ and download the screen package

- to install this directly on the command line type:

- cd /usr/local

- wget http://ftp.gnu.org/gnu/screen/screen-4.0.2.tar.gz

or for older version:

- wget http://mirrors.kernel.org/gnu/screen/screen-3.9.15.tar.gz

- gunzip screen-4.0.2.tar.gz

- tar xvf screen-4.0.2.tar

- cd screen-4.0.2

- ./configure

- make

- make install

- you are done

ttyload is a simple terminal application that shows the processor load in a graphical time-based scrolling graph. We use it to view how loaded the system is and it visualizes load spikes very well *OPTIONAL* (only for obsessive admins like me)

4. Go to http://www.daveltd.com/src/util/ttyload/ and download the ttyload package

- to install this directly on the command line type:

- cd /usr/local

- wget http://www.daveltd.com/src/util/ttyload/ttyload-0.4.4.tar.gz

- gunzip ttyload-0.4.4.tar.gz

- tar xvf ttyload-0.4.4.tar

- cd ttyload-0.4.4

- make

- ln -s /usr/local/ttyload-0.4.4/ttyload /usr/bin/ttyload

- you are done

ntpd is the network time protocol daemon that matches the time on your machine with the time of a master server somewhere in the world. We use it to make sure the time is the same on our client computers and our servers. *MANDITORY FOR VICIDIAL SERVERS* (install on server and all clients)

5. Go to http://www.ntp.org/ and download the ntpd package

- to install this directly on the command line type:

- cd /usr/local

- wget http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-4.2.2p3.tar.gz

If you get compilation errors here try 4.1.2:

- wget http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.1.2.tar.gz

- gunzip ntp-4.2.2p3.tar.gz

- tar xvf ntp-4.2.2p3.tar

- cd ntp-4.2.2p3

- ./configure

- make

- make install

- vi /etc/ntp.conf (change to just 1 line: "server 18.145.0.30")

- cp /etc/ntp.conf /etc/ntpd.conf # just to be sure

- /usr/local/bin/ntpdate -u 18.145.0.30 # initial sync

- /usr/sbin/ntpd # run it

- you are done

iftop is a good console bandwidth visualization tool that shows you active connections, where they are going to/from and how much of your precious bandwidth they are using. *OPTIONAL*

6. Go to http://www.ex-parrot.com/~pdw/iftop/ and download the package

- to install this directly on the command line type:

- cd /usr/local

- wget http://www.tcpdump.org/release/libpcap-0.9.4.tar.gz

- gunzip libpcap-0.9.4.tar.gz

- tar xvf libpcap-0.9.4.tar

- cd libpcap-0.9.4

- ./configure

- make

- make install

- cd /usr/local

- wget http://www.ex-parrot.com/~pdw/iftop/download/iftop-0.17.tar.gz

- gunzip iftop-0.17.tar.gz

- tar xvf iftop-0.17.tar

- cd iftop-0.17

- ./configure

- make

- make install

- iftop

- you are done

ploticus is a free graph creation package that allows you to create line graphs within PNG files simply by creating a config file and a data file. We use this package along with the included PHP script to generate server performance graphs that can be displayed real-time on a web page. *OPTIONAL* (only needed for server performance graphing web reports)

7. Go to http://ploticus.sourceforge.net/ and download the package

- to install this directly on the command line type:

NOTE: you may have to edit the Makefile to remove X11 if you don't have it

- cd /usr/local

- wget http://ploticus.sourceforge.net/download/pl232src.tar.gz

- gunzip pl232src.tar.gz

- tar xvf pl232src.tar

- cd pl232src/src/

- make clean

- make

- make install

- you are done

NOTE: for the graphics to work on the AST_server_performance page you will need the 'pl' script to be linked or copied into your htdocs/vicidial/ploticus directory NOTE: you may need to edit the Makefile for ploticus if you do not have X11

openssh is a remote login protocol server that is always a good idea to have updated on your system, so we're going to install a new version now. *OPTIONAL* (only updated as a precaution, not manditory) [NOTE: newer zlib is needed before installing]

8. Go to http://www.openssh.org/ and download the linux source for openssh

- to install this directly on the command line type:

- cd /usr/local

- wget http://www.zlib.net/zlib-1.2.3.tar.gz

- gunzip zlib-1.2.3.tar.gz

- tar xvf zlib-1.2.3.tar

- cd zlib-1.2.3

- ./configure

- make

- make install

- cd /usr/local

- wget http://mirror.mcs.anl.gov/openssh/portable/openssh-4.6p1.tar.gz

- gunzip openssh-4.6p1.tar.gz

- tar xvf openssh-4.6p1.tar

- cd openssh-4.6p1

- ./configure

- make

- make install

- you are done

openssl is the open-source SSL libraries package, and to install a fake SSL cert locally and have it work with apache, you need it installed on your machine *OPTIONAL* (only install openssl if you want to use SSL secured web pages on your locally installed copy of Apache web server)

9. Go to http://www.openssl.org/ and download the linux source for openssl

- to install this directly on the command line type:

- cd /usr/local

- wget http://www.openssl.org/source/openssl-0.9.8e.tar.gz

- gunzip openssl-0.9.8e.tar.gz

- tar xvf openssl-0.9.8e.tar

- cd openssl-0.9.8e

- ./config

- make

- make install

- you are done

apache is a web server that allows you to use many different modules with it to extend it's functionality. In order to use some of the astguiclient functionalities we need to have Apache and PHP installed on this machine. *OPTIONAL* (only install Apache and PHP locally if you don't want to use an installation on another machine)

10. Go to http://www.apache.org/ and download the apache unix source Go to http://www.php.net/ and download the php unix source code

- to install this directly on the command line type:

- cd /usr/local

- wget http://apache.secsup.org/dist/httpd/httpd-2.0.59.tar.gz

- gunzip httpd-2.0.59.tar.gz

- tar xvf httpd-2.0.59.tar

- wget http://us2.php.net/distributions/php-4.4.6.tar.gz

NOTE: PHP 5.1.1 has also been tested with this release

- gunzip php-4.4.6.tar.gz

- tar xvf php-4.4.6.tar

- cd httpd-2.0.59

- ./configure --enable-so --with-apxs2

- make

- make install

- cd ../php-4.4.6

- ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql

- make

- make install

- cp php.ini-dist /usr/local/lib/php.ini

NOTE: you will want to make sure notice logging is turned off:
error_reporting = E_ALL & ~E_NOTICE ; (this is default)

!!! REQUIRED !!! raise the memory limit for scripts in php.ini:

memory_limit = 48M

- vi /usr/local/apache2/conf/httpd.conf

add the following lines:

"AddType application/x-httpd-php .php .phtml"

"LoadModule php4_module libexec/libphp4.so"

or

"LoadModule php4_module modules/libphp4.so"

modify the index.html line and add index.php to the list

- /usr/local/apache2/bin/apachectl start

- go to http://your-new-asterisk-server-ipaddress/ to see if it worked

- you are done

OPTIONAL- Load eaccelerator PHP-caching application:

- Go to http://eaccelerator.net and download the most recent package

- cd /usr/local

- wget http://bart.eaccelerator.net/source/0.9.5/eaccelerator-0.9.5.zip

- unzip eaccelerator-0.9.5.zip

- cd eaccelerator-0.9.5

- export PHP_PREFIX="/usr/local"

- $PHP_PREFIX/bin/phpize

- ./configure --enable-eaccelerator=shared --with-php-config=$PHP_PREFIX/bin/php-config

- make

- make install

- vi /usr/local/lib/php.ini

Add the following lines to the dynamic extensions section of php.ini:

(you may need to change the extension location depending on your install of php)

extension="../../../usr/local/eaccelerator-0.9.5/modules/eaccelerator.so"

eaccelerator.shm_size="48"

eaccelerator.cache_dir="/tmp/eaccelerator"

eaccelerator.enable="1"

eaccelerator.optimizer="1"

eaccelerator.check_mtime="1"

eaccelerator.debug="0"

eaccelerator.filter=""

eaccelerator.shm_max="0"

eaccelerator.shm_ttl="0"

eaccelerator.shm_prune_period="0"

eaccelerator.shm_only="0"

eaccelerator.compress="1"

eaccelerator.compress_level="9"

- mkdir /tmp/eaccelerator

- chmod 0777 /tmp/eaccelerator

# to verify installation:

- php -v

balance is a load-balancing application for Linux that will allow you to spread the load of your web traffic across many servers. If you are running more than 70 agents on a single server you may want to install this application and build another cheap web server to handle the extra load. *OPTIONAL*

11. Go to http://balance.sourceforge.net to download the most recent source version

- to install this directly on the command line type:

- cd /usr/local

- wget http://voxel.dl.sourceforge.net/sourceforge/balance/balance-3.34.tgz

- gunzip balance-3.34.tgz

- tar xvf balance-3.34.tar

- cd balance-3.34

- make

- make install

- /usr/sbin/balance -f 81 localhost:80 10.10.10.16:80

That command will take port 81 traffic and send it evenly to the local

server and the 10.10.10.16 server reducing the load and speeding up

the applications. More info on balance: http://www.inlab.de/balance.pdf

subversion is the new code control framework use by the Asterisk community. If you want to use the latest development code of Asterisk you will need to have this loaded on your system. *OPTIONAL*

12. Go to http://subversion.tigris.org to download the most recent source version

- to install this directly on the command line type:

- cd /usr/local

- wget http://subversion.tigris.org/downloads/subversion-1.3.2.tar.gz

- gunzip subversion-1.3.2.tar.gz

- tar xvf subversion-1.3.2.tar

- cd subversion-1.3.2

- ./configure

- make

- make install

mtop is a great utility for real-time monitoring of mysql and the queries that are running in it. *OPTIONAL*

13. Go to http://mtop.sourceforge.net to download the most recent version

- to install this directly on the command line type:

- cd /usr/local

- wget http://superb-east.dl.sourceforge.net/sourceforge/mtop/mtop-0.6.6.tar.gz

- gunzip mtop-0.6.6.tar.gz

- tar xvf mtop-0.6.6.tar

- cd mtop-0.6.6

- cpan

- install Curses

- install Getopt::Long

- install Net::Domain

- quit

- perl Makefile.PL

- make

- make install

- /usr/local/bin/mtop --dbuser=root --seconds=3

sipsak is an optional utility that VICIDIAL can use to send messages to an agent's SIP-based phone(like the Snom 320) to display text on their LCD screen. If you want to use this, make sure it is installed on the same server that your web server is installed on(Apache). *OPTIONAL*

14. Go to http://sipsak.org to download the most recent version

- to install this directly on the command line, type:

- cd /usr/local

- wget http://download.berlios.de/sipsak/sipsak-0.9.6-1.tar.gz

- gunzip sipsak-0.9.6-1.tar.gz

- tar xvf sipsak-0.9.6-1.tar

- cd sipsak-0.9.6-1

- ./configure

- make

- make install

- /usr/local/bin/sipsak --version



 
< Prev   Next >
Your Ad Here

Donate us!!

Enter Amount:

RSS socialnet

Add to MyYahoo!
Subscribe in NewsGator Online
Add to Newsburst
Add to Google
Add to My AOL
Add to Pluck
Subscribe in FeedLounge
Add to Windows Live
Add to NetVibes
Subscribe in Rojo
Subscribe in Bloglines
Add to MyMSN
Add to Plusmo for your cellphone
Add to PageFlakes
Add to Technorati
Add to BlinkBits

Powered password keylogger is a driver-based software keylogger by Eltima

Tired of MS Office ? Try Ashampoo Office 2008 . All OS supported