Installation on Local Machine
Published: Thursday, December 12th, 2013 by Chris Zieba
The following installation will get you up and running on your local machine.
You need to have node v>=0.8.8 installed on your system, along with mongoDB and Apache FOP. You must also have a Java compiler on your machine to build the output files.
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install graphviz pdftk
The version of NodeJS available in the Official Ubuntu Package Repository does not meet the minimum version required to run all the features of LogicPull, so it is built from source. More information on how to install nodejs.
tar -zxf node-v0.8.8.tar.gz
./configure && make && sudo make install
Install Apache FOP
Apache Fop does not have package in the Ubuntu Repo, so its binary is downloaded directly. More information on how to install Apache FOP.
unzip fop-1.1-bin.zip -d /opt/
Make sure that Apache FOP has the correct permissions to execute.
sudo chmod a+x /opt/fop-1.1/fop
The source code for LogicPull is located on github. You can install LogicPull in any directory you want, but for the purpose of this guide, we will install it in
Download the source using github. You can also download the zip file directly.
git clone https://github.com/ChrisZieba/LogicPull.git
Create the needed directories.
Make sure the directories have the correct permissions.
sudo chmod -R 755 public/
The mongo database needs to be initialized. This will add an admin user, and set up all the tables in the LogicPull database.
mongo LogicPull /srv/www/LogicPull/bin/db/init.js
To avoid any conflict when pulling updates, make sure git does not track files that are likely to be modified.
cd /srv/www/LogicPull git update-index --assume-unchanged public/robots.txt git update-index --assume-unchanged public/sitemap.xml git update-index --assume-unchanged config.js git update-index --assume-unchanged Gruntfile.js cd node_modules/ git update-index --assume-unchanged $(git ls-files | tr '\n' ' ')
Rebuild the modules if you are on 32 bit system.
rm -rf node_modules/
LogicPull comes with a configuration file located in
config.js. Each line is commented to provide a description of its purpose. Make sure you set the correct settings based on the environment you plan to run in. The following settings must be set to run LogicPull:.
server_portThis is the port nodeJS runs on. For this installation, 3000 was used, so change accordingly if you used a different port in nginx and varnish.
base_locationThe home folder for the application.
base_urlThe URL that will be used by the application.
base_vhostUsed as the cookie domain.
mongo_dbThe database name.
mongo_hostThe default is set to localhost.
mongo_portThe port mongodb runs on.
fop_locationThe folder location of the Apache FOP binary.
Now we can start LogicPull with the following command.
NODE_ENV=development node LogicPull.js