How to Install Ajenti Control Panel in RHEL / CentOS / Debian / Ubuntu

August 4, 2015 | By
| 1 Reply More

In this article, we'll learn about installing Ajenti Control Panel in different popular linux distributions like RHEL, CentOS, Debian and Ubuntu. Ajenti is a free and open source simple and easy-to-use web based control panel for linux based servers. It looks pretty similar to Webmin, but is focused and popular for its simplicity and performance. It is a lightweight but very powerful tool to manage the linux servers mostly the VPSs and dedicated servers. Ajenti's web interface is awesome and is catchy to eye, its graphical user interface is responsive and offers most of the actions required to configure and keep our server updated. It is pretty easy to install, configure, customize and install new plugins with its beautiful candy web interface.

Here are some easy steps on how we can completely install and configure Ajenti Control Panel in our linux operating systems.

1. Adding Ajenti Repository

First of all, before we proceed towards the installation of Ajenti Control Panel in our linux machine, we'll gonna go for adding the repository in it. This method differs in different distributions of Linux whereas the process in their respective derivatives may be similar. So, here are some fast and easy ways to add Ajenti repository in our respective linux distributions.

On Ubuntu 12.04/14.04/15.04

In the machine running Ubuntu, we'll first need to add the repository key of Ajenti packages for Ubuntu hosted by Ajent Project under http://repo.ajenti.org/ng/ . To do so, we'll need to run the following command in a terminal.

$ wget http://repo.ajenti.org/debian/key -O- | sudo apt-key add -

--2015-07-16 12:22:44-- http://repo.ajenti.org/debian/key
Resolving repo.ajenti.org (repo.ajenti.org)... [sudo] password for arun: 198.232.124.224
Connecting to repo.ajenti.org (repo.ajenti.org)|198.232.124.224|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1716 (1.7K) [application/octet-stream]
Saving to: ‘STDOUT’
- 100%[========================>] 1.68K --.-KB/s in 0s
2015-07-16 12:22:45 (160 MB/s) - written to stdout [1716/1716]
[sudo] password for arun:
OK

After adding the repository key, we'll now need to add the repository in our sources.list inorder to enable the repository.

$ echo "deb http://repo.ajenti.org/ng/debian main main ubuntu" | sudo tee -a /etc/apt/sources.list

deb http://repo.ajenti.org/ng/debian main main ubuntu

After that is done, we'll update our local repository index so that apt-get can retrieve information about the required packages.

$ sudo apt-get update

On Debian 6/7/8

If our machine is running Debian release of linux distribution, the process is pretty similar to Ubuntu as done above. As the repository for Debian is also available on Ajenti's server ie http://repo.ajenti.org/ng/ , we'll gonna add the repository key of the repository for Debian. To do so, we'll run the following command.

$ wget -qO - http://repo.ajenti.org/debian/key | sudo apt-key add -

OK

Then, we'll gonna add the repository of Ajenti for Debian in sources.list to enable the repository.

$ echo "deb http://repo.ajenti.org/ng/debian main main debian" | sudo tee -a /etc/apt/sources.list

deb http://repo.ajenti.org/ng/debian main main debian

Next, we'll update our local repository index so that we can easily install ajenti via apt-get command.

$ sudo apt-get update

On CentOS/RHEL

In CentOS and RHEL, we'll need to add and enable EPEL repository for the installation of packages required by Ajenti. If we are runnning CentOS or RHEL 6.x, we'll need to run the following command.

$ sudo rpm -ivh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

Retrieving http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
warning: /var/tmp/rpm-tmp.gpERE2: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:epel-release-6-8 ################################# [100%]

But if we are running CentOS or RHEL 7.x in our machine, then we'll need to run the following command to enable EPEL repository out of the box.

$ sudo rpm -ivh http://download.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm || true

Retrieving http://download.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
warning: /var/tmp/rpm-tmp.Prm6Yt: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:epel-release-7-5 ################################# [100%]

After we have added and enabled EPEL repository in our CentOS or RHEL, we'll add the repository of Ajenti package to our machine. To do so, we'll need to run the following command.

$ sudo rpm -ivh http://repo.ajenti.org/ajenti-repo-1.0-1.noarch.rpm

Retrieving http://repo.ajenti.org/ajenti-repo-1.0-1.noarch.rpm
Preparing... ################################# [100%]
Updating / installing...
1:ajenti-repo-1.0-1 ################################# [100%

2. Installing Ajenti Control Panel

Next, we'll proceed towards the installation of Ajenti in our linux machine. As we have added the repository of Ajenti in our respective distribution of linux, we'll now use our default package manager present in the distributions.

On Ubuntu/Debian

After updating our local repository index, we'll now finally install Ajenti by running the following apt-get command as apt is the default package manager in Ubuntu and Debian.

$ sudo apt-get install ajenti

ajenti server installation ubuntu

On CentOS/RHEL

After adding the repository, we'll gonna finally install Ajenti in our CentOS or RHEL machine. As yum is the default package manager available in CentOS and RHEL, we'll gonna use yum command to install it.

$ sudo yum install ajenti

Ajenti Centos Rhel Package Installation

3. Starting Ajenti

Now, we'll gonna start the ajenti daemon as its installed successfully. To do so, we'll gonna run the following command.

On SysVinit

If we have sysvinit running in our operating system, we'll need to run following service command.

$ sudo service ajenti start

On Systemd

If we are running systemd in our linux machine, we'll need to run the following systemctl command.

$ sudo systemctl start ajenti

4. Configuring Firewall

Next, we'll need to open port 8000 as Ajenti server utilizes that port. Enabling that port from the firewall will allow us to login into the web interface of Ajenti server. In order to open port 8000, we'll need to run the following commands.

On Iptables

If we have got iptables running as firewall solution in our linux machine, we'll gonna run iptables in root or sudo access to open port 8000 as shown below.

$ sudo iptables -A INPUT -p tcp --dport 8000 -j ACCEPT
$ sudo iptables-save -c

On Firewalld

If we have firewalld firewall solution running in our linux machine, we'll need to run firewall-cmd command in root or sudo access to open port 8000 as follows.

$ sudo firewall-cmd --permanent --zone=public --add-port=8000/tcp
$ sudo firewall-cmd --reload

5. Login to Ajenti Web Interface

Next, we'll gonna login to Ajenti web interface using our favorite browser by pointing to the url to our domain or ip address of the linux box where we have just installed ajent under port 8000. We'll need to navigate to our server as https://domain-name.com:8000 or https://ip-address:8000 . As Ajenti is by default highly secured by SSL encryption method, it will prompt us a security warning which we'll skip as the warning illustrates that the issuer of the certificate is untrusted as we haven't assigned a trusted certificate to it. It is always recommended to use a trusted SSL certificate if you have one.

Ajenti Admin Login

After that, it will prompt a login screen in which we'll need to enter the required credentials. Here, at the initial setup, the default credentials are username as root and password as admin .

Note: It is extremely recommended to change the username and password as soon as we have successfully logged into the control panel.

6. Changing password and creating a new user

Finally we have successfully logged in into the web interface. Now, without doing anything, our first priority is to change the password of the root user. To do so, we'll need navigate to the "Configure" menu then click on "Change password" on root account. Then we'll need to type a very secure password in it.

Changing Root Password

We may also wanna create a new user in our Ajenti control panel and assign the required features so that we can use that to login. To do so, we'll need to click on "Create" button, then set the name by clicking "unnamed". After that we'll gonna set a new password to that user and set the features required by the user.

adding new user ajenti

7. Configuring and customizing Ajenti

By default, there is just a welcome widget in the dashboard which provides different information of the machine or VPS. We can easily add, remove and customize our widgets in our dashboard by clicking on "ADD WIDGET" button present just above. There are already many plugins installed and available on Ajenti control panel, but we can install more plugins or remove them by going to "Plugins" section. To apply the changes in Ajenti, we'll need to restart it.

Ajenti Adding Dashboard Widgets

After every thing has been configured and installed, we'll need to apply the changes to the control panel as Ajenti doesn't show them on the menu without restarting it. To restart Ajenti Control Panel, we'll need to click on "Configure" section on the menu then we'll need to click "Restart" button to restart Ajenti control panel and enable the plugins.

Known Issue with Ubuntu and Debian

If we are running Debian or Ubuntu or their derivatives and we have followed all the steps above as described but our Ajenti web interface is not accessible though port 8000 on firewall is open. To fix that, we'll need to upgrade gevent package. To do so, we'll need to run the following command.

$ sudo apt-get install python-setuptools python-dev
$ sudo easy_install -U gevent

Next, we'll need to restart our ajenti daemon. We can do that by following above step3. After restarting our Ajenti daemon, we'll wanna navigate to the web interface using our web browser as described in above steps.

Conclusion

Ajenti is an awesome open source lightweight system management tool with beautiful web interface. It has many awesome features. It is very easy to install, it uses the existing configuration of the running system, it doesn't overwrite user's configuration files, it is included with many plugins for software configuration, monitoring and management. It is easily extensible with Python so plugins can be easily created. The modern user interface of the web control panel is pretty beautiful which is highly responsive. This tutorial above includes some easy steps on how we can install Ajenti in our linux server or VPS running different linux distributions. Ajenti has a weekly release cycle which makes us able to get our bug fixed and new features within a week. If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank you ! Enjoy :-)

Filed Under : LINUX HOWTO

Free Linux Ebook to Download

Comments (1)

Trackback URL | Comments RSS Feed

  1. Jamius Siam says:

    Thanks! :)
    Really helpful!

Leave a Reply

All comments are subject to moderation.