New Hilary Installation Guide - GatechVIP/Hilary GitHub Wiki
This page will contain information on what it takes to get a Hilary installation working.
Clone Hilary
git clone git://github.com/sakaiproject/Hilary.git
Install node.js
Download here
Unzip, and cd into it.
./configure
Compiling node.js need g++ installed. Check if your operation system has g++ installed:
g++ --version
If not, install g++ by:
sudo apt-get install g++
Continue Install node.js
make
sudo make install
Install Cassandra
Download here
Unzip it. Cassandra doesn't need to compile or install.
Before running cassandra, check your java version by
java -version
Cassandra needs Java Runtime Environment(version >= 1.6). There are two options:
-
Openjdk Cassandra has a problem with openjdk 1.6, it throws out a segment fault when run “bin/cassandra -f”. There’s a way to get around this: Open conf/cassandra-env.sh, find the line looks like :
JVM_OPTS="$JVM_OPTS -Xss180k"
replace 180 with 256. The cassandra should work now.
- Openjdk 1.7 works out of box with cassandra.
- Oracle Java Oracle java works out of box. Follow these steps to install: Java Installation - Ubuntu Community
Install Redis
Download here Unzip, cd into it
make
That's it
Elasticsearch
Download here Unzip, cd into it
sudo mkdir -p /var/log/cassandra
sudo chown -R `whoami` /var/log/cassandra
sudo mkdir -p /var/lib/cassandra
sudo chown -R `whoami` /var/lib/cassandra
Install Nginx
Since the version of nginx in Ubuntu's default repo is out of date, install nginx by the following commands:
sudo add-apt-repository ppa:nginx/stable
sudo apt-get update
sudo apt-get install nginx
Install RabbitMQ
Download here Install it
sudo dpkg -i <rabbitmq-filename>.deb
Install GraphicsMagick
sudo apt-get install graphicsmagick
Instead of clone the official 3akai-ux repo, checking the stuart's repo
git clone git://github.com/stuartf/3akai-ux.git
cd 3akai-ux
git remote add stuartf git://github.com/stuartf/3akai-ux.git
git fetch stuartf
git checkout -b hilary-grunt stuartf/hilary-grunt
By now, 3akai-ux has to be "Hilary" branch
git checkout -b Hilary stuartf/Hilary
Create file named nginx.json in 3akai-ux folder. The content is
{
"NGINX_USER":"www-data",
"NGINX_GROUP":"www-data",
"UX_HOME":" <path-to-the-3akai-ux-dir> ",
"LOCAL_FILE_STORAGE_DIRECTORY":"/tmp"
}
replace path-to-the-3akai-ux-dir to the actual path of 3akai-ui directory
Install grunt
install dependencies both under 3akai-ux and Hilary directory
cd Hilary
npm install -d
cd 3akai-ux
npm install -d
sudo npm install -g grunt-cli
Locate and Configure nginx.conf in 3akai-ux directory
make sure your current directory is 3akai-ux
grunt configNginx
This command will return a path to the nginx.conf, such as ./target/optimized/nginx.conf
change the following line of nginx.conf
server{
server_name oae.mine.com
}
replace oae.mine.com as you want, as long as it matchs the hostname in the /etc/hosts. We will edit /etc/hosts a little later
few more changes need to make
error-log /var/log/nginx/error.log;
pid /run/nginx.pid;
http{
include /etc/nginx/mime.types;
}
Copy the file we just edited to /etc/nginx/nginx.conf.
For security reason, backup the default nginx.conf shipped with nginx.
sudo cp /etc/nginx/nginx.conf /etc/nginx/nginx.conf.backup
sudo cp path-to-nginx.conf-just-edited /etc/nginx/nginx.conf
Restart nginx
sudo service nginx restart
Changes of /etc/hosts
add the following line into hosts
127.0.1.1 oae.mine.com t.oae.mine.com
oae.mine.com matches what we defined in nginx.conf. replaces it as you want as long as they match.
t.oae.mine.com is a tenant. Whenever you create a tenant, you need to add the url of that tenant in /etc/hosts
It's time to run everything
- Cassandra:
bin/cassandra -f
- Redis:
src/redis-server
- Elasticsearch:
bin/elasticsearch
- RabbitMQ:
rabbitmq-server -detached
- Hilary:
node app.js | node_modules/.bin/bunyan