How to install Ajenti Control Panel on CentOS 6

Introduction

Ajenti is an open source control panel for linux/unix like servers. It is a great administrative tool under linux/unix like server who do not like to use command line in the production world for its simplycity. It gives users a lightweight and clean UI through the web to perform common tasks.

Pre-install steps

Ensure your OS is updated

yum install -y

Next, you will need EPEL repo.

wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm

 

Now verify that [remi] is turned on. The remi repository provides a variety of up-to-date packages that are useful or are a requirement for many web-based services. You should enable the remi repositories by default.

vi /etc/yum.repos.d/remi.repo

In [remi] enable the repo by changing the enabled=0 to enabled=1.

[remi]
name=Remi’s RPM repository for Enterprise Linux 6 – $basearch
#baseurl=http://rpms.remirepo.net/enterprise/6/remi/$basearch/
mirrorlist=http://rpms.remirepo.net/enterprise/6/remi/mirror
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi

Note:Make sure to to replace enable=0 by enalbe=1 to enable the repo as shown above.

Ajenti Installation

you can execute the command given below to install Ajenti:

wget -O- https://raw.github.com/Eugeny/ajenti/master/scripts/install-rhel.sh | sh  

Above given command is the simple script written to install Ajenti Control panel.

It shouldn't bee too long to finish and you can see sth like this once it is done
Complete!
:: Done! Open https://<address>:8000 in browser

Iptables rules:
Ajenti listens on port 8000 so we need to set the iptables rule to open this port 
and we are ready to go.

vi /etc/sysconfig/iptables
# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
-A INPUT -p udp -m state --state NEW --dport 8000 -j ACCEPT
-A INPUT -p tcp -m state --state NEW --dport 8000 -j ACCEPT
COMMIT
~ 
~  
you can see i have added
A INPUT -p udp -m state --state NEW --dport 8000 -j ACCEPT
A INPUT -p tcp -m state --state NEW --dport 8000 -j ACCEPT

RESTART the Iptables

service iptables restart or /etc/init.d/iptables restart
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Flushing firewall rules: [ OK ]
iptables: Unloading modules: [ OK ]
iptables: Applying firewall rules: [ OK ]

Restart the Ajenti

service ajenti restart
Stopping Ajenti:
stopped [ OK ]
Starting Ajenti:
20.06.2016 07:10 INFO Using config file /etc/ajenti/config.json
started [ OK ]

You can open your browser and connect to Ajenti

https://your-ip:8000 or https://your-domain.com:8000

By default the user name and password is

username = root

password  = admin

You would want to change the password once you have successfully logged in.

 

 

Rajkishor Maharjan has written 17 articles