-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgccollab-setup.sh
executable file
·44 lines (34 loc) · 1.36 KB
/
gccollab-setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
# Script to setup gccollab environment on a LAMP c9 workspace
#Clone project from Github into ./gccollab
git clone -b gccollab https://github.com/tbs-sct/gccollab.git ~/workspace/gccollab
#Create data directory for gccollab
mkdir ~/workspace/gccollab_data
#Set rights on project
# Use ubuntu as owner instead of www-data
chmod 777 ~/workspace/gccollab
chmod 777 ~/workspace/gccollab/engine
chmod 700 ~/workspace/gccollab_data
sudo chown ubuntu:ubuntu ~/workspace/gccollab_data
#Don't need to link current folder in http, current workspace folder
# is the http folder
#start mysql
mysql-ctl start
#run database script
# Create database and set rights
# BD Name: gccollabdb
# username: gccollab
# password: secret
mysql -u root < "`(dirname $0)`/gccollab-setup.sql"
#Rewrite apache conf with gccollab config
sudo a2enmod rewrite
sudo sed -i.bak 's|<\/VirtualHost>| <Directory \/var\/www\/html\/gccollab>\n Options Indexes FollowSymLinks MultiViews\n AllowOverride All\n Order allow,deny\n allow from all\n <\/Directory>\n<\/VirtualHost>|' /etc/apache2/sites-available/000-default.conf
#Restart apache service
sudo service apache2 restart
#Install Mailcatcher
sudo apt-get update
sudo apt-get install -y build-essential software-properties-common
sudo apt-get install -y libsqlite3-dev ruby1.9.1-dev
sudo gem install mailcatcher
#Start mailcatcher
mailcatcher