/
INSTALL
147 lines (111 loc) · 5.9 KB
/
INSTALL
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
Instructions for Installing Andes
This file contains instructions for installing the Andes help server.
The help server itself is a lisp program that stores log data in an
sql database, and uses a c++ math library called "the solver."
A front-end web server forwards student help messages
to the Andes help server and serves other static content.
See Documentation/server.html for more information.
This installation uses sbcl for lisp, Apache for the web server, mysql for
the database, and g++ for the solver. It has been tested on Linux (RedHat
Enterprise 5.4, CentOS 5.4) and OS X (10.4 and 10.6).
========================== System Configuration ===============================
# The following packages need to be installed:
# gnu make, git, subversion, gnu c++, mysql-server, and wget.
# For RedHat systems, http://fedoraproject.org/wiki/EPEL may be helpful.
# In Linux, test packages using:
rpm -q make git subversion gcc-c++ mysql-server wget
# The Andes help server should be run in an ordinary user account.
# If needed, set up a user account for the Andes server. The rest of
# the install will occur in that user account.
# For convenience, you can add the user to /etc/sudoers
============================ Get the Andes code ===============================
# If you wish to contribute code to the Andes project, do the following:
# Set up an account for yourself at github, providing your public ssh key;
# see "Generating SSH keys" at http://help.github.com/
# Send your git user name to help@andestutor.org so that you can be
# added as a collaborator to the Andes project.
# To install the Andes repository in directory "andes" use:
git clone git@github.com:bvds/andes.git andes
# Alternatively, if you would just like to use the Andes code:
git clone git://github.com/bvds/andes.git andes
# The rest of the install will take place in the Andes directory.
cd andes # switch to the Andes root directory
# Switch to the stable branch of Andes; the "master"
# branch is for development. In the Andes root directory:
git checkout --track -b stable origin/stable
# For the system to work, a library of problem definitions
# must be included. The original Andes problem definitions
# are under copyright and not publicly available. For access,
# send your ssh public key to help@andestutor.org
# (See "Generating SSH keys" at http://help.github.com/)
# The git command to download this library is:
git clone ssh://git@andestutor.org/home/git/Andes-problems.git/ problems
# Likewise, download the solutions repository:
git clone ssh://git@andestutor.org/home/git/Andes-solutions.git/ solutions
# Compile the solver library and executable:
make install-solver
================================== SBCL =======================================
# The sbcl website is http://sbcl.sourceforge.net/.
# A list of all releases can be found at:
# http://sourceforge.net/projects/sbcl/files/
# In order to enable thread support and tune the garbage collection
# algorithm, we compile a custom version of sbcl. First, we download
# a binary release and then use that to compile the sbcl source code.
cd lisp-site-install
make get-binary # download a binary release
make get-source # download and compile source
make source-install # install in /usr/local (do as superuser)
cd ../ # return to Andes root directory
make sbclrc # Install the sbcl initialization file.
# Install site-wide sbcl libraries. This should be executed
# with superuser privileges by the user who will be running Andes.
make install-site-libraries
================================== MySql ======================================
# To save session data, we use MySql.
# First, mysql server must be started.
# As superuser:
/sbin/chkconfig mysqld on
/sbin/service mysqld start
# Then set the root password (you can choose your own) and restart:
/usr/bin/mysqladmin -u root password 'sin(0)=0'
/sbin/service mysqld restart
# (In OS X, go to http://dev.mysql.com, install mysql and MySQLStartupItem,
# add /usr/local/mysql/bin to PATH in ~/.profile,
# execute "(cd /usr/local/lib;sudo ln -s ../mysql/lib/lib*.{a,dylib} .)"
# execute "sudo /Library/StartupItems/MySQLCOM/MySQLCOM start", and
# set the root mysql password using the above command.)
# Set up tables in database:
make install-database
=========================== Apache Web Server =================================
# Configure Apache as a reverse proxy server, with json-rpc
# error messages and add links to DocumentRoot.
# Run with superuser privileges:
make configure-httpd
# Start up Apache. In linux, as superuser:
/sbin/chkconfig httpd on
/sbin/service httpd start
# (OS X, do this from "System Preferences")
# If SELinux is running, I suggest you turn it off. Otherwise, in RedHat:
sudo system-config-securitylevel # select Customize; select WWW (HTTP)
sudo chcon -R -t httpd_sys_content_t . # httpd read permission for Andes files
sudo setsebool -P httpd_can_network_relay=1 # port forwarding to help server
# To test the web server, point a web browser to
# http://<hostname>/web-UI/login.html
=============================== Javascript ===================================
# Make and build the javascript. First we need to get
# the Dojo library, then we need to make an Andes-specific
# build. The master branch uses the development version
# while the stable branch uses (mostly) the latest release.
make install-dojo
========================== Test the Help Server ===============================
;; To test the Help Server type "sbcl" to start up lisp, then:
(rhelp)
(start-help :password "sin(0)=0") ;specify mysql password
;; Point a web browser to
;; http://<hostname>/web-UI/login.html
;; Try to log in and solve a problem.
(stop-help) ;Stop the lisp server:
(quit) ;Exit lisp
;; See Documentation/server.html for further information
;; on running the help server.
===============================================================================