EgoWeb

by rand_egoweb
61 deployments · 8 still active · last rev. 8 months ago

This StackScript installs EgoWeb and all software required to run EgoWeb.

EgoWeb 2.0 is the result of an ongoing collaborative effort by non-profit research centers and universities to conduct social network analyses and present the data visually. The first version of EgoWeb was a modification to the open source personal/egocentric network data collection java-based software EgoNet, which was uploaded to the file sharing system SourceForge by Chris McCarty at the University of Florida in 2009.

Compatible with: Debian 7, Debian 8, Ubuntu 14.04 LTS
						#!/bin/bash
set -e
# <UDF name="db_password" Label="MySQL root Password" />

DB_NAME="egoweb"
DB_USER="egowebuser"
DB_USER_PASSWORD="egowebpass"

echo "db_name is $DB_NAME"
echo "db_user is $DB_USER"
echo "db_user_password is $DB_USER_PASSWORD"

source <ssinclude StackScriptID="1">

system_update
postfix_install_loopback_only
mysql_install "$DB_PASSWORD" && mysql_tune 40
mysql_create_database "$DB_PASSWORD" "$DB_NAME"
mysql_create_user "$DB_PASSWORD" "$DB_USER" "$DB_USER_PASSWORD"
mysql_grant_user "$DB_PASSWORD" "$DB_USER" "$DB_NAME"
php_install_with_apache && php_tune
apache_install && apache_tune 40
goodstuff


a2enmod rewrite

sudo apt-get install -y php5-mcrypt

sudo php5enmod mcrypt

sudo apt-get install -y git

echo 'CLONING EGOWEB FROM GIT'
git clone https://github.com/qualintitative/egoweb
echo 'REMOVING DEFAULT WEB FILES'
sudo rm -rf /var/www/*
echo 'ADDING EGOWEB FILES TO WEB DIRECTORY'
sudo cp -r egoweb/app/. /var/www/html/

echo 'SETTING UP TABLES IN MYSQL FOR EGOWEB - USE SQL FILE AS SOURCE'
echo "SOURCE /egoweb/sql/egoweb_db.sql" | mysql egoweb -u root -p$DB_PASSWORD

ELINENOF=$(grep -n '/var/www/' /etc/apache2/apache2.conf |cut -f1 -d:)
echo "lineno is $ELINENOF"
ELINENO=$(($ELINENOF + 2))
echo "lineno is $ELINENO"

echo "$ELINENO s/None/All/"
sed -i -e "$ELINENO s/None/All/" /etc/apache2/apache2.conf

restartServices

cd /var/www/html
./initialize.sh