瀏覽代碼

0558: Running PHP Server Monitor in Docker on Linux

i12bretro 1 年之前
父節點
當前提交
a273f07d3d
共有 1 個文件被更改,包括 80 次插入0 次删除
  1. 80 0
      0558.html

+ 80 - 0
0558.html

@@ -0,0 +1,80 @@
+    <!DOCTYPE html>
+    <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
+      <head>
+        <title>Running PHP Server Monitor in Docker on Linux</title>
+        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+        <meta charset="UTF-8">
+        <meta name="keywords" content="Browser Based,Home Lab,Home Lab Ideas,Install Guide,Self-Hosted,Web Based,Web Based Tools,Container,Containerize,Docker,Docker Container,Docker How To,Docker Installation Tutorial,Docker Made Easy,Docker Simplified,Docker Made Simple,PHP,Ubuntu,Linux,Homelab,Getting Started With Docker,PHP Server Monitor,PHPServerMonitor,How To,Tutorial,i12bretro">
+        <meta name="author" content="i12bretro">
+        <meta name="description" content="Running PHP Server Monitor in Docker on Linux">
+        <meta name="viewport" content="width=device-width, initial-scale=1.0">
+        <meta name="revised" content="10/27/2023 02:18:06 PM" />
+				          <link rel="icon" type="image/x-icon" href="includes/favicon.ico">
+				  <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
+				        <script type="text/javascript" src="includes/js/steps.js"></script>
+        <link href="css/steps.css" rel="stylesheet" type="text/css" />
+      </head>
+      <body>
+        <div id="gridContainer">
+          <div class="topMargin"></div>
+          <div id="listName" class="topMargin">
+            <h1>Running PHP Server Monitor in Docker on Linux</h1>
+          </div>
+          <div></div>
+          <div id="content">
+          <h2>What is PHP Server Monitor</h2>
+
+<blockquote><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></blockquote>
+
+<h2>Installing Docker</h2>
+
+<ol>
+	<li>Log into the Linux based device</li>
+	<li>Run the following commands in the terminal
+	<div class="codeBlock"># install prerequisites<br />
+	sudo apt install apt-transport-https ca-certificates curl software-properties-common gnupg-agent -y<br />
+	# add docker gpg key<br />
+	curl -fsSL https://download.docker.com/linux/$(awk -F&#39;=&#39; &#39;/^ID=/{ print $NF }&#39; /etc/os-release)/gpg | sudo apt-key add -<br />
+	# add docker software repository<br />
+	sudo add-apt-repository &quot;deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/$(awk -F&#39;=&#39; &#39;/^ID=/{ print $NF }&#39; /etc/os-release) $(lsb_release -cs) stable&quot;<br />
+	# install docker<br />
+	sudo apt install docker-ce docker-compose containerd.io -y<br />
+	# enable and start docker service<br />
+	sudo systemctl enable docker &amp;&amp; sudo systemctl start docker<br />
+	# add the current user to the docker group<br />
+	sudo usermod -aG docker $USER<br />
+	# reauthenticate for the new group membership to take effect<br />
+	su - $USER</div>
+	</li>
+</ol>
+
+<h2>Running PHP Server Monitor</h2>
+
+<ol>
+	<li>Now that Docker is installed, run the following commands to setup the PHP Server Monitor Docker container and run it
+	<div class="codeBlock"># run the PHP Server Monitor docker container<br />
+	# create working directories<br />
+	mkdir /home/$USER/docker/mariadb -p<br />
+	# set owner of working directories<br />
+	sudo chown &quot;$USER&quot;:&quot;$USER&quot; /home/&quot;$USER&quot;/docker -R<br />
+	# create phpServerMonitor network<br />
+	docker network create phpServerMonitor<br />
+	# run the php server monitor docker container<br />
+	docker run -d --name phpservermonitor --network phpServerMonitor -p 8080:80 -e MYSQL_HOST=db -e MYSQL_USER=servermon_rw -e MYSQL_PASSWORD=Serv3rM0n! -e MYSQL_DATABASE=server_monitor -e MYSQL_DATABASE_PREFIX= -e TIME_ZONE=&#39;America/New_York&#39; -e PSM_REFRESH_RATE_SECONDS=60 -e PSM_AUTO_CONFIGURE=true -v /sessions --restart=unless-stopped phpservermonitor/phpservermon:latest<br />
+	# run the mariadb docker container<br />
+	docker run -d --name mariadb --network phpServerMonitor --network-alias db -e MYSQL_ROOT_PASSWORD=r00tp@ss -e MYSQL_USER=servermon_rw -e MYSQL_PASSWORD=Serv3rM0n! -e MYSQL_DATABASE=server_monitor -v /home/$USER/docker/mariadb:/var/lib/mysql --restart=unless-stopped mariadb:latest</div>
+	</li>
+	<li>Open a web browser and navigate to http://DNSorIP:8080/install.php</li>
+	<li>The PHP Server Monitor setup screen should be displayed</li>
+	<li>Click the Let&#39;s Go button</li>
+	<li>Create an administrator account by entering a username, password and email address &gt; Click Install</li>
+	<li>After the installation completes click Go to your monitor</li>
+	<li>Login with the administator account created earlier</li>
+	<li>Welcome to PHP Server Monitor</li>
+</ol>
+
+<p>Documentation: <a href="https://hub.docker.com/r/phpservermonitor/phpservermon" target="_blank">https://hub.docker.com/r/phpservermonitor/phpservermon</a></p>          </div>
+        </div>
+      </body>
+    </html>
+