Ajenti V is open source Control Panel with good and simple interface with Nginx stack inside. Include PHP-Fpm, Mail Server, FTP Server, and many other features. Ajenti is alternative option to manage server.
This tutorial shows how to install and configure Ajenti V server for production purpose: ready to host many webs with high availability (load balancing).
Digital Ocean cloud VPS for Server 1 with Ex IP: 192.168.1.100
Vultr with Ex. IP 192.168.1.101.
Debian 7 (Wheezy) with Ajenti V
Varnish in third server with Centos 6 (only with RAM 512MB, because only for distributing connection).
Note: here I am using two cloud providers for load balancing: DO and Vultr. In DO now available load balancing feature with floating IP. We can setup load balancing with floating IP but only in same datacenter, could not handle different locations.
Setup Ajenti and Ajenti V
Server 1 & Server 2
First, we need to install some requirement apps:
apt-get install nano unzip aptitude -y
wget http://repo.ajenti.org/debian/key -O- | apt-key add - echo "deb http://repo.ajenti.org/debian main main debian" >> /etc/apt/sources.list apt-get update && apt-get install ajenti service ajenti restart
Access the Ajenti Panel: http://ip-address:8000 (with username root and password admin). Dont forget to change it.
Install Ajenti V:
apt-get install ajenti-v ajenti-v-nginx ajenti-v-mysql ajenti-v-php-fpm php5-mysql ajenti-v-mail ajenti-v-ftp-pureftpd service ajenti restart
Update Nginx default Debian Wheezy from 1.2 to 1.6:
echo "deb http://ftp.de.debian.org/debian/ wheezy-backports main contrib non-free" >> /etc/apt/sources.list aptitude update aptitude -t wheezy-backports install nginx
Install Memcached, APC & Imagick
apt-get install memcached php5-cli php5-memcache php5-memcached php-apc php5-imagick service php5-fpm restart service memcached restart service ajenti restart
Check memcached plugin in Ajenti is working:
Install CSF Firewall:
mkdir /home/tmp cd /home/tmp/ wget http://www.configserver.com/free/csf.tgz tar zxvf csf.tgz cd csf ./install.sh
Configure CSF in Ajenti:
From CSF Plugin, please uncheck testing mode for security.
If you use Cloudflare, you have to insert Cloudflare IP Whitelist to CSF table. Edit /etc/csf/csf.allow and /etc/csf/csf.ignore and paste the IP White list (you can copy Cloudflare IP White list in this address)
Edit php.ini in /etc/php5/fpm and change memory limit, max execution time, max input time, post max size and upload max filesize to fit to your need.
Configuring Mail Server and Rainloop
Follow this tutorial for further mail server configuration in Ajenti V panel.