+44 151 528 8706 [email protected]

How to install DirectAdmin and secure it

 

DirectAdmin is a web hosting control panel with a graphical user interface which was designed to make administration of websites easier. DirectAdmin is a really easy to use control panel and is extremely fast. 

Eventhough DirectAdmin is not a free service, they offer flexible licensing options for any kind of hosting solutions. With the product you will also get 24/7 support for any problem that you will face. 

Directdmin offers 3 access levels as Admin, Reseller and User. Each of these access levels come with different features so let’s see what each of them can do. 

But what can DirectAdmin do?

DiectAdmin General Features:

  • Integrated ticket support system where you can ask for help directly from DirectAdmin
  • Two-factor authentication providing an additional security layer
  • Easily add plugins to extend DirectAdmin functionality easily
  • Automaticlly updates the software
  • Completely cutomizable according to your business
  • Automatic recovery from crashes

DirectAdmin Administrator features:

  • Create / Modify Admins and reseller with ease
  • Admins can create predefined account packages using reseller packages
  • Shows all the accounts on the system
  • DNS administration
  • IP allocation to server and resellers
  • mail queue administration
  • The admin can view, stop, start, and restart services
  • DNS clustering and more

DirectAdmin Reseller features:

  • Account creation, listing, modification, and deletion is done quickly and easily.
  • Creation of user packages
  • Reseller statistics
  • IP assignment to customers
  • Possibility to create personalized nameservers for their customers 
  • System/ services information and more

DirectAdmin User features:

  • Email administration
  • FTP management
  • DNS menu where you can add and remove records, change MX settings, and anything else that goes with full DNS control
  • File manager
  • MySQL Databases 
  • Site Backups
  • Statistics Menu
  • allows the client to select which version of PHP should be associated with the .php extension with PHP selector
  • and many more

These are some of the features that come with DirectAdmin control panel. However if you are thinking to yourself what other softwares are there that can do the same thing.

Are there any DirectAdmin Alternatives? 

Yes there are DirectAdmin alternatives out there. Here are our top alternatives:

  • cPanel
  • Vesta
  • Plesk
  • Webmin
  • EHCP
  • ISPConfig
  • CentOS Web Panel

Now that we got to know about the DirectAdmin control panel, let’s get to the installation of DirectAdmin. 

Minimum requirements for installing DirectAdmin

Operating System

Operating systems supported by DirectAdmin are listed in the table below.

Partition Scheme

Note that before installing DirectAdmin you should have a CLEAN installation of the operating system. It’s not recommended to install DirectAdmin on an existing live production server. This is because DirectAdmin will not covert the existing data upon installation. 

Have a fresh server ready before starting the installation. 

Hardware

  • A processor of minimum of 500MHz
  • More cores the better
  • Minimum of 1GB of RAM (2+ GB recommended)
  • Minimum of 2GB of storage space after the OS installation and excluding website data

    If you are expecting high traffic levels then you will need more memory, processor power, and hard drive space than we recommend here. Intel and AMD should work fine. Solaris/Sparc will not.

     Software

    • HAve SSH installed and working
    • make sure that the named (Name Daemon) is selected during the Redhat install
    • gcc and g++ are required to compile Apache and PHP

    The kernel should support IPv6. The system kernel and filesystem must support quotas. 

    Authority level

    You MUST have root access to the server

    IP addresses

    • Minimum of one static IPv4 address
    • For DNS control you will sometimes need two IP addresses

    With only one IP address you might be forced to use an external DNS service, depending on your registrar. — this means that the web sites you create through the control panel will not propagate automatically.

    Your server IP must be an external IP address as local IP addresses cannot be set in your license. The IP that connects to our system must patch the license IP, or downloads will not work.

    What gets installed with DirectAdmin control panel?

    With the installation you will get the following installed ad set-up on your server:

    • Database servers
      • MySQL
      • MariaDB
    • WWW servers
      • Apache
      • Nginx
      • Litespeed web server
      • OpenLiteSpeed
    • PHP 5.x / 7.x Modes
      • mod_php
      • FPM
      • FastCGI
      • lsphp
    • Web applications
      • phpMyAdmin
      • roundcube
      • SquirrelMail webmail
    • IMAP / POP3 Server
      • Dovecot
    • mail trasfer agent / SMTP server
      • Exim
    • Mailing list
      • Majordomo
    • Anti-Spam solutions
      • SpamAssassin
      • Pigeonhole
      • Easy Spam Fighter
      • BlockCrackling
      • RSPAMD
    • Antivirus Software
      • ClamAV
    • FTP Server
      • ProFTPd
      • Pure-FTPd
    • Web application firewall
      • modsecurity
    • WWW usage statistics
      • AWstats
      • Webalizer

        1. Licence

        In order to install directadmin, you need to get a license or at least request a trial one, to do that click here.

        2. Update OS

         yum update

        3. Prerequisite packages

    Before installing DirectAdmin, there are some basic programs that you’ll need. Check your Operating system and run the following codes:

    CentOS 6:

    yum install wget tar 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 expat-devel db4-devel

    The libcom_err-devel package is for CentOS 6, relating to this error.
    CentOS 7

    yum install wget tar 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 expat-devel \
    psmisc net-tools systemd-devel libdb-devel perl-DBI perl-Perl4-CoreLibs perl-libwww-perl xfsprogs rsyslog logrotate crontabs file kernel-headers

    CentOS 8

    yum install iptables wget tar 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 expat-devel \
    psmisc net-tools systemd-devel libdb-devel perl-DBI perl-libwww-perl xfsprogs rsyslog logrotate crontabs file \
    kernel-headers hostname

    Debian 6

    apt-get install gcc g++ make flex bison openssl libssl-dev perl perl-base perl-modules libperl-dev libaio1 libaio-dev \
    zlib1g zlib1g-dev libcap-dev bzip2 automake autoconf libtool cmake pkg-config python libreadline-dev libdb4.8-dev libsasl2-dev patch

    Debian 7

    apt-get install gcc g++ make flex bison openssl libssl-dev perl perl-base perl-modules libperl-dev libaio1 libaio-dev \
    zlib1g zlib1g-dev libcap-dev bzip2 automake autoconf libtool cmake pkg-config python libdb-dev libsasl2-dev libncurses5-dev patch libjemalloc-dev

    Debian 8

    apt-get install wget gcc g++ make flex bison openssl libssl-dev perl perl-base perl-modules libperl-dev libaio1 libaio-dev \
    zlib1g zlib1g-dev libcap-dev cron bzip2 automake autoconf libtool cmake pkg-config python libdb-dev libsasl2-dev \
    libncurses5-dev libsystemd-dev bind9 dnsutils quota libsystemd-daemon0 patch libjemalloc-dev logrotate rsyslog libc6-dev systemd systemd-sysv

    You might need to remove libsystemd-dev from the list, if apt-get cannot find it.
    Debian 9

    apt-get update
    apt-get install wget gcc g++ make flex bison openssl libssl-dev perl perl-base perl-modules libperl-dev libperl4-corelibs-perl libaio1 libaio-dev \
    zlib1g zlib1g-dev libcap-dev cron bzip2 zip automake autoconf libtool cmake pkg-config python libdb-dev libsasl2-dev \
    libncurses5-dev libsystemd-dev bind9 dnsutils quota patch libjemalloc-dev logrotate rsyslog libc6-dev libexpat1-dev \
    libcrypt-openssl-rsa-perl libnuma-dev libnuma1

    Debian 10

    apt-get update
    apt-get install wget gcc g++ make flex bison openssl libssl-dev perl perl-base perl-modules libperl-dev libperl4-corelibs-perl libwww-perl libaio1 libaio-dev \
    zlib1g zlib1g-dev libcap-dev cron bzip2 zip automake autoconf libtool cmake pkg-config python libdb-dev libsasl2-dev \
    libncurses5 libncurses5-dev libsystemd-dev bind9 dnsutils quota patch logrotate rsyslog libc6-dev libexpat1-dev \
    libcrypt-openssl-rsa-perl libnuma-dev libnuma1

    FreeBSD tends to have everything needed, and the need to run pre-install commands is less common.
    Custombuild does require gmake, but will try to install it with dpkg -r or ports if it’s missing. If needed:

    pkg_add -r gmake perl wget bison flex gd cyrus-sasl2 cmake python autoconf libtool libarchive mailx

    FreeBSD 10

    pkg install gcc gmake perl5 wget bison flex cyrus-sasl cmake python autoconf libtool libarchive iconv bind99 mailx psmisc

    FreeBSD 11

    pkg install gcc gmake perl5 wget bison flex cyrus-sasl cmake python autoconf libtool libarchive iconv bind911 mailx webalizer gettext-runtime psmisc tar

    FreeBSD 12

    pkg install gcc gmake perl5 wget bison flex cyrus-sasl cmake python autoconf libtool libarchive iconv bind911 mailx webalizer gettext-runtime udns sudo psmisc tar openssl krb5

    4. Install DirectAdmin

    Download the setup.sh file 

    wget -O setup.sh https://www.directadmin.com/setup.sh

    chmod 755 setup.sh

    5. Run the script 

     

    ./setup.sh auto

    We’ve pasted a few tutorials from DirectAdmin’s knowledge base so you understand on how DirectAdmin works and how to secure the server.

     Understand the basics

    There are 3 major players in maintaining your server:

    1. Admin level – the main account responsible for the global server configuration and who can:
    • create other admins
    • create reseller packages and resellers
    • configure global settings like the hostname, nameservers, change security options and global limits
    • customize HTTPd and PHP configurations, manage IPs, maintain Multi Server Setup
    • perform full backup/restore, monitor server processes, mail queue
    • configure services over plugins
    • manage tickets and system messages
    • perform software update
    1. Reseller level – the middle-range account responsible for end-user management, who can:
    • create end-user packages, create user accounts
    • manage IPs and nameservers to be used by end-users
    • create backups for themselves and their users, customize skins
    • manage tickets over message system
    1. User level – the end-user account responsible for managing their sites and emails:
    • create and edit domains, subdomains, domain pointers, redirects and DNS records
    • manage FTP accounts
    • manage E-mails (accounts, autoresponders, antispam filters)
    • manage databases and db users
    • manage files

    The tricky part is that one account can be present on all 3 levels, like the “admin” user. You switch the level using a dropdown box on top of evolution skin Admin <-> Reseller <-> User.

    Secure your server

    Security does matter!

    If the server was installed using the ./setup.sh auto mode, you are already secured with a firewall as it installs the CSF firewall and activates the Brute Force Manager right after installation.

    If not, you should install the CSF firewall.

    Secure and harden your server. The guide contains a few more steps, and the most valuable are:

    • Enable disable_functions auto-fill with secure_php
    • Configure auto-update for used software
    • Install mod_security
    • Enforce using difficult passwords by users
    • Enable LetsEncrypt for the hostname, which also enables it for webmails and the DirectAdmin panel

      Configure your server

      1. Customize a skin – perform branding to make your server your own.
      2. Select your WWW server.
      3. Set up proper nameservers.
      4. Use clients’ assigned IPs for their domains to send from when sending mail.
      5. Enable backups for both the system and users.
      6. Enable BubbleWrap jail for users (CentOS 7 required).

      Consider using CloudLinux for better stability, security, and per-account resource management.

      Would you like all of this being done by a system administrator? If so, contact us by clicking here, or filling the form below

How to Mount an NFS Share in Linux

Network File System (NFS) is a distributed file system protocol that allows you to share remote directories over a network. With NFS, you can mount...

How to install Plesk on CentOS

Plesk is a commercial web hosting and server data center automation software with a control panel developed for Linux and Windows-based retail hosting...

Plesk vs cPanel

When choosing between web hosting control panels, it’s often a toss-up between Plesk or cPanel. Between them, they dominate the market for users looking for account and server...

We're Here To Help!

6 + 8 =

Head Office

Ukshin Kovaçica, 10,000 Pristina, Republic of Kosovo

Call Us

+44 151 528 8706