Both sides previous revisionPrevious revisionNext revision | Previous revision |
servers:windows:nginx:mybb [2025/10/10 06:34] – Sean Rhone | servers:windows:nginx:mybb [2025/10/11 09:15] (current) – Sean Rhone |
---|
====== Information ====== | ====== Information ====== |
| |
* MyBB | * MyBB ((https://mybb.com/)) |
* [[information:realm_of_espionage|Realm of Espionage]] | * [[information:realm_of_espionage|Realm of Espionage]] |
* https://forums.realmofespionage.xyz | * https://forums.realmofespionage.xyz |
* 2025/09/27: WIP | |
| |
===== Prerequisites ===== | ===== Prerequisites ===== |
| |
* [[linux:distros:server:opensuse_tumbleweed_server|openSUSE Tumbleweed (Server)]] | * [[windows;11_ltsc_server|Windows 11 (24H2)]] |
* [[servers:linux:nginx_php_php-fpm|nginx + PHP + PHP-FPM]] | * [[servers;windows;nginx_php_php-cgi|nginx + PHP + PHP-CGI]] |
* [[servers:linux:nginx:lets_encrypt|Certbot (Let's Encrypt)]] | * [[servers;windows;nginx;lets_encrypt|Certbot (Let's Encrypt)]] |
* [[servers:linux:mariadb|MariaDB]] | * [[programs;windows;git|Git]] |
| * [[servers;windows;mariadb|MariaDB]] |
| |
| |
| * TODO: ''listen = "127.0.0.1:9006"'' |
| |
====== Dependencies ====== | ====== Dependencies ====== |
* https://docs.mybb.com/1.8/install/requirements/ | * https://docs.mybb.com/1.8/install/requirements/ |
* https://docs.mybb.com/1.8/install/anonymous-statistics/ | * https://docs.mybb.com/1.8/install/anonymous-statistics/ |
| |
sudo zypper install php-composer2 | |
| |
====== Download Source ====== | ====== Download Source ====== |
* https://github.com/mybb/mybb/commits/dev-1.9/ | * https://github.com/mybb/mybb/commits/dev-1.9/ |
| |
sudo git clone --branch 'dev-1.9' --depth '1' --recurse-submodules 'https://github.com/mybb/mybb.git' '/srv/www/forum' && sudo chown -R 'wwwrun':'www' '/srv/www/forum' && sudo chmod -R '0755' '/srv/www/forum' | "%ProgramFiles%\Git\bin\git.exe" clone --branch "dev-1.9" --depth "1" --recurse-submodules "https://github.com/mybb/mybb.git" "%SystemDrive%\www\forum" |
| |
| ====== Database ====== |
| |
| "%ProgramFiles%\MariaDB 12.1\bin\mariadb.exe" -u "root" -p |
| |
| CREATE DATABASE mybb; |
| |
| CREATE USER 'mybb'@'localhost' IDENTIFIED BY 'x'; |
| |
| GRANT ALL PRIVILEGES ON mybb.* to 'mybb'@'localhost'; |
| |
| FLUSH PRIVILEGES; |
| |
| EXIT |
| |
====== Environment ====== | ====== Environment ====== |
| |
* https://github.com/mybb/mybb/wiki/Getting-started-with-MyBB-1.9-development---Composer | ===== PHP ===== |
| |
===== Composer ===== | "notepad.exe" "%SystemDrive%\www\php\forum.ini" |
| |
sudo su 'wwwrun' -s '/bin/bash' | <code> |
| [PHP] |
| ; Modules |
| extension_dir = ".\ext" |
| extension = "curl" |
| extension = "gd" |
| extension = "intl" |
| extension = "ldap" |
| extension = "mysqli" |
| extension = "openssl" |
| extension = "sodium" |
| |
cd '/tmp' && composer --working-dir='/srv/www/forum' --no-cache install --no-dev | ; Settings |
| post_max_size = "5M" |
| upload_max_filesize = "5M" |
| error_reporting = "E_ERROR" |
| display_errors = "Off" |
| |
exit | [Date] |
| date.timezone = "America/New_York" |
| |
====== Database ====== | ; End</code> |
| |
sudo mariadb | "php.exe" -c "%SystemDrive%\www\php\forum.ini" -m |
| |
CREATE DATABASE mybb; | ===== Composer ===== |
| |
CREATE USER 'mybb'@'localhost' IDENTIFIED BY 'x'; | * https://github.com/mybb/mybb/wiki/Getting-started-with-MyBB-1.9-development---Composer |
| * [[https://github.com/composer/composer/releases/latest/download/composer.phar|composer.phar]] |
| |
GRANT ALL PRIVILEGES ON mybb.* to 'mybb'@'localhost'; | MKDIR "%SystemDrive%\www\ext" |
| |
FLUSH PRIVILEGES; | "%SystemDrive%\www\ext\composer.phar" |
| |
EXIT | "php.exe" -c "%SystemDrive%\www\php\forum.ini" "%SystemDrive%\www\ext\composer.phar" --version |
| |
| CD "%SystemDrive%\www\forum" && "php.exe" -c "%SystemDrive%\www\php\forum.ini" "%SystemDrive%\www\ext\composer.phar" install --no-dev |
| |
====== nginx + PHP-FPM Configuration ====== | ====== nginx + PHP-FPM Configuration ====== |
===== Git Fix ===== | ===== Git Fix ===== |
| |
* :!: Set email for both ''user.email'' | * :!: Set email for ''user.email'' |
| |
"notepad.exe" "%SystemDrive%\www\scripts\media\Git Fix.bat" | "notepad.exe" "%SystemDrive%\www\scripts\forum\Git Fix.bat" |
| |
<code> | <code> |
@echo off | @echo off |
| |
:: Piwigo | RMDIR /S /Q "%SystemDrive%\www\forum\.git" |
RMDIR /S /Q "%SystemDrive%\www\media\.git" | |
| |
"%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media" init --initial-branch="master" | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\forum" init --initial-branch="dev-1.9" |
"%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media" add "." | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\forum" add "." |
"%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media" config "user.email" "espionage724@x" | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\forum" config "user.email" "espionage724@x" |
"%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media" commit --message="x" | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\forum" commit --message="x" |
| |
"%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media" remote add "origin" "https://github.com/Piwigo/Piwigo.git" | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\forum" remote add "origin" "https://github.com/mybb/mybb.git" |
"%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media" pull --depth "1" --recurse-submodules "origin" "master" --rebase | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\forum" pull --depth "1" --recurse-submodules "origin" "dev-1.9" --rebase |
"%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media" reset --hard "origin/master" | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\forum" reset --hard "origin/dev-1.9" |
| |
"%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media" gc --aggressive --prune="all" | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\forum" gc --aggressive --prune="all" |
"%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media" fsck --full --strict | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\forum" fsck --full --strict |
| |
:: Bootstrap Darkroom | |
RMDIR /S /Q "%SystemDrive%\www\media\themes\bootstrap_darkroom\.git" | |
| |
"%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media\themes\bootstrap_darkroom" init --initial-branch="master" | |
"%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media\themes\bootstrap_darkroom" add "." | |
"%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media\themes\bootstrap_darkroom" config "user.email" "espionage724@x" | |
"%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media\themes\bootstrap_darkroom" commit --message="x" | |
| |
"%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media\themes\bootstrap_darkroom" remote add "origin" "https://github.com/Piwigo/piwigo-bootstrap-darkroom.git" | |
"%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media\themes\bootstrap_darkroom" pull --depth "1" --recurse-submodules "origin" "master" --rebase | |
"%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media\themes\bootstrap_darkroom" reset --hard "origin/master" | |
| |
"%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media\themes\bootstrap_darkroom" gc --aggressive --prune="all" | |
"%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media\themes\bootstrap_darkroom" fsck --full --strict | |
| |
PAUSE | PAUSE |
:: End</code> | :: End</code> |
| |
"%SystemDrive%\www\scripts\media\Git Fix.bat" | "%SystemDrive%\www\scripts\forum\Git Fix.bat" |
| |
====== Initial Setup ====== | ====== Initial Setup ====== |