Get 50% Discount Offer 7 Days

NeuronVM

Contact Info

Chicago 12, Melborne City, USA

+88 01682648101

[email protected]

How to Install DirectAdmin on Dedicated Server
0
(0)

In this tutorial, we are going to teach you How to Install DirectAdmin on Dedicated Server. The web hosting control panel is a user interface that allows you to manage all hosting processes. DirectAdmin is also one of these platforms that allows you to manage different parts of your hosting such as databases, files, emails, and many parts related to the website and hosting.

What is DirectAdmin?

DirectAdmin is a fast and easy to use graphical web-based web hosting control panel that allows you to manage all aspects of your website. You will have complete control over your server using DirectAdmin. It is one of the best control panels among its competitors. One of the important differences of DirectAdmin is unlimited technical support in all its packages.

Prerequisites

1- Operating System

Let’s list the operating systems that DirectAdmin supports:

  • CloudLinux 7,8 (64-bit)
  • RHEL 7,8 (64-bit)
  • CentOS 7,8 (64-bit)
  • Rocky Linux 8 (64-bit)
  • AlmaLinux 8 (64-bit)
  • RHEL 9 (64-bit, Arm64)
  • Rocky Linux 9 (64-bit, Arm64)
  • AlmaLinux 9 (64-bit, Arm64)
  • Debian 10, 11, 12 (64-bit, Arm64)
  • Ubuntu 18.04, 20.04, 22.04 (64-bit, Arm64)

2- Partition Scheme

First, you can buy cheap dedicated server from NeuronVM. Then, it is better to use a simple partition structure:

Partition

/boot

swap

/

Size

500 MB

2 x RAM but no more than 16 GB

Rest of drive

If you want to use a less simple partition structure:

Partition

/boot

swap

/tmp

/

/var

/home

/usr

Size

500 MB

2 x RAM but no more than 16 GB

1 GB

6 – 10 GB

8 – 20 GB. Logs, and Databases with CentOS

Rest of drive. Mount with nosuid in /etc/fstab if possible

5 – 12+ GB. DA data, source code, mysql backups with custombuild option

You can change these numbers if needed. MySQL databases in Debian are stored in /home/mysql/.

Install basic development/compilation tools such as gcc, g++, and perl.

You don’t need to install services like Apache, PHP, MySQL, Ftp, Sendmail, etc., DirectAdmin will do it for you.

Note that DirectAdmin does not convert existing data after installation.

3- Hardware

  • At least 500 Mhz processor (Even though DirectAdmin will run on slower systems)
  • At least 2 GB of memory with at least 4 GB of swap memory
  • A hard drive with at least 2GB of free space after installing Linux, not including website data

4- Software

  • Install SSH
  • Choose named (Name Daemon) during Redhat installation
  • gcc and g++ to compile Apache and PHP
  • Support for quotas from kernel and filesystem
  • Support for IPv6 from kernel

5- IP Addresses

You should have at least one static IPv4 IP address on your server. At least two (2) IP addresses are required to control DNS. Because depending on your registrar, with an IP address you may have to use an external DNS service.

How to Install LAN (Internal IP)

You can install DirectAdmin on an internal IP address. The LAN installation steps are the same as the automatic installation mode, but note that when selecting the Ethernet device, you must select the device that holds the LAN IP, usually eth0, ens192, venet0, etc. When prompted, you must enter the external license IP.

How to Run the Installation with Predefined Options

If you need to install DA frequently, like many people, you may have a set of custom options that you want to use, and you may want to automate the process. To do this, run the following command:

setup.sh

Export environment variables set to the desired values to customize the main options as shown below:

export php1_release=8.0

To customize PHP modules:

export php_imap=yes

Now run the following installation command:

./setup.sh LICENSE_KEY

You can use a predefined options.conf file to customize more options.

Note that due to the presence of /usr/local/directadmin/custombuild/options.conf or the /usr/local/directadmin/custombuild/php_extensions.conf files, the installation process uses the settings from predefined options.conf and/or php_extensions.conf files.

Now copy them from another server. You can also download from a URL, but you must remember to place the options.conf or php_extensions.conf files before installation:

mkdir -p /usr/local/directadmin/custombuild
wget -O /usr/local/directadmin/custombuild/options.conf "http://yourdomain.com/options.conf"
wget -O /usr/local/directadmin/custombuild/php_extensions.conf "http://yourdomain.com/php_extensions.conf"

Here is a sample call for the setup.sh script with environment variables:

cd /root/
wget -O setup.sh https://download.directadmin.com/setup.sh
chmod 755 setup.sh
DA_HOSTNAME={{hostname}} ./setup.sh LICENSE_KEY

Other usable environment variables:

  DA_CHANNEL : Download channel: alpha, beta, current, stable
   DA_COMMIT : Exact DA build to install, will use latest from update channel if empty
  DA_OS_SLUG : Build targeting specific platform: linux_amd64, debian10_amd64, rhel8_amd64, …
    DA_EMAIL : Default email address
 DA_HOSTNAME : Hostname to use for installation
      DA_NS1 : pre-defined ns1
      DA_NS2 : pre-defined ns2

You need to set additional environment variables to a non-empty value to take effect (for example, DA_SKIP_CSF=true):

      DA_SKIP_CSF : skip installation of CFS firewall
     DA_SKIP_MYSQL_INSTALL : skip installation of MySQL/MariaDB
        DA_SKIP_SECURE_PHP : skip disabling insecure PHP functions automatically
       DA_SKIP_CUSTOMBUILD : skip all the CustomBuild actions
DA_INTERACTIVE_CUSTOMBUILD : run interactive CustomBuild installation if DA_SKIP_CUSTOMBUILD is unset"
DA_FOREGROUND_CUSTOMBUILD  : run CustomBuild installation in foreground DA_SKIP_CUSTOMBUILD is unset"

So, when CustomBuild runs by setup.sh, it will use the settings without any changes.

The setup.sh correctly handles mysql_inst and mariadb/mysql versions variables and you can use it to compile the appropriate database service at install time.

Introducing Options for script installation mode

Remember to set options in-place before calling the setup.sh in command-line mode.

You can set the CustomBuild.conf and php_extensions.conf options in place with desired options before running setup.sh. This will do things like using the desired download server, using the desired php version/mode, web server type, etc. You need to place the files in the following locations before running setup.sh:

/usr/local/directadmin/custombuild/options.conf
/usr/local/directadmin/custombuild/php_extensions.conf

These files should define your preferred settings, and CustomBuild will use those settings instead of the default ones when it runs.

Export the following variables with your desired email and nameservers before running setup.sh to declare Custom Email and ns1/ns2

export [email protected]
export DA_NS1=ns1.example.com
export DA_NS2=ns2.example.com

You can use the hostname of your choice by specifying it as follows:

export DA_HOSTNAME="server.yourdomain.com"

Export the following variable to skip mysql installation:

export DA_SKIP_MYSQL_INSTALL=true

If you want to install the pre-release version of DirectAdmin when installing for the first time, use the flag ‘beta’ as shown below:

DA_CHANNEL=beta ./setup.sh LICENSE_KEY

Installing DirectAdmin on Dedicated Server

First, sign in to your client account and click the “view” link next to your license. Check if the license is activated and verified. Then enter your license key and if you do not know your key enter auto.

Now login to your server as root and run the following command to run the installation script:

bash <(curl -fsSL https://download.directadmin.com/setup.sh) 'Provided license key should go here'

If you have non-root shell, you should use sudo -s to get root shell before executing the install command.

You can access the DirectAdmin control panel through the following URL:

http://server.ip.address:2222

And use the admin username and password which is provided in the setup.sh output information.

That’s all about installing DirectAdmin on Dedicated Server.

Conclusion

DirectAdmin allows you to manage different parts of your hosting such as databases, files, emails, and many parts related to the website and hosting. In this tutorial, we introduced you to DirectAdmin and taught you how to install DirectAdmin on Dedicated Server. You can ask your questions in the comments section.

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

Share this Post

Leave a Reply

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