-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathInstallationGuide.txt
83 lines (47 loc) · 2.85 KB
/
InstallationGuide.txt
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
Case Scheduler Installation Guide
r1.1 - Jason Kuster
Installing scheduler onto a server is a simple process with a few basic steps.
1. Install apache and mod_wsgi
If running Ubuntu or another Debian derivative, you should be able to type:
sudo apt-get install apache2 libapache2-mod-wsgi
Otherwise, use your distribution's package-management software or download the sources and compile them by hand.
2. Get the code.
Our code is hosted on Github, at http://github.com/cwruacm/scheduler. Simply clone our repository into a directory of your choice.
3. Configure Apache
Following Apache's naming structure, create a file in /etc/apache2/sites-available named xxx-scheduler, then create a link to it in /etc/apache2/sites-enabled. In this file, you will be configuring the site. Apache's documentation, plus any other sites in the folder will be very helpful for figuring out how to do this, and a sample is included below. Change the directory locations to whichever directory structure you have chosen. public_html can be a folder with symbolic links, where static points to scheduler/course_scheduler/static and images points to scheduler/course_scheduler/static/images
<VirtualHost *:80>
ServerName scheduler.case.edu
ServerAlias www.scheduler.case.edu
ServerAdmin [email protected]
DocumentRoot /srv/www/scheduler/public_html
ErrorLog /srv/www/scheduler/logs/error.log
CustomLog /srv/www/scheduler/logs/access.log combined
LogLevel info
WSGIScriptAlias / /srv/www/scheduler/application/wsgi.py
Alias /robots.txt /srv/www/scheduler/public_html/robots.txt
Alias /favicon.ico /srv/www/scheduler/public_html/favicon.ico
Alias /images /srv/www/scheduler/public_html/images
Alias /static /srv/www/scheduler/public_html/static
</VirtualHost>
N.B. If you choose to use /srv/www/scheduler as we did, you will need to edit /etc/apache2/apache.conf and uncomment the directory section which refers to /srv.
4. Install required Python packages
At the command line, type:
sudo apt-get install python-django python-mysqldb python-bs4
5. Install and configure Mysql
At the command line, type:
sudo apt-get install mysql-server
Choose a password for the root user on the database when prompted.
Modify settings.py with your database location, username, and password.
Log into the MySQL server by typing:
mysql -u root -p
and entering your password when prompted. Create the database we will be using by typing:
CREATE DATABASE django_scheduler;
Type exit to exit MySQL, then cd to the folder with manage.py in it and type:
python manage.py syncdb
This should create all of the tables that scheduler is expecting.
6. Populate database with class items
In the same folder, run python filldb.py
filldb.py should grab soc.xml off of Case's website, parse it, and populate the database with classes.
After these steps are done, execute:
sudo service apache2 restart
Congratulations!