1) Hostname Setup
Let's prepare your CentOS server with basic parameters by configuring its proper Hostnames and IP address. To configure the basic server parameters, login to your server using the root or sudo credentials and configure your hostname using below commands.
# vi /etc/sysconfig/network
# vi /etc/hosts
188.8.131.52 centos-6 centos-6.instainternet.com
# Hostnamectl set-hostname centos-7
# vi /etc/hosts
184.108.40.206 centos-7 centos-7.instainternet.com
2) Firewall Settings
After hostname setup configure your firewall and SELinux to permissive mode so that you won't get any issue during your installation setup but keep a note that enable it back and allow only your required ports in firewall if you are working on the production environment.
# Service iptables start
# vi /etc/sysconfig/selinux
# systemctl start firewalls
# setenforce 0
3) System Update
Now run the following command to update your CentOS 6/7 servers with latest patches and updates.
# yum update
You asked to press Y for Yes and N for No to exit from the update, so press "Y" key and hit enter to start installing missing packages and their updates.
4) Installing Packages
Before starting the DirectAdmin installation setup, we will be installing a few packages that must be installed on your CentOS 6 or 7 server.
Let's run the below command to install some dependent packages on your CentOS server.
# yum install wget zip unzip gcc gcc-c++ flex bison quota make perl bind bind-libs bind-utils openssl openssl-devel libaio libcom_err-devel libcurl-devel gd zlib-devel libcap-devel cronie bzip2 autoconf automake libtool which patch mailx cyrus-sasl-devel perl-ExtUtils-Embed db4-devel
After successful execution of the above command, you will be asked whether to proceed with the installation of these packages including their dependencies and updates. So, press "Y" key to proceed with the installation.
In CentOS 7, we need to install the following dependencies for with addition to some general packages installation as shown below.
# yum install wget unzip psmisc net-tools libdb-devel perl-DBI systemd-devel
To download the latest installation script for DirectAdmin we will be using the following command on CentOS 6/7 servers as shown.
# wget http://www.directadmin.com/setup.sh
Assign the executable permissions to the downloaded script by using the below command.
# chmod 755 setup.sh
Now you can see by list your current directory that it should have the proper executable permissions.
Starting DirectAdmin Installation:
To start the installation of DirectAdmin on CentOS 6/7,
let's point to installation script and execute it within your current direct directory where you have downloaded then press "Y" key to install the required pre-installation packages as shown.
*** 64-bit OS *** *****************************************************
* DirectAdmin requires certain packages, described here:
* Would you like to install these required pre-install packages? (y/n): y
This might take a while to install the prerequisites, after that you will be asked to configure some of the following settings. So, choose the best appropriate answers according to your environment and give correct Client ID and License ID that you have got from DirectAdmin against your public IP.
***************************************************** Please enter your Client ID : xxxxx
Please enter your License ID : xxxxxx
Please enter your hostname (server.domain.com)
It must be a Fully Qualified Domain Name
Do *not* use a domain you plan on using for the hostname:
eg. don't use domain.com. Use server.domain.com instead.
Do not enter http:// or www Enter your hostname (FQDN) : centos-7.instainternet.com Client ID:
Is this correct? (y,n) : y
Is ens160 your network adaptor with the license IP (220.127.116.11)? (y,n) : y
Your external IP: xx.xx.xx.xx
The external IP should typically match your license IP. Is 18.104.22.168 the IP in your license? (y,n) : y DirectAdmin will now be installed on: Enterprise 7.1
Is this correct? (must match license) (y,n) : y
You have chosen custombuild 2.0.
--2015-12-08 22:13:35-- http://files.directadmin.com/services/custombuild/2.0/custombuild/build
Resolving files.directadmin.com (files.directadmin.com)... 22.214.171.124, 126.96.36.199, 188.8.131.52
Connecting to files.directadmin.com (files.directadmin.com)|184.108.40.206|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 617821 (603K)
Saving to: ‘/usr/local/directadmin/custombuild/build’ 100%[====================================================================================>] 617,821 431KB/s in 1.4s 2015-12-08 22:13:37 (431 KB/s) - ‘/usr/local/directadmin/custombuild/build’ saved [617821/617821] Would you like the default settings of apache 2.4 with mod_ruid2 and php 5.5 cli? (y/n):y
After downloading the updates and packages with your client id and license id for your IP address you see multiple numbers of DirectAdmin processes taking place on your screen to complete the installation setup.
DirectAdmin Web Access
Upon successful completion of the installation setup of DirectAdmin, you can access its Web Console on your web browser with the FQDN of your server and port '2222'.
Make sure that the port 80 and 2222 is allowed in your firewall/iptable settings.