Plesk Server - Control Panel

Introduction

Plesk server management system, over the years, has emerged as a cost-effective and secure tool for self-hosting web projects. From personal blogs to larger ventures, it handles a wide range of tasks with ease. The secret to its success? Proper installation and configuration. We’ve leaned on Plesk for 15 years, even during times when integrating Nginx in front of Apache was a manual task. Throughout its journey, despite changing ownership multiple times, Plesk has maintained its quality. Their support team consistently impresses us with their responsiveness. We want to clarify that this article isn’t sponsored. Every word here reflects our genuine experience and appreciation for Plesk, a tool we’ve trusted for over a decade.

Installation and Configuration of PLESK Server

In today’s digital age, managing servers efficiently is crucial for any business. One of the popular tools that has made this task easier is PLESK. In this guide, we’ll walk you through the installation and configuration of the PLESK server on CentOS 7. Why CentOS 7, you ask? Well, it’s the only RHEL family Linux that OVH offers on their Virtual Servers, leaving us with limited choices to explore RHEL 8 or RHEL 9.

Understanding Server’s Root Access

Before diving into the installation process, it’s essential to clarify a few things about OVH servers. By default, these servers come with root access disabled for terminal connections over SSH. So, if you need root access, you have two options:

  1. Using the Default CentOS Sudo User: OVH servers offer a default “cents” sudo user. You can log in using this user and then change the password for the root. Here’s how:
sudo passwd root YOUR-PASSWORD

Expected Outcome: The system will prompt you to enter and confirm the new root password.

Once done, you can log in to the root after logging in with the “centos” user into SSH using the command:

su -

Expected Outcome: You’ll be logged in as the root user using the password you just set.

  1. Allowing SSH Access for Root: If you wish to log in directly with the root user, you’ll need to enable SSH access for root. However, detailing this process would be beyond the scope of this article.

Getting Your System Ready

Before installing PLESK, it’s a good practice to update your system and install necessary packages. Here’s how you can do it:

sudo sudo yum update -y
sudo yum install wget -y
sudo wget https://autoinstall.plesk.com/plesk-installer

Expected Outcome: Your system updates and installs the wget package.

You also can check PLESK’s installation steps on Plesk’s official site: Plesk Web Installer

Embracing the 21st Century with Network Manager

Contrary to what some might believe, using the Network Manager is the recommended way to manage networks in the modern era. Here’s how you can install and configure it:

sudo yum install NetworkManager -y
sudo systemctl enable NetworkManager
sudo systemctl start NetworkManager
sudo yum install NetworkManager-tui -y

Expected Outcome: Network Manager and its TUI (Text User Interface) will be installed and started.

Securing Your Server with Firewalld

Security is paramount when setting up servers. Firewalld provides a dynamically managed firewall with support for network/firewall zones. Here’s how you can install and start it:

sudo yum install firewalld -y
sudo systemctl enable firewalld
sudo systemctl start firewalld

Expected Outcome: Firewalld will be installed, enabled, and started.

Setting Up Your Server’s Identity

A hostname represents your server’s identity. It’s essential to set it up correctly. Here’s how you can change your server’s hostname:

sudo hostnamectl set-hostname your-hostname-here

Expected Outcome: Your server’s hostname will be changed to the one you specify.

This guide provides a comprehensive walkthrough of installing and configuring the PLESK server on CentOS 7. By following the steps mentioned, you’ll have a PLESK server up and running in no time. Remember, always ensure your server’s security and keep it updated to avoid potential threats.

Efficiently Managing Ports with Firewalld for Plesk

When setting up Plesk on your server, managing ports efficiently is crucial. Instead of adding or removing ports one by one, it’s more efficient to create a service in firewalld and manage all necessary ports at once. This approach not only saves time but also ensures that you can enable or disable them collectively with a single command.

Creating a Service for Plesk

To create a service for Plesk, follow the steps below:

sudo bash -c 'cat << EOF > /etc/firewalld/services/plesk.xml
<?xml version="1.0" encoding="utf-8"?>
<service>
  <short>Plesk</short>
  <description>Plesk service</description>
  <port protocol="tcp" port="8443"/>
  <port protocol="tcp" port="8880"/>
  <port protocol="udp" port="137"/>
  <port protocol="udp" port="138"/>
  <port protocol="tcp" port="139"/>
  <port protocol="tcp" port="445"/>
  <port protocol="udp" port="1194"/>
  <port protocol="tcp" port="80"/>
  <port protocol="tcp" port="443"/>
  <port protocol="tcp" port="21"/>
  <port protocol="tcp" port="25"/>
  <port protocol="tcp" port="465"/>
  <port protocol="tcp" port="110"/>
  <port protocol="tcp" port="995"/>
  <port protocol="tcp" port="143"/>
  <port protocol="tcp" port="993"/>
  <port protocol="tcp" port="106"/>
  <port protocol="tcp" port="3306"/>
  <port protocol="tcp" port="1433"/>
  <port protocol="tcp" port="5432"/>
  <port protocol="tcp" port="8447"/>
  <port protocol="udp" port="53"/>
  <port protocol="tcp" port="53"/>
</service>
EOF'

Expected Outcome: A service named ‘plesk’ will be created with all the necessary ports defined in the XML configuration.

After creating the service, you need to reload firewalld and add the Plesk service:

sudo firewall-cmd --reload
sudo firewall-cmd --add-service=plesk --permanent
sudo firewall-cmd --reload
sudo firewall-cmd --list-services

Expected Outcome: The ‘plesk’ service will be added to firewalld, and you can view it in the list of services.

Managing Other Services

For better flexibility, it’s advisable to exclude certain services like FTP, HTTP, HTTPS, and SSH from the Plesk service. This way, you can manage them separately if needed. For instance, SSH is enabled by default, so there’s no need to add it manually. However, for other services, you can add them using the following commands:

sudo firewall-cmd --add-service=http --permanent
sudo firewall-cmd --add-service=https --permanent
sudo firewall-cmd --reload
sudo firewall-cmd --list-services

Expected Outcome: The HTTP and HTTPS services will be added, and you can view them in the list of services.

If you prefer not to enable FTP and use sFTP instead, you can skip the FTP service. However, if you need to enable FTP, here’s how:

sudo firewall-cmd --add-service=ftp --permanent
sudo firewall-cmd --reload

Expected Outcome: The FTP service will be added to firewalld.

Installing Plesk

Plesk installation journey is straightforward. Here’s a step-by-step guide to ensure a smooth process:

sudo chmod +x plesk-installer
sudo ./plesk-installer

After executing the commands, simply follow the on-screen instructions. At a certain point, the installer will present you with a choice regarding the type of installation you prefer for Plesk Obsidian:

Select the installation type for Plesk Obsidian
===============================================================================

Installation types for the product:

 1. (*) Recommended
       Install typically used components. Recommended for general use.

 2. ( ) Full
       Install all available components.

 3. ( ) Custom
       Custom components selection. Recommended only for experienced users.

Available actions:
(F) Go forward
(B) Go back
(Q) Cancel installation

Select an action or a number [F/b/q/1-3]:

Choose the option that best suits your needs. If you’re new to Plesk, the “Recommended” option is a great starting point. However, experienced users might opt for the “Custom” installation to tailor the components to their specific requirements.

When installation is done, you will see the following:

Once the installation process concludes, you’ll be greeted with the following screen:

Components and product check results:
Installation is finished

                               Congratulations!

    The installation has been finished. Plesk is now running on your server.

    To complete the configuration process, browse either of URLs:
      * https://cool-carver.YOUR_IP_HERE.plesk.page/login?secret=y5uMwPLiuO1jFuArMxI0W7sqj0yzPTUlvWjbqmbiPcrTyX6R
      * https://YOUR_IP_HERE/login?secret=y5uMwPLiuO1jFuArMxI0W7sqj0yzPTUlvWjbqmbiPcrTyX6R

    Use the username 'admin' to log in. To log in as 'admin', use the 'plesk login' command.
    You can also log in as 'root' using your 'root' password.

    Use the 'plesk' command to manage the server. Run 'plesk help' for more info.

    Use the following commands to start and stop the Plesk web interface:
    'systemctl start psa.service' and 'systemctl stop psa.service' respectively.

    If you would like to migrate your subscriptions from other hosting panel
    or older Plesk version to this server, please check out our assistance
    options: https://www.plesk.com/professional-services/

The changes were applied successfully.

Celebrate your achievement! At this juncture, you’ve successfully installed Plesk on your server. Navigate to the provided URLs to complete the configuration and start managing your server with ease. Remember, Plesk offers a range of professional services, so if you ever need assistance or wish to migrate subscriptions, they’ve got you covered.</p>

Accessing Plesk

With all the necessary ports and services set up, you can now proceed to the Plesk installation. Access Plesk using the following URL: https://your_IP_here:8443

Remember to replace ‘your_IP_here’ with your server’s IP address. Follow the on-screen instructions to complete the Plesk installation.

By following this guide, you’ve efficiently managed ports for Plesk using firewalld, ensuring a smooth and secure Plesk installation process.

Leave a Reply

Your email address will not be published. Required fields are marked *