Install DirectAdmin on Linode

Linode DirectAdmin
Linode DirectAdmin

Introduction

Prerequisites

  • A Linode account; if you do not have one, go to linode.com to register and get a $20 bonus with this code: PodcastInIt20
  • DirectAdmin license
  • Basic Linux knowledge

Adding Linode Server

  1. Log in to your Linode Manager and click "Add a Linode", select your plan, then click the "Add this Linode!" button

    Linode Add VPS

  2. Next, in the Linode Dashboard, click Deploy an Image:

    Linode Deploy Image

  3. Next, Select CentOS 7 64bit image, SwapDisk and choose a password for your root account:

    Linode Select Image

  4. Finally, Boot your Linode: Linode Boot Server

DirectAdmin Installation

  1. SSH to your Linode server.
  2. Install updates for your server:
    yum update -y
    
  3. Install DirectAdmin:
    yum install -y perl-DBI
    wget -O setup.sh http://www.directadmin.com/setup.sh
    chmod 755 setup.sh
    ./setup.sh
    

Configuration

  1. Fix quotas problem Linode CentOS 7 uses ext4 instead of xfs, so we must fix the problem. Set use_xfs=0 in /usr/local/directadmin/conf/directadmin.conf and restart DirectAdmin, then run the following commands:

    ln -s /dev/sda /dev/root
    

    Edit /etc/rc.d/rc.local and add this line:

    ln -s /dev/sda /dev/root
    

    Then run:

    chmod +x /etc/rc.d/rc.local
    /sbin/quotaoff -a; /sbin/quotacheck -avugm; /sbin/quotaon -a;
    

    Reboot your server.

  2. Adding IPv6

    If your server has an IPv6 address, you can add it to DirectAdmin. First, enable ipv6 in directadmin.conf file:

    nano /usr/local/directadmin/conf/directadmin.conf
    

    Set extra_spf_value= ip6:xxxx::xx:xx:xxx:xxxx (Note the space after the = character, and replace xxx with your IPv6 address)

    Set ipv6=1

    Restart DirectAdmin; when restarted, go to IP Management and add your new IPv6: DirectAdmin Add IP

    Then, link the IPv6 to your IPv4 by clicking on the IPv4 and selecting IPv6 to link. DirectAdmin Link IP

Conclusion

Now you have your DirectAdmin running in your Linode Server. To optimize performance and improve security, see this guide.