Changes between Version 1 and Version 2 of building-foam

Show
Ignore:
Timestamp:
01/30/12 15:54:55 (7 years ago)
Author:
ibaldin (IP: 152.54.9.21)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • building-foam

    v1 v2  
    33== Building FOAM on CentOS 6.2 == 
    44 
     5FOAM is written in python, requires Python 2.6.x, NGINX (an http server) and a number of Python packages.  
     6 
     7Install initial prerequisites 
     8 
    59{{{ 
    610$ sudo yum install nginx  
    711$ sudo easy_install pip 
    8 $ sudo useradd -c "FOAM user" -M -N -g users www-data 
     12}}} 
     13 
     14Download the source code and build (you have to use Mercurial client - downloading a zip file from github will not set the version properly, so getVersion will return garbage): 
     15{{{ 
     16$ hg clone https://bitbucket.org/onlab/foam 
    917$ cd onlab-foam-xxxx 
    1018$ sudo python install.py  
     19}}} 
    1120 
    12 # 
    13 # if dependency tracking by pip fails as part of FOAM install, can be installed manually: 
    14 # 
     21If dependency tracking by pip fails as part of FOAM install, can be installed manually: 
     22{{{ 
    1523$ sudo easy_install "Flask==0.7.2" 
    1624$ sudo easy_install "SQLAlchemy==0.7.4" 
     
    2331#Flup can be installed by easy_install via egg 
    2432 
    25 # 
    26 # continuing after foam install (note: Installs under /opt/foam) 
    27 # 
     33}}} 
    2834 
    29 # FOAM install fails to install M2Crypto, could not get it from EPEL 
    30 # and easy_install fails due to differences in openssl-devel configuration 
    31 # so get the source, untar and run ./fedora_setup.py install from within  
    32 # the tar file: 
     35Continuing after foam install (note: installs under /opt/foam). 
     36 
     37FOAM 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: 
     38{{{ 
    3339$ chmod +x fedora_setup.py 
    3440$ ./fedora_setup.py install 
     41}}} 
    3542 
    36 # change the permissions on the /opt/foam/// 
    37 # note that FOAM uses www-data user under Debian (which is what nginx runs under) 
    38 # however on CentOS nginx runs under user nginx 
     43Change 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: 
     44{{{ 
    3945$ sudo chown -R nginx /opt/foam 
     46}}} 
    4047 
    41 # configure foam 
     48Configure foam (Note that foamctl is installed under /usr/bin) 
     49{{{ 
    4250$sudo -u nginx foamctl init-db 
    43 # Note that foamctl is installed under /usr/bin 
     51$ sudo foamctl set-password 
     52}}} 
    4453 
    45 # sets the admin httppassword for foam 
    46 $ sudo foamctl set-password 
     54[http://www.akadia.com/services/ssh_test_certificate.html Create a self-signed cert] for foam and configure /etc/nginx/sites-available/foam.conf (the default install.py fails to do that). Note that nginx under CentOS does not use sites-available/, instead using conf.d: 
     55{{{ 
     56$ sudo vi /etc/nginx/sites-available/foam.conf 
     57$ cd /etc/nginx/conf 
     58$ sudo ln -s ../sites-available/foam.conf 
     59}}} 
    4760 
    48 # create a self-signed cert for foam and configure /etc/nginx/sites-available/foam.conf 
    49 # the default install.py fails to do that 
    50  
    51 $ cd /etc/nginx/conf 
    52 $ ln -s ../sites-available/foam.conf 
    53  
    54 # download and bundle certs 
     61Download and bundle certs 
     62{{{ 
    5563$ 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 
    5664$ sudo foamctl bundle-certs 
     65}}} 
    5766 
    58 # start NGINX 
     67Start NGINX 
     68{{{ 
    5969$ /etc/init.d/nginx restart 
     70}}} 
    6071 
    61 # 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) 
     72Start 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). The CentOS foam start script is attached to this page. 
     73{{{ 
    6274$ /etc/init.d/foam start 
     75}}} 
    6376 
    64 # standard /etc/init.d/foam is written for Ubuntu/Debian and does not work on CentOS 
    65  
    66 }}}