Asterisk 13 on Ubuntu 14.04 Server
by Rich Schreiber 07/01/15
Install Ubuntu Server 14.04:
Perform a normal install and get your networking set as you normally would. Update the server and install some of the default tools prior to installing Asterisk. (Note: I perform inital installs as root, so you will need to use sudo before every command it you do not.)
Update Server and install prerequisites:
apt-get update; apt-get upgrade -y; apt-get dist-upgrade -y
apt-get install -y build-essential git-core pkg-config subversion libjansson-dev sqlite autoconf automake libtool libxml2-dev libncurses5-dev unixodbc unixodbc-dev libasound2-dev libogg-dev libvorbis-dev libneon27-dev libsrtp0-dev libspandsp-dev libmyodbc uuid uuid-dev sqlite3 libsqlite3-dev libgnutls-dev openssl libnet-ssleay-perl libauthen-pam-perl libio-pty-perl apt-show-versions
(When mysql is installed you will be prompted for a mysql admin password. Make sure to note this information for future reference.)
shutdown -r now
Configure SSH:
Edit /etc/ssh/sshd_config file and set "PermitRootLogin yes"
Webmin:
cd /usr/src
wget http://downloads.sourceforge.net/project/webadmin/webmin/1.730/webmin_1.730_all.deb
dpkg -i webmin_1.730_all.deb
(Note: if webmin fails to install because of missing prerequisites, issue the following command)
apt-get -f install
Log in to Webmin by pointing a browser to: https://<serverIP or name>/:10000
Preventing CTRL-ALT-DEL Restart:
Edit /etc/init/control-alt-delete.conf file and comment out the existing command and add a echo command like this:
exec /bin/echo "Control-Alt-Delete Pressed"
#exec shutdown –r now "Control-Alt-Delete pressed"
Compile and install Asterisk:
cd /usr/src
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-13-current.tar.gz
tar xvfz asterisk-13-current.tar.gz
cd asterisk-*
./configure
contrib/scripts/get_mp3_source.sh
make menuselect
At this point you will be asked for optional components. I suggest going under "Add-ons" and turning on "format_mp3". Also, in under "Extras Sounds Packages" select "EXTRA-SOUNDS-EN-GSM". Use space bar to select items, escape to go back up to the main menu, enter to drill down into a menu item, and "s" at the main menu to save your changes.
make
make install
make config
make samples
TFTP:
(TFTP and FTP servers are used to serve up configuration files to phones.)
apt-get install tftpd-hpa
Reset permissions on the /var/lib/tftpboot folder:
chmod 777 /var/lib/tftpboot
Edit /etc/default/tftpd-hpa with these contents:
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/var/lib/tftpboot"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="--secure --create"
RUN_DAEMON="yes"
FTP:
apt-get -y install proftpd
(During the install you will be prompted to configure the serve, choose "standalone")
Edit /etc/proftpd/proftpd.conf
Change the ServerName to the hostname of your server.
ServerName “ftp.mydomain.com”
To limit users to their home directory uncomment the line that says DefaultRoot:
# Use this to jail all users in their homes
DefaultRoot ~
After saving the file restart the service:
service proftpd restart
Set ProFTP to boot at starup:
update-rc.d proftpd defaults
Perform a normal install and get your networking set as you normally would. Update the server and install some of the default tools prior to installing Asterisk. (Note: I perform inital installs as root, so you will need to use sudo before every command it you do not.)
Update Server and install prerequisites:
apt-get update; apt-get upgrade -y; apt-get dist-upgrade -y
apt-get install -y build-essential git-core pkg-config subversion libjansson-dev sqlite autoconf automake libtool libxml2-dev libncurses5-dev unixodbc unixodbc-dev libasound2-dev libogg-dev libvorbis-dev libneon27-dev libsrtp0-dev libspandsp-dev libmyodbc uuid uuid-dev sqlite3 libsqlite3-dev libgnutls-dev openssl libnet-ssleay-perl libauthen-pam-perl libio-pty-perl apt-show-versions
(When mysql is installed you will be prompted for a mysql admin password. Make sure to note this information for future reference.)
shutdown -r now
Configure SSH:
Edit /etc/ssh/sshd_config file and set "PermitRootLogin yes"
Webmin:
cd /usr/src
wget http://downloads.sourceforge.net/project/webadmin/webmin/1.730/webmin_1.730_all.deb
dpkg -i webmin_1.730_all.deb
(Note: if webmin fails to install because of missing prerequisites, issue the following command)
apt-get -f install
Log in to Webmin by pointing a browser to: https://<serverIP or name>/:10000
Preventing CTRL-ALT-DEL Restart:
Edit /etc/init/control-alt-delete.conf file and comment out the existing command and add a echo command like this:
exec /bin/echo "Control-Alt-Delete Pressed"
#exec shutdown –r now "Control-Alt-Delete pressed"
Compile and install Asterisk:
cd /usr/src
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-13-current.tar.gz
tar xvfz asterisk-13-current.tar.gz
cd asterisk-*
./configure
contrib/scripts/get_mp3_source.sh
make menuselect
At this point you will be asked for optional components. I suggest going under "Add-ons" and turning on "format_mp3". Also, in under "Extras Sounds Packages" select "EXTRA-SOUNDS-EN-GSM". Use space bar to select items, escape to go back up to the main menu, enter to drill down into a menu item, and "s" at the main menu to save your changes.
make
make install
make config
make samples
TFTP:
(TFTP and FTP servers are used to serve up configuration files to phones.)
apt-get install tftpd-hpa
Reset permissions on the /var/lib/tftpboot folder:
chmod 777 /var/lib/tftpboot
Edit /etc/default/tftpd-hpa with these contents:
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/var/lib/tftpboot"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="--secure --create"
RUN_DAEMON="yes"
FTP:
apt-get -y install proftpd
(During the install you will be prompted to configure the serve, choose "standalone")
Edit /etc/proftpd/proftpd.conf
Change the ServerName to the hostname of your server.
ServerName “ftp.mydomain.com”
To limit users to their home directory uncomment the line that says DefaultRoot:
# Use this to jail all users in their homes
DefaultRoot ~
After saving the file restart the service:
service proftpd restart
Set ProFTP to boot at starup:
update-rc.d proftpd defaults