When we talk about web hosting or want to manage one or multiple web sites through a user friendly web interface then there comes different web hosting control panels some of them are proprietary and many are open source. ISPConfig is one of the most widely used open source web hosting control panel for Linux that is designed to manage Apache, FTP, DNS, Emails and databases using its web based interface. The ISPConfig provides different levels of user access that is administrator, re seller, client and email-user.
Now we will setup its installation on CentOS 7, after following this tutorial you will have a user friendly web hosting control panel where you can easily manage your multiple domains without any cost.
Basic OS Setup
As we will be going to setup ISPConfig on CentOS 7, so before starting with installation process we will configure its basic parameters to configure its network settings, firewall rules and installation of its required dependencies.
Your Linux host should be configured with a proper FQDN and IP address and must have internet access to it. You can configure your local host by opening the hosts file of your system using below command.
# vim /etc/hosts
188.8.131.52 ispcp ispcp.linoxide.com
Enabling system level firewall is always been a good practice for securing your servers. In Linux CentOS 7 you can enable your firewall and open the required known ports using the below commands.
To enable and start firewall run below command.
# systemctl enable firewalld # systemctl start firewalld
Then open the ports that will be used in ISPConfig setup using the below command.
# firewall-cmd --zone=public --add-port 22/tcp --permanent # firewall-cmd --zone=public --add-port 443/tcp --permanent # firewall-cmd --zone=public --add-port 80/tcp --permanent # firewall-cmd --zone=public --add-port 8080/tcp --permanent # firewall-zmd --zone=public --add-port 25/tcp --permanent
Before we move forward let's update your system with latest updates and security patches and Enable the EPEL repository on our CentOS system to the require packages packages for the ISPConfig.
# yum -y install yum-priorities
To update existing packages on the system run the below command.
# yum update
Once your system is up to date, we will install the Development tools packages that will be required for the complete setup of ISPConfig. To install these packages you can run the below command.
# yum -y groupinstall 'Development Tools'
1) Installing LAMP Stack
Now run the below command to install LAMP stack packages with MariaDB, Apache, PHP , NTP and PHPMYADMIN.
# yum install ntp httpd mod_ssl mariadb-server php php-mysql php-mbstring phpmyadmin
After LAMP stack packages installation, restart mariadb services and setup its root password using below 'mysql_secure_installation'.
# systemctl start mariadb # systemctl enable mariadb
2) Installing Dovecot
You can install dovecot by issuing the following command.
# yum -y install dovecot dovecot-mysql dovecot-pigeonhole
After installation create an empty dovecot-sql.conf file and create a symbolic as shown below.
# touch /etc/dovecot/dovecot-sql.conf # ln -s /etc/dovecot/dovecot-sql.conf /etc/dovecot-sql.conf
Now restart dovecot services and enable it at boot.
# systemctl start dovecot # systemctl enable dovecot
3) Installing ClamAV, Amavisd-new and SpamAssassin
To install ClamAV, Amavisd and SpamAssassin, you make use of the following command, that will install all these packages in one go.
# yum -y install amavisd-new spamassassin clamav clamd clamav-update unzip bzip2 unrar perl-DBD-mysql
4) Installing Apache2 and PHP Modules
Now will install some of the mentioned modules that ISPConfig 3 allows to use mod_php, mod_fcgi/PHP5, cgi/PHP5, and suPHP on each website basis.
So, to install these modules with Apache2 you can run the below command in your ssh terminal.
# yum -y install 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
To configure your date and time format, we will open the default configuration file of PHP and configure the Data and Time zone.
# vim /etc/php.ini date.timezone = Europe/London
After making changes in the configuration file make sure to restart Apache web services.
5) Installing PureFTPd
PureFTP is required for the transfer of files form one server to other, to install its package you can use the below command.
yum -y install pure-ftpd
6) Installing BIND
BIND is Domain name server utility in Linux, in ISPconfig to manage and configure DNS setting, you have to install these package using the commands shown below.
# yum -y install bind bind-utils
ISPConfig Installation Setup
Now get ready for the installation setup of ISPConfig. To download its installation package we will use following wget command to copy the package from the officially provided web link of ISPConfig.
# wget http://www.ispconfig.org/downloads/ISPConfig-3-stable.tar.gz
Once the package is downloaded, run the below command to unpack the package.
# tar -zxvf ISPConfig-3-stable.tar.gz
Then change the directory where its installation package is placed as shown in below image.
Now we will run the installation through the php program by running the following command in the terminal.
# php -q install.php
Select language (en,de) [en]: Installation mode (standard,expert) [standard]: Full qualified hostname (FQDN) of the server, eg server1.domain.tld [ispcp]: ispcp.linoxide.com
MySQL server hostname [localhost]: MySQL root username [root]: MySQL root password : ******* MySQL database to create [dbispconfig]: MySQL charset [utf8]:
Then the system will be Generating a 4096 bit RSA private key to write a new private key to 'smtpd.key' file. After that we have to enter information that will be incorporated into certificate request.
Country Name (2 letter code) [XX]:UK State or Province Name (full name) :London Locality Name (eg, city) [Default City]:Manchester Organization Name (eg, company) [Default Company Ltd]:Linoxide Organizational Unit Name (eg, section) :Linux Common Name (eg, your name or your server's hostname) :ispcp Email Address :email@example.com
When you add above information, the system will be configured with all of its required packages as shown in the below image and then you will be asked for a secure (SSL) connection to the ISPConfig web interface.
Once you have entered the information for generating the RSA key to establish its SSL connection you will be asked to configure some extra attributes, whether to choose the default or change as per your requirements. Then it will be writing RSA key, configure DB server and restart its services to complete the ISPConfig installation setup.
Now we are ready to use ISPConfig control panel, to access its web control panel open your web browser to access the following URL that consists of your FQDN or Server's IP address with the default configured port.
You can login with the dafault user name and password as 'admin' 'admin'.
Using ISPConfig Control Panel
Upon successful authentication and providing with right login credentials, you will be directed towards dashboard of ISPconfig as shown below.
By using this admin control panel we will be able to manage our system services, configure emails, add DNS entries and setup our new websites by simply choosing from its available modules.
In the following image we can see that choosing the System module will shows the status of our server with all services running on it.
After completing this tutorial, you are now able to manage the services through a web browser that includes Apache web server, Postfix mail server, MySQL, BIND nameserver, PureFTPd, SpamAssassin, ClamAV, Mailman, and many more without paying its license fee as it free and open source that you can easily modify its source code if you wish to do so. Hope you find this tutorial much helpful for you, please leave your comments if you have any issue regarding this article and feel free to post your suggestions.