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 http://ftp.de.debian.org/debian/ 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:
cgi.fix_pathinfo=0
Modify /etc/php5/fpm/pool.d/www.conf and set listen = 127.0.0.1:9000 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
wget http://download.redis.io/releases/redis-2.8.9.tar.gz
tar xvzf redis-2.8.9.tar.gz
cd redis-2.8.9
make
sudo make install
cd utils
sudo ./install_server.sh
Press enter for all the default values.
5. Install PHP-Redis
cd ~
wget https://github.com/nicolasff/phpredis/archive/master.zip
unzip master.zip
cd phpredis-master
phpize
./configure
make && make install
If PHP 5.3 / 5.4 is installed execute:
touch /etc/php5/conf.d/redis.ini
echo extension=redis.so > /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 extension=redis.so > /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 https://deb.nodesource.com/setup | 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
References
2] http://anton.logvinenko.name/en/blog/how-to-install-redis-and-redis-php-client.html
3] http://serverfault.com/questions/597756/how-to-upgrade-nginx-from-1-2-to-1-6-on-debian-7
4] https://github.com/joyent/node/wiki/installing-node.js-via-package-manager
Updated less than a minute ago