In this tutorial, we will guide you through the installation of PHP Server Monitor on Fedora CoreOS latest version. PHP Server Monitor is a free and open-source tool that allows you to monitor your servers and websites. It provides detailed reports about server uptime, performance, and availability.
Before we start, make sure you have the following requirements:
First, you need to install some required packages on your system. Open the terminal and run the following command to update the package list:
sudo dnf update
Then, install Apache web server, PHP and MariaDB server packages using the following command:
sudo dnf install httpd php php-mysqlnd mariadb-server
The command above will install the required packages and their dependencies.
Before we proceed to installing PHP Server Monitor, we will create a database for it. First, start the MariaDB server using the following command:
sudo systemctl start mariadb
Then, run the following command to open the MariaDB shell:
sudo mysql
When you are in the MariaDB shell, create a new database for PHP Server Monitor using the following command:
CREATE DATABASE phpservermonitor;
Next, you need to create a new user and grant it privileges on the new database using the following command:
CREATE USER 'phpservermonitor'@'localhost' IDENTIFIED BY 'your_password';
GRANT ALL PRIVILEGES ON phpservermonitor.* TO 'phpservermonitor'@'localhost';
FLUSH PRIVILEGES;
Replace your_password
with a secure password for the phpservermonitor
user.
Once you have created the database and user, you can exit the MariaDB shell by running the following command:
exit
Now, you can download and install PHP Server Monitor. Open the terminal and run the following command to download the latest version of PHP Server Monitor:
sudo wget https://github.com/phpservermon/phpservermon/releases/download/3.4.1/phpservermon-3.4.1.zip
Once the download is complete, extract the downloaded zip file using the following command:
sudo unzip phpservermon-3.4.1.zip -d /var/www/html/
The above command will extract the files to /var/www/html/phpservermonitor
directory.
Next, you need to set the proper ownership and permissions for the PHP Server Monitor files using the following commands:
sudo chown -R apache:apache /var/www/html/phpservermonitor/
sudo chmod -R 755 /var/www/html/phpservermonitor/
Before you can access PHP Server Monitor, you need to configure it first. Rename the configuration file using the following command:
sudo mv /var/www/html/phpservermonitor/config.dist.php /var/www/html/phpservermonitor/config.php
Next, open the config.php file with your favorite text editor:
sudo nano /var/www/html/phpservermonitor/config.php
Update the following settings in the file:
define('PSM_DB_HOST', 'localhost');
define('PSM_DB_NAME', 'phpservermonitor');
define('PSM_DB_USER', 'phpservermonitor');
define('PSM_DB_PASSWORD', 'your_password');
Replace your_password
with the password you set for the phpservermonitor
user in Step 2.
Next, you need to configure Apache web server to serve the PHP Server Monitor application. Open the Apache configuration file using the following command:
sudo nano /etc/httpd/conf/httpd.conf
Add the following lines at the end of the file:
<VirtualHost *:80>
DocumentRoot /var/www/html/phpservermonitor/
<Directory /var/www/html/phpservermonitor/>
Options FollowSymlinks
AllowOverride All
Require all granted
</Directory>
ErrorLog /var/log/httpd/phpservermonitor_error_log
CustomLog /var/log/httpd/phpservermonitor_access_log common
</VirtualHost>
Save and close the file when you are done editing.
Restart the Apache server to apply the changes:
sudo systemctl restart httpd
Now, you can access PHP Server Monitor by navigating to your server's IP address or domain name in your web browser. For example, if your server's IP address is 192.168.0.100
, you can access PHP Server Monitor by navigating to http://192.168.0.100/phpservermonitor/
.
The default username and password are admin
and password
, respectively. You should change the default password after your first login.
Congratulations! You have successfully installed PHP Server Monitor on Fedora CoreOS. You can now use PHP Server Monitor to monitor 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!