Skip to content

Installation notes on Centos

Christophe Lejeune edited this page Mar 20, 2015 · 5 revisions

Here are the steps I crossed to install AAAforREST on Centos 6.6. This page is provided to help users involved in a similar situation.

I followed the README. Some adjustments were needed.

yum install nodejs
yum install npm
npm install forever -g
git clone https://github.com/Hypertopic/AAAforREST.git
cd AAAforREST
mkdir log
cp config.sample.js config.js

Some difficulties with the JavaScript version of the config file incites me to convert it to JSON

mv config.js config.json

A few conversions were required to switch from provided JavaScript sample to working JSON config file :

  • Delete comments
  • Delete first line module.exports = in order for the file to start with a bracket
  • Frame elements with quotes
  • Delete function calls like function(context) {

At this stage, AAAforREST is ready starts. Before entering production, the configuration of the proxied service should be slightly adapted. In my case, this service is provided by Apache.

By default, my Centos server uses SELinux, that confines Apache and forbids to listen to unconventional ports. However, for AAAforREST to listen to 80 port, I need Apache to listen to a different one (for instance 2345). Required to configure SELinux, semanage is not provided by Centos. I thus installed it.

yum -y install policycoreutils-python
semanage port -a -t http_port_t -p tcp 2345

I then modified Apache config file in order for it to listen to 2345 port instead of 80 (including in the VirtualHosts sections).

nano /etc/httpd/conf/httpd.conf 
service httpd restart

After minor tests (sudo is required for port 80), AAAforREST was started as a daemon.

sudo node proxy.js
sudo forever start proxy.js

Apache and AAAforREST now work together seamlessly.

Clone this wiki locally