How to Install Plesk on Ubuntu and AlmaLinux

setup Plesk on Ubuntu 20.04/22.04 or AlmaLinux 8/9

Introduction

Plesk is a popular web hosting control panel that makes managing websites, domains, and hosting services easy for web hosting providers, web developers, and server administrators. It provides a simple yet powerful interface to handle common hosting tasks like creating and managing websites and domains, emails, databases, DNS settings, and more.

In this comprehensive guide, we will go through step-by-step instructions to install the latest version of Plesk on two popular Linux distributions – Ubuntu and AlmaLinux.

Prerequisites

Before we begin with the installation, let’s look at the prerequisites:

  • A server running Ubuntu 20.04/22.04 or AlmaLinux 8/9 with root access
  • At least 2 GB RAM for Plesk
  • At least 20 GB free disk space
  • A valid Plesk licence key

Without further ado, let’s move on to installing Plesk!

Step 1 – Install Required Packages

First, we need to ensure some required packages are installed on the server.

On Ubuntu

Log in as root on your Ubuntu server and run:

$ sudo apt update
$ sudo apt install unzip curl wget perl libnet-ssleay-perl ntp ntpdate apache2 apache2-utils apache2-suexec-custom libapache2-mod-ruid2 libapache2-mod-fcgid libmysqlclient-dev libpq-dev rsync git sudo

On AlmaLinux

On AlmaLinux, run:

$ sudo yum update -y
$ sudo yum install unzip curl wget perl-libwww-perl perl-Net-SSLeay perl-Archive-Tar ntp ntpdate httpd httpd-tools mod_ssl mod_fcgid mod_ruid2 mysql-devel postgresql-devel rsync git sudo -y

This will install all the required packages.

Step 2 – Configure NTP

Plesk requires the system date and time to be accurate. We’ll configure NTP for that:

$ sudo ntpdate pool.ntp.org
$ sudo systemctl enable ntpd.service
$ sudo systemctl start ntpd.service

Check NTP sync status with:

$ sudo ntpstat

Step 3 – Configure Firewall

Open the required ports in the firewall.

For Ubuntu, allow ports:

21, 22, 25, 80, 110, 143, 443, 465, 993, 995, 8443, 8447

On AlmaLinux, run:

$ sudo firewall-cmd --permanent --add-port={21,22,25,80,110,143,443,465,993,995,8443,8447}/tcp
$ sudo firewall-cmd --reload

This opens the necessary ports for Plesk.

Step 4 – Disable SELinux (AlmaLinux only)

On AlmaLinux, disable SELinux by editing /etc/sysconfig/selinux:

$ sudo sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/sysconfig/selinux

Reboot the system for changes to take effect.

Step 5 – Create Plesk User

Create a user called psaadm for Plesk:

$ sudo useradd psaadm

And set a password:

$ sudo passwd psaadm

This user will be used to run Plesk services.

Step 6 – Download and Install Plesk

Now we’re ready to install Plesk.

Go to the Plesk downloads page and grab the Plesk installer for Linux:

$ sudo cd /tmp
$ wget https://download.plesk.com/plesk/plesk-installer/plesk-installer

Make the installer executable:

$ sudo chmod +x /tmp/plesk-installer

Finally, run the installer as root providing your license key:

sudo /tmp/plesk-installer --with-panel bind --license-key YOUR_LICENSE_KEY_HERE

This will install Plesk with all components and apply the license key. Follow the on-screen instructions.

Once the installer finishes, Plesk will be installed and ready!

Step 7 – Configure Apache for Plesk (Ubuntu only)

On Ubuntu, we need to configure Apache for Plesk.

Open /etc/apache2/apache2.conf and add/edit the following lines:

<Directory /var/www/>
  AllowOverride All
</Directory>
Include /etc/plesk-apache.conf

Save and exit. Then enable required modules:

$ sudo a2enmod rewrite actions include proxy_fcgi setenvif

Finally, restart Apache:

$ sudo systemctl restart apache2

That’s it! Apache is now configured for Plesk.

Step 8 – Configure PostgreSQL for Plesk

Plesk requires access to a PostgreSQL database. We’ll configure a postgres user and database for Plesk.

Connect to PostgreSQL:

$ sudo su - postgres
$ sudo psql

Create a user called psa and set a password:

CREATE USER psa WITH ENCRYPTED PASSWORD 'strongpassword';

Create a database psa owned by user psa:

CREATE DATABASE psa OWNER psa;

Allow the user to connect remotely:

ALTER USER psa WITH LOGIN;

Exit PostgreSQL:

\q
exit

PostgreSQL is now ready for Plesk.

Step 9 – Configure MariaDB for Plesk (Optional)

If you want Plesk to also use MariaDB, follow these steps.

Log in to MariaDB as root:

$ mysql -u root -p

Create a user psa and database psa:

CREATE USER 'psa'@'localhost' IDENTIFIED BY 'strongpassword';
CREATE DATABASE `psa` /*!40100 DEFAULT CHARACTER SET utf8mb4 */;
GRANT ALL PRIVILEGES ON `psa`.* TO 'psa'@'localhost';
FLUSH PRIVILEGES;

Exit MariaDB:

exit

MariaDB is now ready for Plesk.

Step 10 – Access Plesk Web Interface

Plesk should now be installed and ready! You can access the Plesk web UI at:

http://your_server_ip:8443

Log in with:

  • Username: admin
  • Password: the one you set during installer

That’s it! You now have Plesk installed on your Ubuntu/AlmaLinux server. From the web UI you can create websites, emails, databases and manage all aspects of your hosting.

Troubleshooting Common Issues

Here are some common issues and fixes while installing or accessing Plesk:

Page not loading

  • Make sure the hostname resolves on the server. Add it to /etc/hosts
  • Check firewall rules and open required ports
  • Ensure Apache is running on Ubuntu

Login page accessible but login fails

  • Reset admin password from CLI:
$ sudo /usr/local/psa/bin/admin --set-password admin 

Web interface loads but is unstyled

  • Permissions issue on Plesk directories. Fix with:
$ sudo chown -R psaadm:psaadm /usr/local/psa

Conclusion

With Plesk installed, you now have a powerful and easy-to-use control panel to manage your hosting services. Plesk makes it simple to administer websites, emails, DNS, databases, and more through its intuitive web interface. It is a great choice for web hosts, developers, and server administrators looking to simplify website management and hosting automation.

LEAVE A COMMENT