Few weeks ago, I entered the world of server administration when I’ve ordered my VPS at OVH. Since I already have skills in Unix systems, the load of work to administrate a server was by far, less than I’ve expected. Actually, it is pretty easy : install, configure and secure your Apache/MySQL/PHP stack, secure your ssh root (not allowing the root login in /etc/ssh/sshd_config, learning the pros and cons of changing the ssh port…), setup your firewalls.
Now that I know the basis in server administration via CLI (and spent a lot of fun time tweaking instead of working on projects !), I need a back-office panel to manage my server.
I really don’t know much about those interfaces only some few names, mostly commercial tools : cPanel, Plesk… Then I started looking for an open-source alternative. Some says that even well-known panels are known for their security issues (fr), which sounds scary, and some other tools are not longer supported.
Blogger Yusuf Arslan already did an interesting comparative, although I really don’t agree his assertion “I admit that it’s maybe superficial. But the outdated interface design often reflects the archaic legacy code base behind it.“… even if it seems tempting to think like that (CLI tools are powerful despite its… interface).
Among the numerous candidates, I’ll give Ajenti and Webmin a try because both seems to be well supported, the plugin architecture, Webmin is an “old guard of open source control panels” and Ajenti might become better and better (and because Python !).
Webmin is full of features for a core server administration, Ajenti seems to be the best choice for a VPS, with the most common features. I’ll try Ajenti first !
The install on an Ubuntu or Debian server is very simple : Download and run the installation script, and allow the 8000 port in your firewall (if any).
wget -O- https://raw.github.com/ajenti/ajenti/1.x/scripts/install-ubuntu.sh | sudo sh
ufw allow 8000
Then access it via https://(yourserver):8000 (don’t forget the https).
Default login : root ; password: admin. Obviously, change them ASAP.
If you have an issue connecting via 8000, check if Apache take up the port :
sudo netstat -tlnp | grep 8000
If so, you can either reconfigure Apache (ports.conf) to use different port or change Ajenti port in /etc/ajenti/config.json (source).
For security reasons, change the Ajenti port anyway, and restart the service
sudo service ajenti restart
Installing Ajenti V (Web Hosting Add-On)
Ajenti V is the plug-in that add the web hosting capabilities.
apt-get install ajenti-v ajenti-v-nginx ajenti-v-mysql ajenti-v-php-fpm php5-mysql
It installs Nginx, so do not forget to stop the Apache 2 services :
service apache2 stop
If you let Apache2 installed and running, you will have an error error-code(1) issue :
E: Sub-process /usr/bin/dpkg returned an error code (1)
Then, restart Ajenti :
service ajenti restart
Yay, it is working !
Next, we’ll see how to setup a website through Ajenti V.