PHP Server Monitor is an open-source tool that helps you to monitor your servers and websites. In this tutorial, we will guide you through the process of installing PHP Server Monitor on Kali Linux Latest.
Open a terminal window and type the following command to update your Kali Linux system:
sudo apt update
sudo apt upgrade
Type the following command to install the Apache server:
sudo apt-get install apache2
Once the installation is complete, start the Apache server and enable it at the boot time by typing the following command:
sudo systemctl start apache2
sudo systemctl enable apache2
Type the following command to install PHP:
sudo apt-get install php
PHP Server Monitor requires a database to store the monitoring data. You can use either MySQL or MariaDB database.
Type the following command to install the MySQL database:
sudo apt-get install mysql-server
Type the following command to install the MariaDB database:
sudo apt-get install mariadb-server
Log in to the MySQL/MariaDB database using the following command:
mysql -u root -p
Create a database and a user with full privileges:
CREATE DATABASE phpservermonitor CHARACTER SET utf8 COLLATE utf8_general_ci;
GRANT ALL PRIVILEGES ON phpservermonitor.* TO 'psmuser'@'localhost' IDENTIFIED BY 'psmpassword';
FLUSH PRIVILEGES;
Type the following command to install Git:
sudo apt-get install git
Change the working directory to /var/www/html
and clone the PHP Server Monitor repository using the following command:
cd /var/www/html
sudo git clone https://github.com/phpservermon/phpservermon.git .
Note the .
at the end of the command which ensures we clone the repository in the current working directory.
Change the working directory to /var/www/html
and install PHP dependencies using the following command:
cd /var/www/html
sudo php composer.phar update
Change the working directory to /var/www/html
and copy the default settings file to the configuration directory:
cd /var/www/html
sudo cp inc/config.sample.inc.php inc/config.inc.php
Edit the configuration file with a text editor of your choice:
sudo nano inc/config.inc.php
Update the database credentials:
// Configuration for: Database
define('DB_TYPE', 'mysqli');
define('DB_HOST', 'localhost');
define('DB_NAME', 'phpservermonitor');
define('DB_USER', 'psmuser');
define('DB_PASS', 'psmpassword');
define('DB_PORT', '');
define('DB_CHARSET', 'utf8');
Edit the Apache configuration file with a text editor of your choice:
sudo nano /etc/apache2/conf-available/phpservermonitor.conf
Add the following lines:
<Directory "/var/www/html">
Options -Indexes
Order Allow,Deny
Deny from all
Allow from 127.0.0.1
Allow from ::1
</Directory>
Save and close the file.
Enable the new configuration and restart Apache by running the following commands:
sudo a2enconf phpservermonitor
sudo systemctl restart apache2
Open a web browser and navigate to http://localhost
. Follow the instructions on the screen to complete the installation.
That's it! You have now installed PHP Server Monitor on Kali Linux Latest. You can now start monitoring your servers and websites.
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!