How to Setup ISPConfig DNS Only on CentOS 7

ISPConfig is a free, open-source, powerful control panel for Linux servers that allows you to manage, monitor, and control all tasks through a web browser. It is very secure, fast, and stable, and used by many system admins to manage their servers. You can add domains, email addresses, websites, databases, and many more with ISPConfig.

ISPConfig Features

  • Supports three-tier access levels, Administrator, Resellers, and Clients.
  • Manage multiple servers from a single control panel.
  • Supports IPv4 and IPv6.
  • Supports Ubuntu, CentOS, Fedora, Debian, and OpenSuSE.

This tutorial will explain how to set up the ISPConfig control panel on CentOS 7 server.

Requirements

  • A server with CentOS 7 installed.
  • A root password is configured on your instance.

Getting Started

Before starting, updating your server with the latest version is recommended. You can update the server with the following command:

yum update -y

Next, you will need to set a hostname for the server. The hostname must be a fully qualified domain name. You can set the hostname of your server

hostnamectl set-hostname test.example.com

Next, you will also need to disable SELinux on your server. You can disable it by editing the following file:

nano /etc/selinux/config

Change the following lines:

SELINUX=disabled
SELINUXTYPE=targeted

Save and close the file. Then, restart your system to apply these changes.

Install Apache, MariaDB and PHP

By default, the latest MariaDB version is unavailable in the CentOS default repository. So, you will need to add the MariaDB repository to your system.

You can add it with the following command:

nano /etc/yum.repos.d/MariaDB.repo

Add the following lines:

[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.4/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

Save and close the file. Then, install MariaDB server with the following command:

yum install mariadb-server mariadb-client

Next, you will also need to add Remi repository to install PHP. You can add it with the following command:

yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
yum install yum-utils

Next, disable PHP5.4 and enable PHP7.2 with the following command:

yum-config-manager --disable remi-php54
yum-config-manager --enable remi-php72

Next, install PHP with all required modules by running the following command:

yum install php php-devel php-mysql php-gd php-imap php-ldap php-pear php-xml php-xmlrpc php-pecl-apc php-mbstring php-mcrypt php-snmp php-soap php-tidy curl curl-devel perl-libwww-perl imageMagick libxml2 libxml2-devel mod_fcgid php-cli wget

Once the installation has been completed, open php.ini file and change your TimeZone setting:

nano /etc/php.ini

Change the following line:

date.timezone = Asia/Kolkata

Save and close the file.

Next, install Apache webserver with the following command:

yum install ntp httpd httpd-devel mod_ssl perl-dateTime-format-HTTP perl-dateTime-format-builder

Finally, restart Apache service and enable it to start on boot time with the following command:

systemctl restart httpd
systemctl enable httpd

Install and Configure ISPConfig

First, download the latest version of ISPConfig with the following command:

wget -O ispconfig.tar.gz https://git.ispconfig.org/ispconfig/ispconfig3/repository/archive.tar.gz?ref=stable-3.1

Next, extract the downloaded file with the following command:

tar xfz ispconfig.tar.gz

Next, change the directory to ispconfig and start the installation with the following command:

cd ispconfig3*/install/
php -q install.php

You should see the following screen:

--------------------------------------------------------------------------------
 _____ ___________   _____              __ _         ____
|_   _/  ___| ___ \ /  __ \            / _(_)       /__  \
  | | \ `--.| |_/ / | /  \/ ___  _ __ | |_ _  __ _    _/ /
  | |  `--. \  __/  | |    / _ \| '_ \|  _| |/ _` |  |_ |
 _| |_/\__/ / |     | \__/\ (_) | | | | | | | (_| | ___\ \
 \___/\____/\_|      \____/\___/|_| |_|_| |_|\__, | \____/
                                              __/ |
                                             |___/ 
--------------------------------------------------------------------------------


>> Initial configuration  

Operating System: CentOS 7.6

    Following will be a few questions for primary configuration so be careful.
    Default values are in [brackets] and can be accepted with .
    Tap in "quit" (without the quotes) to stop the installer.

Select the expert mode of installation and provide all the necessary instructions as shown below:

Select language (en,de) [en]: 

Installation mode (standard,expert) [standard]: expert

Full qualified hostname (FQDN) of the server, eg server1.domain.tld  [test.example.com]: 

MySQL server hostname [localhost]: 

MySQL server port [3306]: 

MySQL root username [root]: 

MySQL root password []: admin@123

MySQL database to create [dbispconfig]: 

MySQL charset [utf8]: 

The next two questions are about the internal ISPConfig database user and password.
It is recommended to accept the defaults which are 'ispconfig' as username and a random password.
If you use a different password, use only numbers and chars for the password.

ISPConfig mysql database username [ispconfig]:

Shall this server join an existing ISPConfig multiserver setup (y,n) [n]: 

Adding ISPConfig server record to database.

Configure Mail (y,n) [y]: 

[WARN] autodetect for Postgrey failed
Force configure Postgrey (y,n) [n]: n

Skipping Postgrey

Configuring Postfix
Generating a 4096 bit RSA private key
...................................................................++
......................................................................................................................................................................................................................................................++
writing new private key to 'smtpd.key'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [XX]:IN
State or Province Name (full name) []:GUJ
Locality Name (eg, city) [Default City]:JUN
Organization Name (eg, company) [Default Company Ltd]:IT
Organizational Unit Name (eg, section) []:IT
Common Name (eg, your name or your server's hostname) []:test.example.com
Email Address []:[email protected]
[WARN] autodetect for Mailman failed
Force configure Mailman (y,n) [n]: 

Skipping Mailman

[WARN] autodetect for Dovecot failed
Force configure Dovecot (y,n) [n]: n

Skipping Dovecot

[WARN] autodetect for Courier failed
Force configure Courier (y,n) [n]: n

Skipping Courier

[WARN] autodetect for Spamassassin failed
Force configure Spamassassin (y,n) [n]: 

Skipping Spamassassin

[WARN] autodetect for Amavisd failed
Force configure Amavisd (y,n) [n]: 

Skipping Amavisd

[WARN] autodetect for Getmail failed
Force configure Getmail (y,n) [n]: 

Skipping Getmail

[WARN] autodetect for Jailkit failed
Force configure Jailkit (y,n) [n]: 

Skipping Jailkit

[WARN] autodetect for pureftpd failed
Force configure pureftpd (y,n) [n]: 

Skipping pureftpd

Configure DNS Server (y,n) [y]: 

Configuring BIND
The Web Server option has to be enabled when you want run a web server or when this node shall host the ISPConfig interface.
Configure Web Server (y,n) [y]: 

Configuring Apache
Configuring vlogger
[WARN] autodetect for OpenVZ failed
Force configure OpenVZ (y,n) [n]: 

Skipping OpenVZ

Configure Firewall Server (y,n) [y]: 

Configuring Bastille Firewall
[WARN] autodetect for Metronome XMPP Server failed
Force configure Metronome XMPP Server (y,n) [n]: 

Skipping Metronome XMPP Server

[WARN] autodetect for Fail2ban failed
Force configure Fail2ban (y,n) [n]: 

Skipping Fail2ban

Configuring Apps vhost
Install ISPConfig Web Interface (y,n) [y]: 

Installing ISPConfig
ISPConfig Port [8080]: 

Admin password [46bb8280]: admin@123

Re-enter admin password []: admin@123

Do you want a secure (SSL) connection to the ISPConfig web interface (y,n) [y]: 

Generating RSA private key, 4096 bit long modulus
..............................................................................................................................................................................................................................................................................................................................................................++
............................................................................................................................................................................................................................................................................................................................................................................................................................................++
e is 65537 (0x10001)
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [XX]:IN
State or Province Name (full name) []:GUJ
Locality Name (eg, city) [Default City]:JUN
Organization Name (eg, company) [Default Company Ltd]:IT
Organizational Unit Name (eg, section) []:IT
Common Name (eg, your name or your server's hostname) []:test.example.com
Email Address []:[email protected]

Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:admin@123
An optional company name []:IT
writing RSA key
Configuring DBServer
Installing ISPConfig crontab
Installing ISPConfig crontab
no crontab for root
Detect IP addresses
Restarting services ...
Installation completed.

Once you have done, you can proceed to the next step.

Access ISPConfig Web Interface

ISPConfig is now installed and runs on port 8080. Open your web browser and type the URL http://test.example.com:8080. You will be redirected to the following screen:

Now, provide your admin username and password which you have set during the installation and click on the Login button. Upon successful login, you should see the ISPConfig dashboard in the following page:

Congratulations! you have successfully installed and configured ISPConfig DNS only on CentOS 7. You can now easily manage your DNS records from the ISPConfig web-based interface. Feel free to ask me if you have any questions.

Share this page:

0 Comment(s)