source-master.sh 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #!/bin/sh
  2. echo "Installing the FreeSWITCH source"
  3. DEBIAN_FRONTEND=none APT_LISTCHANGES_FRONTEND=none apt-get install -y -q ntpdate libapache2-mod-log-sql-ssl libfreetype6-dev git-buildpackage doxygen yasm nasm gdb git build-essential automake autoconf 'libtool-bin|libtool' python uuid-dev zlib1g-dev 'libjpeg8-dev|libjpeg62-turbo-dev' libncurses5-dev libssl-dev libpcre3-dev libcurl4-openssl-dev libldns-dev libedit-dev libspeexdsp-dev libspeexdsp-dev libsqlite3-dev perl libgdbm-dev libdb-dev bison libvlc-dev libvlccore-dev vlc-nox pkg-config ccache libpng-dev libvpx-dev libyuv-dev libopenal-dev libbroadvoice-dev libcodec2-dev libflite-dev libg7221-dev libilbc-dev libmongoc-dev libsilk-dev libsoundtouch-dev libmagickcore-dev liblua5.2-dev libopus-dev libsndfile-dev libopencv-dev libavformat-dev libx264-dev erlang-dev libldap2-dev libmemcached-dev libperl-dev portaudio19-dev python-dev libsnmp-dev libyaml-dev libmp4v2-dev
  4. apt-get install -y -q unzip libpq-dev memcached libshout3-dev libvpx-dev libmpg123-dev libmp3lame-dev
  5. apt-get update && apt-get install -y -q ntp curl haveged
  6. curl https://files.freeswitch.org/repo/deb/debian/freeswitch_archive_g0.pub | apt-key add -
  7. echo "deb http://files.freeswitch.org/repo/deb/freeswitch-1.6/ jessie main" > /etc/apt/sources.list.d/freeswitch.list
  8. echo "deb http://files.freeswitch.org/repo/deb/debian-unstable/ jessie main" > /etc/apt/sources.list.d/freeswitch.list
  9. apt-get update && apt-get upgrade
  10. apt-get install -y -q freeswitch-video-deps-most
  11. git clone https://freeswitch.org/stash/scm/fs/freeswitch.git /usr/src/freeswitch
  12. cd /usr/src/freeswitch
  13. sed -i /usr/src/freeswitch/modules.conf -e s:'#applications/mod_avmd:applications/mod_avmd:'
  14. sed -i /usr/src/freeswitch/modules.conf -e s:'#applications/mod_callcenter:applications/mod_callcenter:'
  15. sed -i /usr/src/freeswitch/modules.conf -e s:'#applications/mod_cidlookup:applications/mod_cidlookup:'
  16. sed -i /usr/src/freeswitch/modules.conf -e s:'#applications/mod_memcache:applications/mod_memcache:'
  17. sed -i /usr/src/freeswitch/modules.conf -e s:'#applications/mod_curl:applications/mod_curl:'
  18. sed -i /usr/src/freeswitch/modules.conf -e s:'#formats/mod_shout:formats/mod_shout:'
  19. ./bootstrap.sh -j
  20. #./configure --prefix=/usr/local/freeswitch --enable-core-pgsql-support --enable-system-lua --disable-fhs
  21. ./configure --prefix=/usr/local/freeswitch --enable-core-pgsql-support --disable-fhs
  22. #make mod_shout-install
  23. make
  24. rm -rf /usr/local/freeswitch/{lib,mod,bin}/*
  25. make install
  26. make sounds-install moh-install
  27. make hd-sounds-install hd-moh-install
  28. make cd-sounds-install cd-moh-install
  29. #move the music into music/default directory
  30. mkdir -p /usr/local/freeswitch/sounds/music/default
  31. mv /usr/local/freeswitch/sounds/music/*000 /usr/local/freeswitch/sounds/music/default
  32. #configure system service
  33. ln -s /usr/local/freeswitch/bin/fs_cli /usr/bin/fs_cli
  34. cp "$(dirname $0)/source/freeswitch.service" /lib/systemd/system/freeswitch.service