-
-
Save DmitryMiroshnichenko/52816fa390eb681b6d83 to your computer and use it in GitHub Desktop.
A simple install script to setup OpenVbx on an Debian for Google Compute Engine
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [[ $EUID -ne 0 ]]; then | |
echo "This script must be run as root" 1>&2 | |
exit 1 | |
fi | |
export DBNAME="openvbxexmpl" | |
export DBUSER="openvbx" | |
export DBPASS="openVbxSecretPass" | |
apt-get -y update | |
apt-get -y 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 if not exists $DBNAME; GRANT ALL PRIVILEGES ON $DBNAME.* to $DBUSER@localhost IDENTIFIED BY '$DBPASS'; FLUSH PRIVILEGES;" | |
service apache2 restart | |
cd /var/www | |
rm -f index.html | |
git clone git://github.com/twilio/OpenVBX.git | |
cp -rf OpenVBX/ calls | |
rm -Rf OpenVBX/ | |
sed -i -e "s/# RewriteBase \/openvbx/RewriteBase \/calls/g" /var/www/calls/.htaccess | |
chmod 777 -Rf /var/www/calls/OpenVBX/config | |
chmod 777 -Rf /var/www/calls/audio-uploads | |
echo "Succeed" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment