Install DirectAdmin on CentOS 7

Lets install of the packages that DirectAdmin will need before we start the install.

yum install wget gcc gcc-c++ flex bison make bind bind-libs bind-utils openssl openssl-devel perl quota libaio libcom_err-devel libcurl-devel gd zlib-devel zip unzip libcap-devel cronie bzip2 cyrus-sasl-devel perl-ExtUtils-Embed autoconf automake libtool which patch mailx bzip2-devel lsof glibc-headers kernel-devel psmisc net-tools systemd-devel libdb-devel perl-DBI xfsprogs rsyslog logrotate crontabs file

Let’s download and run the DirectAdmin installer

wget http://www.directadmin.com/setup.sh
chmod 755 setup.sh
./setup.sh

If you want to install SpamAssassin then you will need to add the following cpan modules

Install cpan, if it’s not already installed

yum -y install cpan

Now you can use cpan to install modules that you need.

cpan -i Digest::SHA HTML::Parser Net::DNS NetAddr::IP Archive::Tar IO::Zlib Digest::SHA DB_File Mail::SPF Geo::IP Net::CIDR::Lite Razor2 IO::Socket::IP IO::Socket::INET6 IO::Socket::SSL Mail::DKIM LWP::UserAgent HTTP::Date Encode::Detect::Detector Net::Patricia Net::DNS::Nameserver

It’s virtually obligatory to install CSF + LFD

cd /usr/src
rm -fv csf.tgz
wget https://download.configserver.com/csf.tgz
tar -xzf csf.tgz
cd csf
sh install.sh

Extra tools for updating csf

yum -y install cpan
cpan -i LWP::Protocol::https

The Darwin theme is the best one available for DirectAdmin

mkdir -p /root/darwin
cd /root/darwin
wget http://www.custombuild.eu/darwin/darwin.sh
chmod 755 darwin.sh
./darwin.sh all 

There is also a great CustomBuild plugin by the same author available at

http://www.custombuild.eu/plugin/custombuild.tar.gz

Don’t forget if you care using Cloud, where the external IPs are not actually on the box to use the following

echo 1 > /root/.lan

And in the directadmin conf add the following

ethernet_device=eth0:0
lan_ip=192.168.1.2

Where you have configured eth0:0 to be the external IP address

Author: Andrew

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.