0557.html 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <!DOCTYPE html>
  2. <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <title>Monitor Websites, Servers and Other Network Service Uptime with PHP Server Monitor</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  6. <meta charset="UTF-8">
  7. <meta name="keywords" content="Browser Based,Home Lab,Home Lab Ideas,Install Guide,Self-Hosted,Web Based,Web Based Tools,Homelab,Linux,PHP,PHP Server Monitor,PHPServerMonitor,Ubuntu,Debian,MariaDB,MySQL,PHP Based Application,PHP Based Server Monitor,How To,Tutorial,i12bretro">
  8. <meta name="author" content="i12bretro">
  9. <meta name="description" content="Monitor Websites, Servers and Other Network Service Uptime with PHP Server Monitor">
  10. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  11. <meta name="revised" content="05/04/2024 06:48:37 PM" />
  12. <link rel="icon" type="image/x-icon" href="includes/favicon.ico">
  13. <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
  14. <script type="text/javascript" src="includes/js/steps.js"></script>
  15. <link href="css/steps.css" rel="stylesheet" type="text/css" />
  16. </head>
  17. <body>
  18. <div id="gridContainer">
  19. <div class="topMargin"></div>
  20. <div id="listName" class="topMargin">
  21. <h1>Monitor Websites, Servers and Other Network Service Uptime with PHP Server Monitor</h1>
  22. </div>
  23. <div></div>
  24. <div id="content">
  25. <h2>What is PHP Server Monitor?</h2>
  26. <p><em>PHP Server Monitor is a script that checks whether your websites and servers are up and running. It comes with a web based user interface where you can manage your services and websites, and you can manage users for each server with a mobile number and email address. - <a href="https://www.phpservermonitor.org/" target="_blank">https://www.phpservermonitor.org/</a></em></p>
  27. <h2>Installation</h2>
  28. <ol>
  29. <li>Log into the Linux device</li>
  30. <li>Run the following commands in a terminal:
  31. <div class="codeBlock"># update software repositories<br />
  32. sudo apt update<br />
  33. # install software updates<br />
  34. sudo apt upgrade -y<br />
  35. # install Apache HTTPD and MySQL<br />
  36. sudo apt install apache2 mariadb-server mariadb-client -y<br />
  37. # install PHP components<br />
  38. sudo apt install php7.3 libapache2-mod-php7.3 php7.3-curl php7.3-common php7.3-json php7.3-mysql php7.3-xml<br />
  39. # configure the MySQL database<br />
  40. sudo su<br />
  41. mysql_secure_installation</div>
  42. </li>
  43. <li>Press Enter to login as root</li>
  44. <li>Type Y and press Enter to set a root password, type the password twice to confirm</li>
  45. <li>Type Y and press Enter to remove anonymous users</li>
  46. <li>Type Y and press Enter to disallow root login remotely</li>
  47. <li>Type Y and press Enter to remove the test database</li>
  48. <li>Type Y and press Enter to reload privilege tables</li>
  49. <li>Run the following command to login into MySQL:
  50. <div class="codeBlock">mysql -u root -p</div>
  51. </li>
  52. <li>Authenticate with the root password set earlier</li>
  53. <li>Run the following commands to create the database and database user
  54. <div class="codeBlock">CREATE DATABASE server_monitor;<br />
  55. GRANT ALL ON server_monitor.* to &#39;servermon_rw&#39;@&#39;localhost&#39; IDENTIFIED BY &#39;$erv3rM0n!&#39;;<br />
  56. FLUSH PRIVILEGES;<br />
  57. EXIT;<br />
  58. exit</div>
  59. </li>
  60. <li>Continue with the following commands to download and extract PHP Server Monitor in the Apache webroot
  61. <div class="codeBlock"># download latest PHP Server Monitor<br />
  62. wget -O phpservermon.tar.gz https://github.com/phpservermon/phpservermon/releases/download/v3.5.2/phpservermon-3.5.2.tar.gz<br />
  63. # extract the tar.gz<br />
  64. sudo tar xzvf phpservermon.tar.gz --directory /var/www/html<br />
  65. # rename the extracted folder<br />
  66. sudo mv /var/www/html/phpservermon-3.5.2 /var/www/html/monitor<br />
  67. # create config.php placeholder<br />
  68. sudo touch /var/www/html/monitor/config.php<br />
  69. # set the owner of the new monitor directory to www-data<br />
  70. sudo chown -R www-data:www-data /var/www/html/monitor<br />
  71. # set the PHP timezone, change the timezone as needed before running<br />
  72. sudo sed -i &quot;s/^;date.timezone =/\date.timezone = America\/New_York/&quot; /etc/php/7.3/apache2/php.ini<br />
  73. # restart apache2 service for the changes to take effect<br />
  74. sudo systemctl restart apache2</div>
  75. </li>
  76. <li>Open a web browser and navigate to http://DNSorIP/monitor/install.php</li>
  77. <li>The PHP Server Monitor setup screen should be displayed</li>
  78. <li>Click the Let&#39;s Go button</li>
  79. <li>Fill out the database connetion information as follows
  80. <p>Database host: localhost<br />
  81. Database port: 3306<br />
  82. Database name: server_monitor<br />
  83. Database user: servermon_rw<br />
  84. Database password: $erv3rM0n!<br />
  85. Table prefix:</p>
  86. </li>
  87. <li>Click Save configuration</li>
  88. <li>Refresh the page</li>
  89. <li>Create an administrator account by entering a username, password and email address &gt; Click Install</li>
  90. <li>After the installation completes click Go to your monitor</li>
  91. <li>Login with the administator account created earlier</li>
  92. <li>Welcome to PHP Server Monitor</li>
  93. </ol>
  94. <p>Source: <a href="https://github.com/phpservermon/phpservermon" target="_blank">https://github.com/phpservermon/phpservermon</a></p> </div>
  95. </div>
  96. </body>
  97. </html>