Installing Plesk on CentOS 7 hasn’t changed drastically from earlier versions, however CentOS is different than its predecessors. I’ve written an article about how to install Plesk on CentOS 6, but that was 3 years ago and thought it’s time for an updated version.
Well here it is: Plesk 12, meet CentOS 7.
Much of what I’m telling you and more is documented on the Parallels Plesk website:
On the left hand side you’ll find a link to the current documentation, as well as handy links to purchase a license if you need to. The link will also answer your questions about the different editions of Plesk and direct you to the Parallels Forum.
The Plesk one-click installer is a script that downloads itself and determines the correct Plesk version for your OS. You won’t accidentally pick the wrong version for your distribution. Paste this and the installer will download the latest version of Plesk (12 at the time of writing):
wget -O - http://autoinstall.plesk.com/one-click-installer | sh
If you get an error message, wget may not be installed. Rectify this pitiful situation like this:
yum install wget
To download older versions of Plesk you can download the one-click-installer file and run it with the option –show-all-releases. This will give you the option to specify your desired Plesk version with –select-release-id. For more information, run the file with the –help option.
I’ve noticed that the installer is much quicker than on previous versions of Plesk and is finished in under 10 mins (as opposed to half an hour previously). This is presumably due to many packages that are pre-installed with CentOS 7, so not much time is spent downloading stuff. Nice!
Once finished the installer will give you a URL to login with – usually consisting of your IP, like https://10.1.2.3:8843
Opening Ports for Plesk
On CentOS 6 and prior the firewall rules were set via iptables. This service is gone and has been replaced with firewalld in CentOS 7. We still need to open ports to speak to Plesk via a browser. The two important ones to open here are 8443 and 8447:
firewall-cmd --zone=public --add-port=8443/tcp --permanent firewall-cmd --zone=public --add-port=8447/tcp --permanent firewall-cmd --reload
The –permanent option makes these rules “stick” upon restart.
These are not the only ports Plesk needs to function, for a full list please see this KB article:
There is usually no need to open other ports if you install the Firewall extension in Plesk, as this will manage the underlying service for you (and apply the necessary open ports). To do this, head over to Tools and Settings – Updates and Upgrades and install the Firewall Extension (under Additional Plesk extensions).
Next head over to Extensions select the Firewall Module. Select “Enable Firewall Rules Management”, followed by another enable button. Now Plesk will manage the firewall for you and open all ports ready for web and email traffic.
Add Atomic Repo Power (optional)
If you’d like to supercharge your server, now’s a good time to install the Atomic repos. These will give you access to many additional tools such as pre-compiled OSSEC HIDS and additional PHP versions:
wget -q -O - http://www.atomicorp.com/installers/atomic.sh | sh
Loggin in for the first time
With your dedicated IP handy, the installer script will have given you something like https://10.1.2.3:8443. Surf there and be presented with the Plesk login screen.
But what are your credentials? I’m glad you asked: the first time you login to Plesk you can do so with your server root credentials. This even works on subsequent sessions, however Plesk creates an admin user for which you will specify the password during your first session.
It is strongly recommended that you use that admin user for Plesk administrative tasks. You can also create additional administrators in Plesk once you’re up and running – so there’s no need to share your super secret password with colleagues and clients.
Correcting your IP address (optional)
It can happen that Plesk does not detect the correct IP address on your server. This was never the case in CentOS 6, but I’ve noticed this in CentOS 7. In my case the Plesk installer thought that the local loopback address was my main one (127.0.0.1) – which of course it was not.
You can usually correct this on first login, but just in case you need to do this from the command line, check this helpful KB article:
License Key and Additional Components
You need a license to operate Plesk. You’ll get this either from your server provider (if Plesk is part of your deal), or you can buy one directly from Parallels. You can also run Plesk as a 14 day trial version. If you don’t enter this you can still use the Plesk interface but you’ll be limited to a single domain and several options are unavailable.
In case you’re missing menu items that you had expected to be there, it’s probably a license issue.
I find it helpful to head over to Tools and Settings (or the Server Tab) – Plesk – Updates and Upgrades and install several additional components, such as
- Health Monitor
- Migration Manager
- Firewall (under Additional Plesk Extensions)
- Watchdog (under Additional Plesk Extensions)
- Spam Assassin (under Mail hosting features)
- Kapersky Anti Virus (under Mail hosting features)
You can also install Fail2ban from this menu if you like – I personally rely on OSSEC to deal with intrusion detection and choose not to use Fail2ban at this point.
That’s it! Have fun with Plesk