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. You can buy a cheap dedicated server from our website
Let’s identify the operating systems that are supported by DirectAdmin:
It is better to use a simple partition structure:
Partition
/boot
swap
/
Size
500 MB
2 x RAM >> no more than 16 GB
Rest of drive
If you prefer a more complex partition structure:
Partition
/boot
swap
/tmp
/
/var
/home
/usr
Size
500 MB
2 x RAM >> no more than 16 GB
1 GB
6 – 10 GB
8 – 20 GB. Logs, and Databases with CentOS
Rest of drive. If possible, mount with nosuid in /etc/fstab.
5 – 12+ GB.
You can change these numbers if needed. MySQL databases on Debian are located in the directory /home/mysql/.
Install basic development/compilation tools such as GCC, G++, and Perl.
To control DNS, you need a minimum of two static IPv4 IP addresses on your server. Some registrars may require the use of an external DNS service depending on the IP address.
It is possible to install DirectAdmin on an internal IP address. The steps for installing on a LAN are the same as for automatic installation, but ensure to select the Ethernet device that corresponds to the LAN IP (usually eth0, ens192, venet0, etc). When prompted, input the external license IP address.
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:
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.
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
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 a non-root shell, you should use the following command to get the root shell before executing the install command:
sudo -s
You can access the DirectAdmin control panel through the following URL:
http://server.ip.address:2222
Note: Use the admin username and password which is provided in the setup.sh output information.
That’s all about installing DirectAdmin on a Dedicated Server.
Installing DirectAdmin on a dedicated server is a straightforward process that can provide you with a powerful web hosting control panel for managing your websites and server resources. By following this article, you can successfully install DirectAdmin on your dedicated server and take full advantage of its features and functionality. With DirectAdmin, you can efficiently manage your hosting environment and provide a seamless experience for your website visitors. If you need to install WordPress, we suggest you read the article How to Install WordPress on DirectAdmin.
How useful was this post?
Click on a star to rate it!
Average rating 5 / 5. Vote count: 1
No votes so far! Be the first to rate this post.
If you want to get the most out of Windows 10 VPS, you have to optimize its performance, security, a...
Colocation is a data center where a business can rent space for servers and other computing hardware...
What is your opinion about this Blog?