{"id":5309,"date":"2014-11-05T11:07:21","date_gmt":"2014-11-05T17:07:21","guid":{"rendered":"https:\/\/secure.rosehosting.com\/blog\/?p=5309"},"modified":"2022-12-16T04:42:52","modified_gmt":"2022-12-16T10:42:52","slug":"install-php-server-monitor-on-a-centos-7-linux-vps","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/install-php-server-monitor-on-a-centos-7-linux-vps\/","title":{"rendered":"Install PHP Server Monitor on a CentOS 7 Linux VPS"},"content":{"rendered":"
PHP Server Monitor is an open source PHP script for monitoring. In this tutorial we will guide you through the steps of installing PHP Server Monitor on a CentOS 7 VPS<\/a><\/p>\n In order to run PHP Server Monitor your server need to meet the following requirements:<\/p>\n Before we start with the installation of PHP Server Monitor, log in to your server as user ‘root’ and make sure that all packages are up to date.<\/p>\n Install the following requirements<\/p>\n Now, go to PHP Server Monitor’s official website and download the latest stable release. At the moment of writing this article it is version 3.1.0<\/p>\n Unpack the zip package in the document root directory.<\/p>\n Change the current working directory<\/p>\n Since the package is unpacked in new ‘phpservermon-3.1.0’ directory, we will rename the directory to something simpler<\/p>\n Make the Apache user to be owner of all directories and files<\/p>\n To find the correct Apache user you can execute<\/p>\n So, in our case it is the ‘apache’ user.<\/p>\n Next, log in to your MySQL server and create new database and user for PHP Server Monitor<\/p>\n Change ‘YOURPASSWORD<\/em>‘ with an actual strong password.<\/p>\n You can use the same commands if you run MariaDB instead of MySQL server.<\/p>\n Now, open your favorite web browser and navigate to http\/\/YOURDOMAIN.COM\/phpservermon . PHP Server Monitor will verify if your server meets the requirements.<\/p>\n <\/p>\n On the next screen you will be prompted to enter the information of the newly created MySQL database.<\/p>\n <\/p>\n If PHP Server Monitor complains that it cannot create a configuration file as shown in the picture below, you can manually create it.<\/p>\n <\/p>\n Create a config.php file<\/p>\n with the following content<\/p>\n Save the file and click ‘I have saved the configuration’<\/p>\n Now, you will need to create a new account to access your monitor<\/p>\n <\/p>\n Once you create the new account the installation is completed. On the next screen you can check if error have occurred. If you followed the steps above, the installation should be completed with no errors.<\/p>\n For more information on how to configure and use PHP Server Monitor you can check their documentation<\/a>.<\/p>\n Of course you don\u2019t have to do any of this if you use one of our Linux VPS Hosting<\/a> services, in which case you can simply ask our expert Linux admins to install PHP Server Monitor for you. They are available 24\u00d77 and will take care of your request immediately.<\/p>\n PS<\/span>.<\/strong> If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.<\/p>\n","protected":false},"excerpt":{"rendered":" PHP Server Monitor is an open source PHP script for monitoring. It checks whether your websites and servers on your … <\/p>\n
\nIt checks whether your websites and servers on your Linux VPS<\/a> are up and running.
\nIt comes with a web based user interface where you can manage your services and websites, check graphs of uptime, latency, etc…<\/p>\n\n
yum -y update<\/pre>\n
yum install php-common unzip<\/pre>\n
wget http:\/\/downloads.sourceforge.net\/project\/phpservermon\/phpservermon\/PHP%20Server%20Monitor%20v3.1.0\/phpservermon-3.1.0.zip<\/pre>\n
unzip phpservermon-3.1.0.zip -d \/var\/www\/html\/<\/pre>\n
cd \/var\/www\/html\/<\/pre>\n
mv phpservermon-3.1.0 phpservermon<\/pre>\n
chown -R apache:apache phpservermon<\/pre>\n
grep '^User' \/etc\/httpd\/conf\/httpd.conf\r\nUser apache<\/pre>\n
mysql -u root -p\r\nCREATE DATABASE phpservermon;\r\nGRANT ALL PRIVILEGES ON phpservermon.* TO 'phpservermonuser'@localhost IDENTIFIED BY 'YOURPASSWORD' WITH GRANT OPTION;\r\nFLUSH PRIVILEGES;<\/pre>\n
cd phpservermon\/\r\nnano config.php<\/pre>\n
<?php\r\ndefine('PSM_DB_HOST', 'localhost');\r\ndefine('PSM_DB_NAME', 'phpservermon');\r\ndefine('PSM_DB_USER', 'phpservermonuser');\r\ndefine('PSM_DB_PASS', 'YOURPASSWORD');\r\ndefine('PSM_DB_PREFIX', 'psm_');<\/pre>\n