How to Install PHP Server Monitor on Linux Mint

PHP Server Monitor is an open-source tool for monitoring your Linux server. It allows you to monitor your server's CPU, memory, disk usage, network traffic, and more. In this tutorial, we'll show you how to install PHP Server Monitor on Linux Mint.

Requirements

Before we proceed with the installation of PHP Server Monitor, you'll need to have the following:

Step 1: Install Required Packages

Open the terminal and run the following command to install the required packages:

sudo apt update
sudo apt install -y apache2 mysql-server php libapache2-mod-php php-mysql php-curl php-xml php-mbstring php-gd

Step 2: Install PHP Server Monitor

To install PHP Server Monitor on your Linux Mint system, follow the steps below:

  1. Download the latest version of PHP Server Monitor from their website https://www.phpservermonitor.org/.
  2. Extract the downloaded archive file to the var/www/html directory by running the following command:
sudo unzip ~/Downloads/psm-2.5.1.zip -d /var/www/html/
  1. Change the ownership of the extracted directory to the Apache user (www-data) by running the following command:
sudo chown -R www-data:www-data /var/www/html/phpservermon/

Step 3: Configure PHP Server Monitor

  1. Create a new MySQL database for PHP Server Monitor by running the following commands:
sudo mysql -u root -p
  1. Enter your MySQL root password when prompted, then run the following commands to create the database and the user:
CREATE DATABASE psm;
CREATE USER 'psmuser'@'localhost' IDENTIFIED BY 'yourpassword';
GRANT ALL PRIVILEGES ON psm.* TO 'psmuser'@'localhost';
FLUSH PRIVILEGES;
EXIT;
  1. Rename the config.dist.php file to config.php by running the following command:
cd /var/www/html/phpservermon/includes/
sudo cp config.dist.php config.php
  1. Open the config.php file with your favorite text editor, then enter your database details under the Database Settings section:
define('PSM_DB_HOST', 'localhost');
define('PSM_DB_USER', 'psmuser');
define('PSM_DB_PASS', 'yourpassword');
define('PSM_DB_NAME', 'psm');
  1. Save and close the file.

  2. Modify the index.php file to set the correct date timezone for your system by adding the following line after the opening <?php tag:

date_default_timezone_set('Asia/Kolkata');

Note: Replace Asia/Kolkata with your own time zone.

Step 4: Access PHP Server Monitor

Open your web browser and navigate to http://localhost/phpservermon/ to access PHP Server Monitor. You should see the login page.

Enter the default username and password:

After logging in, you should set up the necessary monitoring options for your server.

Congratulations! You have successfully installed PHP Server Monitor on Linux Mint. You can now monitor your server's health and performance from a web interface.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!