Skip to content

Instantly share code, notes, and snippets.

@dwelch2344
Last active February 11, 2018 22:24
Show Gist options
  • Save dwelch2344/80f378841b0f7a9dd47d to your computer and use it in GitHub Desktop.
Save dwelch2344/80f378841b0f7a9dd47d to your computer and use it in GitHub Desktop.
A simple install script to setup OpenVbx on an Ubuntu 14.04 box
#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2
exit 1
fi
export DBNAME=openvbx
export DBUSER=openvbx
export DBPASS=openvbxPass
apt-get update
apt-get upgrade
apt-get -y install apache2 php5 libapache2-mod-php5 php5-mysql libapache2-mod-auth-mysql php5-curl git mysql-server
echo "Initializing database $DBNAME; please have your root MySQL password ready"
mysql -p -e "create database $DBNAME; GRANT ALL PRIVILEGES ON $DBNAME.* to $DBUSER@localhost IDENTIFIED BY '$DBPASS'; FLUSH PRIVILEGES;"
service apache2 restart
cd /var/www/html
rm index.html
git clone git://github.com/twilio/OpenVBX.git
mv OpenVBX calls
sed -i -e "s/# RewriteBase \/openvbx/RewriteBase \/calls/g" /var/www/html/calls/.htaccess
chmod 777 -Rf /var/www/html/calls/OpenVBX/config
chmod 777 -Rf /var/www/html/calls/audio-uploads
@JamesJosephFinn
Copy link

APC and Memcache are missing, but optional. In line 14 you can add php5-memcache memcached php-apc. Note that php5-memcache doesn't have the "d" at the end. php-memcached is a different package, and it didn't give me the green light.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment