Version 1 (modified by ibaldin, 7 years ago)

--

Building FOAM

Building FOAM on CentOS 6.2

$ sudo yum install nginx 
$ sudo easy_install pip
$ sudo useradd -c "FOAM user" -M -N -g users www-data
$ cd onlab-foam-xxxx
$ sudo python install.py 

#
# if dependency tracking by pip fails as part of FOAM install, can be installed manually:
#
$ sudo easy_install "Flask==0.7.2"
$ sudo easy_install "SQLAlchemy==0.7.4"
$ sudo easy_install Flask-XML-RPC
$ sudo easy_install "Blinker==1.1"
$ sudo easu_install lxml
#ElementTree 1.2.7 has to be installed from source
#unzip, then sudo python setup.py install
#
#Flup can be installed by easy_install via egg

#
# continuing after foam install (note: Installs under /opt/foam)
#

# FOAM install fails to install M2Crypto, could not get it from EPEL
# and easy_install fails due to differences in openssl-devel configuration
# so get the source, untar and run ./fedora_setup.py install from within 
# the tar file:
$ chmod +x fedora_setup.py
$ ./fedora_setup.py install

# change the permissions on the /opt/foam///
# note that FOAM uses www-data user under Debian (which is what nginx runs under)
# however on CentOS nginx runs under user nginx
$ sudo chown -R nginx /opt/foam

# configure foam
$sudo -u nginx foamctl init-db
# Note that foamctl is installed under /usr/bin

# sets the admin httppassword for foam
$ sudo foamctl set-password

# create a self-signed cert for foam and configure /etc/nginx/sites-available/foam.conf
# the default install.py fails to do that

$ cd /etc/nginx/conf
$ ln -s ../sites-available/foam.conf

# download and bundle certs
$ sudo wget http://www.pgeni.gpolab.bbn.com/ca-cert/pgeni.gpolab.bbn.com.pem -O /opt/foam/etc/gcf-ca-certs/pgeni.gpolab.bbn.com.pem
$ sudo foamctl bundle-certs

# start NGINX
$ /etc/init.d/nginx restart

# start FOAM (needs a custom start script because CentOS does not have start-stop-daemon which can put foam in the background; default centos daemon() function does not have the background option)
$ /etc/init.d/foam start

# standard /etc/init.d/foam is written for Ubuntu/Debian and does not work on CentOS

Attachments