Part 1 - Dependencies

This tutorial will assume you are starting with a barebone Debian 7.0 64-bit box.

Pre Steps

Let's just update the system and grab zip + curl.

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install zip
sudo apt-get install curl
sudo apt-get install mcrypt php5-mcrypt

Then uncompress the taskfort.tar.gz:

mkdir /opt/workspace
mkdir /opt/workspace/taskfort
cd /opt/workspace/taskfort
tar zxvf [location_of_taskfort.tar.gz]

1. Install Nginx

Execute these commands in the terminal:

sudo apt-get install nginx
sudo /etc/init.d/nginx start

Check version of Nginx:

nginx -v

If the version is less than 1.3, you will need to upgrade nginx :

echo "deb wheezy-backports main contrib non-free" >> /etc/apt/sources.list

sudo aptitude update
sudo aptitude -t wheezy-backports install nginx

Test to see if nginx was installed navigate to http://your_server_ip

You should see a "Welcome to nginx" screen

2. Install MySQL Server

sudo apt-get install mysql-server

Enter your database credentials.

Your server will auto-start.

3. Install PHP

sudo apt-get install php5-fpm php5-mysql php5-curl php5-cli php5-gd php5-dev

Modify /etc/php5/fpm/php.ini and set cgi.fix_pathinfo value from 1 to 0:


Modify /etc/php5/fpm/pool.d/www.conf and set listen = to /var/run/php5-fpm.sock:

listen = /var/run/php5-fpm.sock

Then restart php5-fpm:

sudo service php5-fpm restart

4. Install Redis

We have only tested with redis 2.8.9. If newer versions work, let us know!

sudo apt-get install make
sudo apt-get install build-essential
sudo apt-get install tcl8.5

tar xvzf redis-2.8.9.tar.gz
cd redis-2.8.9
sudo make install
cd utils
sudo ./

Press enter for all the default values.

5. Install PHP-Redis

cd ~

cd phpredis-master

make && make install

If PHP 5.3 / 5.4 is installed execute:

touch /etc/php5/conf.d/redis.ini
echo > /etc/php5/conf.d/redis.ini

Otherwise if you are running PHP 5.5+ run:

touch /etc/php5/conf.d/redis.ini
touch /etc/php5/mods-available/redis.ini
echo > /etc/php5/mods-available/redis.ini
ln -s /etc/php5/mods-available/redis.ini /etc/php5/cli/conf.d

Restart php-fpm:

sudo /etc/init.d/php-fpm restart

6. Install NodeJS

As user root run:

curl -sL | bash -
apt-get install -y build-essential
apt-get install -y nodejs

7. Install Forever

This will ensure our nodejs application will continue to run even if it crashes.

sudo npm install forever --global