#!/bin/bash # Install Freeswitch at /usr/local/freeswitch # to run this, do # wget -qO- http://installfs.tomcarlson.com | /bin/bash cd /usr/local/src sudo apt-get -y install aptitude sudo aptitude -y update sudo apt-get -y update sudo aptitude -y install git-core subversion build-essential autoconf automake libtool libncurses5 libncurses5-dev make libjpeg-dev # optional packages sudo aptitude -y install libcurl4-openssl-dev libexpat1-dev libgnutls-dev libtiff4-dev libx11-dev unixodbc-dev libssl-dev python2.7-dev zlib1g-dev libzrtpcpp-dev libasound2-dev libogg-dev libvorbis-dev libperl-dev libgdbm-dev libdb-dev python-dev uuid-dev #for ubuntu 11.04+ sudo aptitude -y install gawk update-alternatives --set awk /usr/bin/gawk git clone git://git.freeswitch.org/freeswitch.git cd freeswitch ./bootstrap.sh ./configure make sudo make install sudo make uhd-sounds-install sudo make uhd-moh-install sudo make samples #cp debian/freeswitch-sysvinit.freeswitch.init /etc/init.d/freeswitch #freeswitch distribution file is incorrect chmod 755 /etc/init.d/freeswitch #make the init.d/freeswitch script start at boot update-rc.d -f freeswitch defaults cp debian/freeswitch-sysvinit.freeswitch.default /etc/default/freeswitch # (** change to "true" **) #Add the freeswitch user: adduser --disabled-password --quiet --system --home /usr/local/freeswitch --gecos "FreeSwitch Voice Platform" --ingroup daemon freeswitch adduser freeswitch audio #Change freeswitch installation ownership (from root) chown -R freeswitch:daemon /usr/local/freeswitch/ #Remove permissions for other #chmod -R o-rwx /usr/local/freeswitch/ #Make sure any new files will inherit ownership by making all directories +s find /usr/local/freeswitch -type d -exec chmod +s {} + #chmod -R +s /usr/local/freeswitch #Add the fs_cli to your default path ln -s /usr/local/freeswitch/bin/fs_cli /usr/local/bin/ /etc/init.d/freeswitch start