How to install Plesk on CentOS 7

Plesk-LogoInstalling 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.

 

Plesk Documentation

Much of what I’m telling you and more is documented on the Parallels Plesk website:

  • http://sp.parallels.com/products/plesk/

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.

 

One-Click Installer

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):

If you get an error message, wget may not be installed. Rectify this pitiful situation like this:

 

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:8443

 

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:

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:

  • http://kb.sp.parallels.com/en/391

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:

 

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:

  • http://kb.sp.parallels.com/943

 

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 😉

Jay is the CEO and founder of WP Hosting, a boutique style managed WordPress hosting and support service. He has been working with Plesk since version 9 and is a qualified Parallels Automation Professional. In his spare time he likes to develop iOS apps and WordPress plugins, or draw on tablet devices. He blogs about his coding journey at http://wpguru.co.uk and http://pinkstone.co.uk.

17 thoughts on “How to install Plesk on CentOS 7

  1. Quick note for WordPress installations

    Note that Plesk 12.0.8 on CentOS 7 currently has an issue that makes the wp-content folder for WordPress websites unaccessible via FTP. It appears that SELinux is preventing that folder from being listed. WordPress itself works fine, and the folder can be accessed from both Plesk and WordPress, just not via FTP.

    If this is important to you, set SELinux to “permissive” as described in this article: https://wpguru.co.uk/2014/12/how-to-control-selinux-in-centos-7/

    The issue is full fixed in Plesk 12.1.x

    1. I guess it’s philosophical, it certainly doesn’t hurt to turn off SELinux during the installation, but I don’t think it’s a requirement. I’ve installed Plesk on CentOS 7 several times successfully with SELinux turned on. Is this an official Parallels/Odin recommendation? Just curious.

      Thanks for the tip though, next time I’ll turn it off and see if there’s a difference.

  2. When I ran: firewall-cmd… It stated: -bash: firewall-cmd: command not found

    The install went fine and it didn’t show any errors. Is there a workaround?

    1. Sounds like the firewall or additional security in front of the server is keeping you from logging in. It depends on your infrastructure: on Amazon AWS for example, you need to open ports in the Security Group before connections are allowed. Make sure nothing is blocking port 22 so you can reach your server via SSH.

  3. please remove the “enable the atomic repo” advise, it completely conflicts with the default plesk packages and screwed over my installation.

    1. Nope, I won’t! It’s clearly marked as an optional step, besides it is the Plesk 12 recommended way if you’d like to use the php-fpm module that’s part of the Plesk installer (Plesk 12.5 supports php-fpm without Atomic).

Add your voice!