0932.html 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <!DOCTYPE html>
  2. <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <title>Run MyBB - Open Source Forum Software - in Docker</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,Docker Made Easy,Home Lab,Home Lab Ideas,Install Guide,Self-Hosted,Web Based,Web Based Tools,Bulletin Board,Debian,Forum,Homelab,Run MyBB In Docker,Linux,MariaDB,MyBB,MySQL,PHP,PHP Based Application,PHP Based Forum,Self-Hosted Forum,Ubuntu,Docker,Docker Container,Docker How To,Docker Made Simple,Docker Simplified,Docker Tutorial,How To,Tutorial,i12bretro">
  8. <meta name="author" content="i12bretro">
  9. <meta name="description" content="Run MyBB - Open Source Forum Software - in Docker">
  10. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  11. <meta name="revised" content="05/24/2024 01:09:49 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>Run MyBB - Open Source Forum Software - in Docker</h1>
  22. </div>
  23. <div></div>
  24. <div id="content">
  25. <h2>What is MyBB?</h2>
  26. <blockquote>MyBB is the free and open source forum software powering thousands of engaging, vibrant, and unique communities across the internet.<i> - <a href="https://mybb.com/" target="_blank">https://mybb.com/</a></i></blockquote>
  27. <h2>Installing Docker</h2>
  28. <ol>
  29. <li>Log into the Linux host and run the following commands in a terminal window
  30. <div class="codeBlock"># install prerequisites<br />
  31. sudo apt install apt-transport-https ca-certificates curl software-properties-common gnupg-agent -y<br />
  32. # add docker gpg key<br />
  33. 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 />
  34. # add docker software repository<br />
  35. 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 />
  36. # install docker<br />
  37. sudo apt install docker-ce docker-compose containerd.io -y<br />
  38. # enable and start docker service<br />
  39. sudo systemctl enable docker &amp;&amp; sudo systemctl start docker<br />
  40. # add the current user to the docker group<br />
  41. sudo usermod -aG docker $USER<br />
  42. # reauthenticate for the new group membership to take effect<br />
  43. su - $USER</div>
  44. </li>
  45. </ol>
  46. <h2>Running MyBB Container</h2>
  47. <ol>
  48. <li>Continue with the following commands in a terminal window
  49. <div class="codeBlock"># create working directories<br />
  50. mkdir ~/docker/mybb -p &amp;&amp; mkdir ~/docker/postgresql -p &amp;&amp; mkdir ~/docker/nginx -p<br />
  51. # set owner of docker directory<br />
  52. sudo chown &quot;$USER&quot;:&quot;$USER&quot; ~/docker -R<br />
  53. # allow the container to write to working directories<br />
  54. sudo chmod a+rwx -R ~/docker/mybb<br />
  55. # download the nginx conf file<br />
  56. wget -O ~/docker/nginx/default.conf https://gist.githubusercontent.com/kawaii/ed2fbbf11309b8f635a623fa87abce8d/raw/3a5a6e36b238e55aaef519693ca16c82fbafd2fd/default.conf<br />
  57. # create containers network<br />
  58. docker network create containers<br />
  59. # run the postgesql container<br />
  60. docker run -d --name postgres --network containers -p 5432:5432 -e POSTGRES_USER=mybb_rw -e POSTGRES_PASSWORD=My44_rw$ -e POSTGRES_DB=mybb -v ~/docker/postgresql:/var/lib/postgresql/data --restart=unless-stopped postgres:latest<br />
  61. # run the mybb container<br />
  62. docker run -d --name mybb -v ~/docker/mybb:/var/www/html:rw --network containers --restart=unless-stopped mybb/mybb<br />
  63. # run nginx webserver container<br />
  64. docker run -d --name nginx --network containers -p 8081:80 -v ~/docker/mybb:/var/www/html:ro -v ~/docker/nginx:/etc/nginx/conf.d:ro --restart=unless-stopped nginx</div>
  65. </li>
  66. <li>Open a web browser and navigate to http://DNSorIP:8081</li>
  67. <li>Click Next at the Welcome screen</li>
  68. <li>Click Next at the License Agreement</li>
  69. <li>Click Next at the Requirements Check</li>
  70. <li>Complete the Database Configuration as shown below
  71. <p>Database Engine: PostgreSQL<br />
  72. <br />
  73. Database Server Hostname: postgres<br />
  74. Database Username: mybb_rw<br />
  75. Database Password: My44_rw$<br />
  76. Database Name: mybb<br />
  77. <br />
  78. Table Prefix: mybb_</p>
  79. </li>
  80. <li>Click Next after the table creation completes</li>
  81. <li>Click Next to complete the Table Population</li>
  82. <li>Click Next at the Theme Insertion screen</li>
  83. <li>Modify the Board Configuration form as needed &gt; Click Next</li>
  84. <li>Create an administrator account by entering a Username, Password and Email Address &gt; Click Next</li>
  85. <li>Click the Admin Control Panel link</li>
  86. <li>Login with the administrator username and password created earlier</li>
  87. <li>Welcome to MyBB</li>
  88. </ol>
  89. <p>Documentation: <a href="https://github.com/mybb/docker" target="_blank">https://github.com/mybb/docker</a></p> </div>
  90. </div>
  91. </body>
  92. </html>