installation_notes_linux.txt 3.68 KB
Newer Older
Mathieu Courcelles's avatar
Mathieu Courcelles committed
1

2
CLMSVault v1.0 - Installation instruction
Mathieu Courcelles's avatar
Mathieu Courcelles committed
3 4 5 6 7 8 9 10 11 12
---------------------------------------------


Standalone on Ubuntu Linux instruction:
---------------------------------------------

Notes:
-You will need administrator rights on your computer to install Python and its libraries.


13
1. Extract CLMSVault_v1.zip archive to /home/user/CLMSVault
Mathieu Courcelles's avatar
Mathieu Courcelles committed
14 15 16 17 18

2. Download and install Python 2.7 and Pip (Do not use Python 3, this code is not compatible!!)
-Python should be already installed. If not type the following command to install it:
sudo apt-get install python
sudo apt-get install python-pip
19
sudo apt-get install python-numpy python-scipy python-matplotlib ipython ipython-notebook python-pandas python-sympy python-nose
Mathieu Courcelles's avatar
Mathieu Courcelles committed
20 21

3. Navigate to the CLMSVault directory by typing:
22
cd /home/user/CLMSVault
Mathieu Courcelles's avatar
Mathieu Courcelles committed
23 24 25 26 27 28 29 30 31 32
	
4. Install the remaining Python libraries by typing:
pip install -r requirements/production.txt

5. Add environment variables
nano ~/.profile

-Add the following to your profile file:

export DJANGO_SETTINGS_MODULE="CLMSVault.settings.local"
33
export SECRET_KEY="cur%pf+1k5=mf2d=jaurhr(djv&ve&&y%4px=pouav)0ytn@7-"
Mathieu Courcelles's avatar
Mathieu Courcelles committed
34 35 36 37 38 39

-You can generate a new secret_key here: http://www.miniwebtool.com/django-secret-key-generator/

6. Make the application script excutable:
chmod +x CLMSVault_linux.sh

40 41 42
7. Edit settings files
./CLMSVault/settings/local.py (ADMINS, TIME_ZONE)

Mathieu Courcelles's avatar
Mathieu Courcelles committed
43 44 45 46 47
8. Start the application web server from the console:
./CLMSVault_win.sh

9. Use your web browser to access CLMSVault at:  http://localhost:8000

48 49
Login with the following administrator user:
user name: clmsvault
50
password: clms123
51 52 53

To add new users, go to the administration section and add user. 
New users should have "staff" status activated and be in the "ms_expert" group.  
Mathieu Courcelles's avatar
Mathieu Courcelles committed
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68


Server on Ubuntu Linux instruction:
---------------------------------------------


Follow the standalone installation instruction with the following modifications:

-Install Apache & MySQL servers
-Add the following configuration to your Apache config file.

<VirtualHost *:80>
        ServerAdmin webmaster@localhost
        ServerName clmsvault.yourhost.com

69 70
        Alias /media/ /home/user/CLMSVault/site_media/
        Alias /static/ /home/user/CLMSVault/static/
Mathieu Courcelles's avatar
Mathieu Courcelles committed
71
        ## configuration for Django:
72
        DocumentRoot /home/user/CLMSVault
73
        
74
        WSGIScriptAlias / /home/user/CLMSVault/apache/django.wsgi
75 76 77 78
        WSGIApplicationGroup %{GLOBAL}
        WSGIDaemonProcess clmsvault.yourhost.com python-path=/home/user/CLMSVault:/usr/local/lib/python2.7/site-packages
        WSGIProcessGroup clmsvault.yourhost.com
        
79
        <Directory /home/user/CLMSVault>
Mathieu Courcelles's avatar
Mathieu Courcelles committed
80 81 82 83 84 85 86 87 88
               Order deny,allow
               Allow from all
        </Directory>
</VirtualHost>

-Add SECRET_KEY variable to /etc/apache2/envvars
export SECRET_KEY='***************************************'

-Prepare MYSQL database
89 90 91
	CREATE DATABASE CLMSVault;
	GRANT USAGE ON *.* TO clmsvault IDENTIFIED BY "password";
	GRANT ALL PRIVILEGES ON CLMSVault.* TO clmsvault;
Mathieu Courcelles's avatar
Mathieu Courcelles committed
92 93

-Edit CLMSVault_app/settings/production.py config file with your database host, user and password.
94 95
  -Also edit ADMINS, TIME_ZONE, EMAIL_* variables

96 97
-Edit apache/django.wsgi (sys.path)

98 99 100 101 102 103 104 105
-Execute the following commands to export and import fixture into database
	cd /home/user/CLMSVault
	export DJANGO_SETTINGS_MODULE='CLMSVault.settings.local'
	export SECRET_KEY='xysue^!p+a*082#c4t4#k%new0jm&j8=!$ir25)q#4y78joh7-'
	python manage.py dumpdata > datadump.json
	export DJANGO_SETTINGS_MODULE='CLMSVault.settings.production'
	python manage.py syncdb
	python manage.py loaddata datadump.json
Mathieu Courcelles's avatar
Mathieu Courcelles committed
106

107 108
-Check that the apache user can write recursively to /home/user/CLMSVault/site_media

Mathieu Courcelles's avatar
Mathieu Courcelles committed
109 110 111
-Restart Apache and MySQL servers

-Use your web browser to access CLMSVault at:  http://clmsvault.yourhost.com