Skip to content
nroam edited this page Jun 19, 2016 · 8 revisions

Welcome to the CCF wiki!

CCF can be installed on Ubuntu or RedHat/CentOS platforms either as standalone or within a docker container.

Install standalone under CentOS 7

Assuming a clean minimal web install of CentOS 7, ensure the following list of packages are installed:

wget build-essential libpq-dev python-dev git python-setuptools vim flex bison cmake python-matplotlib python-openbabel python-pip nginx libjpeg8 libjpeg62-dev unzip postgresql postgresql-devel postgresql-server postgresql-libs numpy python-devel sqlite sqlite-devel boost boost-devel scipy freetype freetype-devel openbabel python-psycopg2 gcc gcc-c++ python-pillow
  • Setup Django e.t.c.:
easy_install ipython Django==1.5.0 tornado
pip install gunicorn django-jfu djutils south django_concurrent_server
  • As root initially:
adduser -c "CCF admin" ccfadmin
mkdir /usr/local/CCF /usr/local/RDKit
chown ccfadmin.ccfadmin /usr/local/CCF /usr/local/RDKit
su - ccfadmin
git clone https://[email protected]/abradley/ccf.git /usr/local/CCF  # Change userid to yours
  • Append the following in ~ccfadmin/.bashrc:
export RDBASE=/usr/local/RDKit/rdkit
export LD_LIBRARY_PATH=$RDBASE/lib:$RDBASE/Code/JavaWrappers/gmwrapper:$LD_LIBRARY_PATH
export PYTHONPATH=$RDBASE/lib:$RDBASE:PYTHONPATH
  • Now install RDKit:
git clone https://github.com/rdkit/rdkit.git
cd /usr/local/CCF
mkdir logs
cd $RDBASE/External/INCHI-API/
bash download-inchi.sh
cd $RDBASE
mkdir build
cd build/
cmake -D RDK_BUILD_INCHI_SUPPORT=ON ..
make
make install
  • Download other bits and pieces:
cd
wget --user=bitbucketuserid --password=**** https://bitbucket.org/abradley/ccf/downloads/extra_files.zip
unzip extra_files.zip
cp isotope.js /usr/local/CCF/src/WebApp/OOMMPPAA/static/OOMMPPAA/isotope.min.js
cp run_gunicorn.bash /usr/local/CCF/run_gunicorn.bash
cp personalsettings.py /usr/local/CCF/src/WebApp/WebApp/personalsettings.py
  • Setup nginx. As root:
cp ~ccfadmin/extra_files/nginx.conf /etc/nginx/conf.d/CCF.conf
systemctl enable nginx
  • Setup postgresql. As root:
systemctl enable postgresql
postgresql-setup initdb
systemctl start postgresql
su - postgres
createdb ccf_db
  • Setup psql permissions:
psql
ALTER USER POSTGRES PASSWORD 'putyourpasswordhere';
GRANT ALL PRIVILEGES ON DATABASE ccf_db TO postgres;
  • Modify the contents of /usr/local/CCF/src/WebApp/WebApp/personalsettings.py to reflect the postgres user password.

  • Build the contents of the database:

cd /usr/local/CCF/src/WebApp
python djangorun.py syncdb
  • Fix missing static objects:
cd /usr/local/CCF/src/WebApp/data/static/WONKA
cp -r ../../../WONKA/static/WONKA/* .
cd /usr/local/CCF/src/WebApp/data/static/OOMMPPAA
cp -r ../../../OOMMPPAA/static/OOMMPPAA/* .
  • Start CCF, as root:
bash /usr/local/CCF/run_gunicorn.bash

Install standalone under Ubuntu 14.04LTS

  • Set up the environment as root
apt-get update
apt-get upgrade -y
apt-get install -y wget build-essential libpq-dev python-dev python-numpy git python-setuptools vim flex bison cmake sqlite3 libsqlite3-dev libboost-dev openbabel libboost-python-dev libboost-regex-dev python-matplotlib python-openbabel python-pip nginx libjpeg8 libjpeg62-dev libfreetype6 libfreetype6-dev unzip python-scipy
apt-get install -y python-psycopg2
apt-get install postgresql postgresql-contrib -y
easy_install ipython Django==1.5.0 tornado
pip install gunicorn django-jfu djutils south django_concurrent_server
  • Now pull the code as the user you want to run it as
# Change the userid below to reflect your bitbucket it
mkdir /usr/local/CCF && git clone https://[email protected]/abradley/ccf.git /usr/local/CCF && cd /usr/local/CCF
mkdir /usr/local/CCF/logs/
  • Install RDKit
#!bash
mkdir /usr/local/RDKit && cd /usr/local/RDKit && git clone https://github.com/rdkit/rdkit.git
  • Put the following in the user's .bashrc
export RDBASE=/usr/local/RDKit/rdkit
export LD_LIBRARY_PATH=$RDBASE/lib:$RDBASE/Code/JavaWrappers/gmwrapper:$LD_LIBRARY_PATH
export PYTHONPATH=$RDBASE/lib:$RDBASE:PYTHONPATH
  • After sourcing the .bashrc, run the following:
cd $RDBASE
cd External/INCHI-API
bash download-inchi.sh
cd $RDBASE
mkdir build
cd build
cmake -D RDK_BUILD_INCHI_SUPPORT=ON ..
make
make install
cp isotope.js /usr/local/CCF/src/WebApp/OOMMPPAA/static/OOMMPPAA/isotope.min.js
cp run_gunicorn.bash /usr/local/CCF/run_gunicorn.bash
cp personalsettings.py /usr/local/CCF/src/WebApp/WebApp/personalsettings.py
  • Note that by default, CCF runs ON 127.0.0.1:8000 -> change in nginx config files as necessary
cp nginx.conf /etc/nginx/sites-available/Cocoa
ln -s /etc/nginx/sites-available/Cocoa /etc/nginx/sites-enabled/Cocoa
rm /etc/nginx/sites-enabled/default
  • Now set up the CCF database
su - postgres <<EOF
createdb ccf_db
psql<<EOSQL
ALTER USER POSTGRES PASSWORD 'postgres';
GRANT ALL PRIVILEGES ON DATABASE ccf_db TO postgres;
EOSQL
EOF
# run syncdb to set up the database
cd src/WebApp
python djangorun.py syncdb
  • Now to run the CCF platform:
sudo bash /usr/local/CCF/run_gunicorn.bash
Clone this wiki locally