changed git call from https to git readonly
[atutor.git] / mods / atutor_opencaps / opencaps / scripts / install_remote_only.sh
1 #!/bin/sh
2
3 # apache, php5, mysql5
4 echo "============================"
5 echo "==Installing Apache, PHP=="
6 echo "============================"
7 sudo apt-get -y update
8 sudo apt-get -y install apache2 php5 curl libcurl3 libcurl3-dev php5-curl
9 sudo /etc/init.d/apache2 restart
10
11 # opencaps
12 echo "============================"
13 echo "==Installing OpenCaps=="
14 echo "============================"                   
15 cd /var/www/
16 sudo wget http://opencaps.atrc.utoronto.ca/releases/opencaps.tar.gz
17 sudo tar -xvzf opencaps.tar.gz
18 #sudo gzip -dc opencaps.tar.gz | tar xvzf -
19
20 cd opencaps
21 sudo cp install/config_template.php include/config.inc.php
22 sudo chmod 777 conversion_service/imported
23 sudo chmod 777 projects
24
25 # disable local access in config
26 sudo sed -i "s/\'DISABLE_LOCAL\',       \tfalse/\'DISABLE_LOCAL\',\ttrue/g" include/config.inc.php
27
28 # add matterhorn info to config
29 MY_IP=`ifconfig | grep "inet addr:" | grep -v 127.0.0.1 | awk '{print $2}' | cut -d':' -f2`
30 sudo sed -i 's/?>/\$remote_systems[0][url]="http:\/\/'${MY_IP}':8080";\n?>/' include/config.inc.php
31 sudo sed -i 's/?>/\$remote_systems[0][name]="Matterhorn";\n?>/' include/config.inc.php
32 sudo sed -i 's/?>/\$remote_systems[0][username]="";\n?>/' include/config.inc.php
33 sudo sed -i 's/?>/\$remote_systems[0][password]="";\n?>/' include/config.inc.php
34
35 echo "**** OpenCaps is installed and available at $MY_IP/opencaps"