ISPConfig is an open source, actively developed, web-based control panel for managing your servers. With ISPConfig installed, you can manage a variety of services, administer multiple servers, and designate different authorization levels for server administrators, all from the familiarity and comfort of any modern browser. In this tutorial, we’ll get ISPConfig up and running on a CentOS 7 server. You can then administer your server from the web, or integrate additional servers running on any of ISPConfig’s supported Linux distributions.
Getting Started
Confirm that you have the following before you follow this guide:
• 1 Node (Cloud Server or Dedicated Server) running CentOS 7.
• Root access to the node or one sudo non-root user
• A valid hostname set on your server’s main IP address
Tutorial
We’ll begin by ensuring that your server’s hostname is set correctly. Edit your host file and be certain that its contents are accurate.
192.168.100.100 ispcp ispcp.globo.tech
SELinux is a powerful security addition available on many Linux distributions, but configuring it can be tricky. It is also difficult to set up correctly on servers that may run arbitrarily complex stacks configured by control panel users. For the purposes of this tutorial, we’ll disable SELinux completely. Creating a solid SELinux configuration for ISPConfig may be possible, but it is outside the scope of this guide.
setenforce 0
sed -i 's/enforcing/disabled/' /etc/sysconfig/selinux
sed -i 's/enforcing/disabled/' /etc/selinux/config
Next we’ll install some basic tools necessary for ISPConfig. We’ll also install the Epel package repository.
yum -y install yum-priorities
yum -y groupinstall 'Development Tools'
yum -y install epel-release
yum -y install wget nano
Now install Apache, PHP, MariaDB, PHPMyAdmin for administering MariaDB, and various extra PHP modules required for everything to run.
yum -y install ntp httpd mod_ssl mariadb-server php php-mysql php-mbstring php-ldap php-mysql php-odbc php-pear php php-devel php-gd php-imap php-xml php-xmlrpc php-pecl-apc php-mbstring php-mcrypt php-mssql php-snmp php-soap php-tidy curl curl-devel mod_fcgid php-cli httpd-devel php-fpm perl-libwww-perl ImageMagick libxml2 libxml2-devel python-devel phpmyadmin
It is important to set your server’s timezone correctly. Modify php.ini so this is accurate.
nano /etc/php.ini
date.timezone = America/Montreal
Apache and MariaDB must now be started. They must also be configured to launch when the server boots. We’ll take care of that here.
systemctl start httpd.service
systemctl enable httpd.service
systemctl start mariadb.service
systemctl enable mariadb.service
We must also secure MariaDB. Here we’ll implement some basic hardening of the database installation.
mysql_secure_installation
ISPConfig configures Dovecot for email services. We should install Dovecot if you’d like to configure IMAP and POP3 access from your panel.
yum -y install dovecot dovecot-mysql dovecot-pigeonhole
Having done this, we now need an empty configuration file. We’ll make it as a symbolic link.
touch /etc/dovecot/dovecot-sql.conf
ln -s /etc/dovecot/dovecot-sql.conf /etc/dovecot-sql.conf
Dovecot must now be started, and also configured to start when the server boots.
systemctl start dovecot.service
systemctl enable dovecot.service
ClamAV and Spamassassin are used for malware detection and spam filtering of inbound email. We’ll install both next.
yum -y install amavisd-new spamassassin clamav clamd clamav-update unzip bzip2 unrar perl-DBD-mysql
If you’d like for FTP and DNS to be configured from the panel, install pure-ftpd and bind.
yum -y install pure-ftpd
yum -y install bind bind-utils
We’ve finally got all of the essentials installed. It is now time to download ISPConfig itself.
wget http://www.ispconfig.org/downloads/ISPConfig-3-stable.tar.gz
tar -zxvf ISPConfig-3-stable.tar.gz
cd ispconfig3_install
cd install
php -q install.php
Fill in all required fields, selecting SSL for ISPConfig’s web interface.
Continue by accessing your control panel from the browser. Visit https://your_ip:8080 to enter ISPConfig.
The default credentials are “admin” for the username and “admin” for the password. You should change these immediately, as anyone who knows these can administer your server and compromise it remotely.
Conclusion
You can now manage your server entirely via the web, making complex changes from a user-friendly and powerful interface. Share this article with anyone you know who struggles to manage servers and is looking for an easier way.