How To Install Plesk On Centos 7

How To Install Plesk On Centos 7

Reading time1 min
#Hosting#Linux#Server#Plesk#CentOS#WebHosting

How To Install Plesk On CentOS 7: A Practical Reference

Plesk remains one of the leading server control panels, streamlining web hosting, database management, and SSL provisioning via a robust web GUI. CentOS 7, though EOL due in 2024, is still widely deployed in legacy hosting environments. Deploying Plesk atop a fresh CentOS 7 system takes roughly 20–30 minutes and requires deliberate attention to system prerequisites, SELinux, firewall, and system packages.


System Requirements

RequirementMinimumRecommended
RAM1 GB2 GB+
CPU1 core2+ cores
Disk10 GB free20+ GB
NetworkPublic IPv4
Accessroot SSH

Note: For production use, 2 GB RAM and swap are highly advisable. Hosting multiple domains? Plan aggressively for memory and disk usage.


1. Initial System Preparation

Assume a standard CentOS 7 minimal install.

ssh root@<your-server-ip>
yum -y update
# If the kernel is updated, reboot immediately
reboot

Skipping this or updating post-install frequently causes bizarre dependency errors (Error: plesk-core requires...).


2. SELinux Policy Handling

Out of box, SELinux frequently blocks Plesk installer actions or webserver modules (e.g., improper context for /usr/local/psa). One pragmatic solution:

setenforce 0
sed -i 's/^SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config

Permanent change requires reboot. If organizational policy mandates SELinux, proper context rules must be authored; otherwise, Plesk’s own docs recommend permissive/disabled mode during install.


3. Installing Plesk’s Autoinstaller Script

Fetch and run the Plesk autoinstaller. Direct invocation is supported, but for air-gapped/controlled environments, download and review first.

curl -O https://autoinstall.plesk.com/plesk-installer
chmod +x plesk-installer
./plesk-installer

Or, for single-line enthusiasts:

sh <(curl https://autoinstall.plesk.com/plesk-installer)

Installer will autodetect CentOS version. If not, suspect DNS or missing system packages.


4. Installer Menu and Selection

Installer launches an interactive ncurses menu. Several install “types” are offered:

  • Recommended — lean standard setup (Apache NGINX, mail, core features)
  • Full — every available component (rarely necessary)

Unless you have specialized requirements, stick with Recommended.

Known issue: On slow links or misconfigured DNS, downloads can silently hang. Monitor with top or check /var/log/plesk/install/autoinstaller3.log for failed mirrors.


5. Installation Runtime

The best-case install is ~12 minutes (SSD, 100Mbps+). On large virtual servers or under-provisioned VMs, this may exceed 30 minutes. Watch out for out-of-memory errors on 1 GB systems:

Killed
Error: The installation was terminated unexpectedly.

In such cases, add swap or resize your instance before proceeding.


6. Initial Access and Hardening

Browse to:

https://<your-server-ip>:8443

SSL warnings are expected (self-signed default). Create the initial admin password and license enrollment.

Practical tip: Immediately enable Fail2Ban and set Plesk admin to a unique username. Default admin is widely brute-forced.


7. Firewall and Port Configuration

Don’t forget to open required TCP ports. Example with firewalld:

firewall-cmd --permanent --add-port=8443/tcp
firewall-cmd --permanent --add-service={http,https}
firewall-cmd --reload

Verify with:

firewall-cmd --list-all

Ports [8443, 8880] (for HTTP to HTTPS redirect), 80, and 443 are the bare minimum.


8. Post-Installation Checklist

  • Apply system and Plesk patches via Tools & Settings → Updates.
  • Configure Let’s Encrypt (via Plesk extension) to secure the panel and all domains.
  • For outbound mail, validate reverse DNS matches your configured FQDN. Some providers block port 25.
  • Add domains: Websites & Domains → Add Domain.
  • Email: Mail → Create Email Address.

Side note: Plesk can co-exist with Docker, but not every extension is compatible with CentOS 7’s older kernel. Factor this into deployment plans.


9. Troubleshooting

Common technical knots:

  • Dependency errors: Always yum update and reboot before install.
  • Installer stuck: Check /tmp for low disk; clean with yum clean all and rm -rf /tmp/*.
  • SSL errors in browser: Self-signed SSL warnings only; if panel does not load, check systemctl status psa and /var/log/plesk/panel.log.
  • SELinux causes random failures: Confirm getenforce returns Permissive during install.

Lost admin password? Reset via CLI:

plesk bin admin --set-password -passwd <newpass>

Reference: Required Ports for Plesk

PurposePortProtocol
Plesk Panel8443TCP
HTTP80TCP
HTTPS443TCP
Mail (SMTP)25, 587, 465TCP
FTP21, PassiveTCP

Closing Notes

CentOS 7 is nearing EOL and should not be used for greenfield projects. If technical debt traps you with CentOS 7, harden the install: minimal OS, disable unused services, and patch Plesk routinely. For Plesk on Rocky or AlmaLinux, workflow is nearly identical.

Gotcha: The one-liner install occasionally fails to pull all dependencies on very minimal images (esp. cloud VMs without wget, curl, or even sudo). Pre-install these utilities first for a smoother setup:

yum -y install wget curl sudo

There’s no perfect setup. Review the Plesk change log before updates, particularly on edge or business-critical servers.


End of reference. For advanced configuration or high-availability deployments, consult official Plesk and OS documentation directly.