This tutorial shows the installation of ISPConfig 3.1 ona CentOS 7.2 (64Bit) server. ISPConfig is a web hosting control panel that allows you to configure the following services through a web browser: Apache web server, Postfix mail server, mysql, BIND nameserver, PureFTPd, SpamAssassin, ClamAV, Mailman, and many more.
1 RequirementsTo install such a system you will need the following:
A Centos 7.2 minimal server system. This can be a server installed from scratch as described in our Centos 7.2 minimal server tutorial or a virtual-server or root-server from a hosting company that has a minimal Centos 7.1 setup installed. A fast Internet connection. 2 Preliminary NoteIn this tutorial, I use the hostname server1.example.com with the IP address 192.168.1.100 and the gateway 192.168.1.1 . These settings might differ for you, so you have to replace them where appropriate.
Please note that HHVM and XMPP are not supported in ISPConfig for the CentOS platform yet. If you like to manage an XMPP chat server from within ISPConfig or use HHVM (Hip Hop Virtual Machine) in an ISPConfig website, then please use Debian 8 or Ubuntu 16.04 as server OS instead of CentOS 7.2.
3Prepare the server Set the keyboard layoutIn case that the keyboard layout of the server does not match your keyboard, you can switch to the right keyboard (in my case "de" for a german keyboard layout, with the localectl command:
localectl set-keymap de
To get a list of all available keymaps, run:
localectl list-keymaps
I want to install ISPConfig at the end of this tutorial, ISPConfig ships with the Bastille firewall script that I like to use as firewall, thereforI disable the default CentOS firewall now. Of course, you are free to leave the CentOS firewall on and configure it to your needs (but then you shouldn't use any other firewall later on as it will most probably interfere with the CentOS firewall).
Run...
yum -y installnet-tools
systemctl stop firewalld.service
systemctl disable firewalld.service
to stop and disable the CentOS firewall. It is ok wnen you get errors here, this just indicates that the firewall was not installed.
Then you should check that the firewall has really been disabled. To do so, run the command:
iptables -L
The output should look like this:
[ [emailprotected]~]# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)target prot opt source destination
Chain OUTPUT (policy ACCEPT)target prot opt source destination
Or use the firewall-cmd command:
firewall-cmd --state
[ [emailprotected]~]# firewall-cmd --state
not running
[ [emailprotected]~]#
Now I will install the network configuration editor and the shell based editor "nano" that I will usein the next steps to edit the config files:
yum -y install nano wget NetworkManager-tui
If you did not configure your network card during the installation, you can do that now. Run...
nmtui
... and go to Edit a connection :

Select your network interface:

Then fill in your network details - disable DHCP and fill in a static IP address, a netmask, your gateway, and one or two nameservers, then hit Ok :

Next select OK to confirm the changes that you made in the network settings

and Quit to close the nmtui network configuration tool.

You should run
ifconfig
now to check if the installer got your IP address right:
[[email protected] ~]# ifconfig ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.1.100 netmask 255.255.255.0 broadcast 192.168.1.255 inet6 fe80::20c:29ff:fecd:cc52 prefixlen 64 scopeid 0x20 ether 00:0c:29:cd:cc:52 txqueuelen 1000 (Ethernet) RX packets 55621 bytes 79601094 (75.9 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 28115 bytes 2608239 (2.4 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10 loop txqueuelen 0 (Local Loopback) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0If your network card does not show up there, then it not be enabled on boot, In this case, open the file /etc/sysconfig/network-scripts/ifcfg-eth0
nano /etc/sysconfig/network-scripts/ifcfg-ens33
and set ONBOOT to yes:
[...]ONBOOT=yes
[...]and reboot the server.
Check your /etc/resolv.conf if it lists all nameservers that you've previously configured:
cat /etc/resolv.conf
If nameservers are missing, run
nmtui
and add the missing nameservers again.
Now, on to the configuration...
Adjust /etc/hostsNext we will edit /etc/hosts . Make it look like this:
nano /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4192.168.1.100 server1.example.com server1
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 Disable SElinux
SELinux is a security extension of CentOS that should provide extended security. In my opinion you don't need it to configure a secure system, and it usually causes more problems than advantages (think of it after you have done a week of trouble-shooting because some service wasn't working as expected, and then you find out that everything was ok, only SELinux was causing the problem). Therefore I disable it (this is a must if you want to install ISPConfig later on).
Edit /etc/selinux/config and set SELINUX=disabled :
nano /etc/selinux/config
# This file controls the state of SELinux on the system.# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
Afterwards we must reboot the system:
reboot
4Enable Additional Repositories and Install Some SoftwareFirst, we import the GPG keys for software packages:
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY*
Then we enable the EPEL repository on our CentOS system as