| Both sides previous revisionPrevious revisionNext revision | Previous revision |
| servers:windows:nginx:mybb [2026/01/20 11:38] – [config.php] Sean Rhone | servers:windows:nginx:mybb [2026/04/15 10:06] (current) – [PHP-CGI] Sean Rhone |
|---|
| ====== Database ====== | ====== Database ====== |
| |
| "%ProgramFiles%\MariaDB 12.2\bin\mariadb.exe" -u "root" | "%ProgramFiles%\MariaDB 12.3\bin\mariadb.exe" -u "root" |
| |
| CREATE DATABASE mybb; | CREATE DATABASE mybb; |
| ===== PHP ===== | ===== PHP ===== |
| |
| "notepad.exe" "%SystemDrive%\www\php\forum.ini" | "%SystemRoot%\System32\notepad.exe" "%SystemDrive%\www\php\forum.ini" |
| |
| <code> | <code> |
| ===== PHP-CGI ===== | ===== PHP-CGI ===== |
| |
| "notepad.exe" "%SystemDrive%\www\nginx\default.d\forum.conf" | "%SystemRoot%\System32\notepad.exe" "%SystemDrive%\www\nginx\default.d\forum.conf" |
| |
| <code> | <code> |
| ===== Server Block ===== | ===== Server Block ===== |
| |
| "notepad.exe" "%SystemDrive%\www\nginx\vhosts.d\forum.conf" | "%SystemRoot%\System32\notepad.exe" "%SystemDrive%\www\nginx\vhosts.d\forum.conf" |
| |
| <code> | <code> |
| MKDIR "%SystemDrive%\www\scripts\forum" | MKDIR "%SystemDrive%\www\scripts\forum" |
| |
| "explorer.exe" "%SystemDrive%\www\scripts\forum" | "%SystemRoot%\explorer.exe" "%SystemDrive%\www\scripts\forum" |
| |
| ===== PHP-CGI ===== | ===== PHP-CGI ===== |
| |
| "notepad.exe" "%SystemDrive%\www\scripts\forum\PHP-CGI.bat" | "%SystemRoot%\System32\notepad.exe" "%SystemDrive%\www\scripts\forum\PHP-CGI.bat" |
| |
| <code> | <code> |
| SET "PHP_FCGI_CHILDREN=1" | SET "PHP_FCGI_CHILDREN=1" |
| |
| START "Forum PHP-CGI" /MIN "php-cgi.exe" -b "127.0.0.1:9006" -c "%SystemDrive%\www\php\forum.ini" -q | START "Forum PHP-CGI" /MIN /D "%Temp%" "php-cgi.exe" -b "127.0.0.1:9006" -c "%SystemDrive%\www\php\forum.ini" -q |
| |
| SET "PHP_FCGI_MAX_REQUESTS=" | SET "PHP_FCGI_MAX_REQUESTS=" |
| ===== Update ===== | ===== Update ===== |
| |
| "notepad.exe" "%SystemDrive%\www\scripts\forum\Update.bat" | "%SystemRoot%\System32\notepad.exe" "%SystemDrive%\www\scripts\forum\Update.bat" |
| |
| <code> | <code> |
| ===== Back-up ===== | ===== Back-up ===== |
| |
| "notepad.exe" "%SystemDrive%\www\scripts\forum\Back-up.bat" | "%SystemRoot%\System32\notepad.exe" "%SystemDrive%\www\scripts\forum\Back-up.bat" |
| |
| <code> | <code> |
| CD "%Temp%" | CD "%Temp%" |
| |
| "tar.exe" -czf "D:\Servers\Scheduled Backups\mybb-files-auto-%RANDOM%.tar.gz" -C "%SystemDrive%\www" "forum" | "%SystemRoot%\System32\tar.exe" -czf "D:\Servers\Scheduled Backups\mybb-files-auto-%RANDOM%.tar.gz" -C "%SystemDrive%\www" "forum" |
| "%ProgramFiles%\MariaDB 12.2\bin\mariadb-dump.exe" -u "root" --opt -r "D:\Servers\Scheduled Backups\%RANDOM%-mybb.sql" "mybb" | "%ProgramFiles%\MariaDB 12.3\bin\mariadb-dump.exe" -u "root" --opt --single-transaction -r "D:\Servers\Scheduled Backups\%RANDOM%-mybb.sql" "mybb" |
| |
| ::"tar.exe" -czf "%UserProfile%\Downloads\mybb-files-auto-%RANDOM%.tar.gz" -C "%SystemDrive%\www" "forum" | ::"%SystemRoot%\System32\tar.exe" -czf "%UserProfile%\Downloads\mybb-files-auto-%RANDOM%.tar.gz" -C "%SystemDrive%\www" "forum" |
| ::"%ProgramFiles%\MariaDB 12.2\bin\mariadb-dump.exe" -u "root" --opt -r "%UserProfile%\Downloads\%RANDOM%-mybb.sql" "mybb" | ::"%ProgramFiles%\MariaDB 12.3\bin\mariadb-dump.exe" -u "root" --opt --single-transaction -r "%UserProfile%\Downloads\%RANDOM%-mybb.sql" "mybb" |
| |
| :: End</code> | :: End</code> |
| ===== Maintenance ===== | ===== Maintenance ===== |
| |
| "notepad.exe" "%SystemDrive%\www\scripts\forum\Maintenance.bat" | "%SystemRoot%\System32\notepad.exe" "%SystemDrive%\www\scripts\forum\Maintenance.bat" |
| |
| <code> | <code> |
| ===== Git Fix ===== | ===== Git Fix ===== |
| |
| * :!: Set email for ''user.email'' | * :!: Set ''user.email'' |
| |
| "notepad.exe" "%SystemDrive%\www\scripts\forum\Git Fix.bat" | "%SystemRoot%\System32\notepad.exe" "%SystemDrive%\www\scripts\forum\Git Fix.bat" |
| |
| <code> | <code> |
| * Auto-start | * Auto-start |
| |
| SCHTASKS /Create /SC "ONLOGON" /TN "Forum PHP-CGI" /TR "%SystemDrive%\www\scripts\forum\PHP-CGI.bat" /F | "%SystemRoot%\System32\schtasks.exe" /Create /SC "ONLOGON" /TN "Forum PHP-CGI" /TR "%SystemDrive%\www\scripts\forum\PHP-CGI.bat" /F |
| |
| ===== Update ===== | ===== Update ===== |
| * Daily ''05:00:00 AM'' | * Daily ''05:00:00 AM'' |
| |
| SCHTASKS /Create /SC "DAILY" /TN "Forum Update" /TR "%SystemDrive%\www\scripts\forum\Update.bat" /ST "05:00" /F | "%SystemRoot%\System32\schtasks.exe" /Create /SC "DAILY" /TN "Forum Update" /TR "%SystemDrive%\www\scripts\forum\Update.bat" /ST "05:00" /F |
| |
| ===== Back-up ===== | ===== Back-up ===== |
| * Monthly (6th) ''05:10:00 AM'' | * Monthly (6th) ''05:10:00 AM'' |
| |
| SCHTASKS /Create /SC "MONTHLY" /D "6" /M "*" /TN "Forum Back-up" /TR "%SystemDrive%\www\scripts\forum\Back-up.bat" /ST "05:10" /F | "%SystemRoot%\System32\schtasks.exe" /Create /SC "MONTHLY" /D "6" /M "*" /TN "Forum Back-up" /TR "%SystemDrive%\www\scripts\forum\Back-up.bat" /ST "05:10" /F |
| |
| ===== Maintenance ===== | ===== Maintenance ===== |
| * Monthly (6th) ''05:30:00 AM'' | * Monthly (6th) ''05:30:00 AM'' |
| |
| SCHTASKS /Create /SC "MONTHLY" /D "6" /M "*" /TN "Forum Maintenance" /TR "%SystemDrive%\www\scripts\forum\Maintenance.bat" /ST "05:30" /F | "%SystemRoot%\System32\schtasks.exe" /Create /SC "MONTHLY" /D "6" /M "*" /TN "Forum Maintenance" /TR "%SystemDrive%\www\scripts\forum\Maintenance.bat" /ST "05:30" /F |
| |
| ====== Initial Setup ====== | ====== Initial Setup ====== |
| ===== config.php ===== | ===== config.php ===== |
| |
| "notepad.exe" "%SystemDrive%\www\forum\inc\config.php" | "%SystemRoot%\System32\notepad.exe" "%SystemDrive%\www\forum\inc\config.php" |
| |
| $config['database']['hostname'] = 'localhost'; | $config['database']['hostname'] = 'localhost'; |
| **** | **** |
| |
| "tar.exe" -czf "%UserProfile%\Downloads\mybb-files-manual-%RANDOM%.tar.gz" -C "%SystemDrive%\www" "forum" | "%SystemRoot%\System32\tar.exe" -czf "%UserProfile%\Downloads\mybb-files-manual-%RANDOM%.tar.gz" -C "%SystemDrive%\www" "forum" |
| |
| ===== Database ===== | ===== Database ===== |
| **** | **** |
| |
| CD "%UserProfile%\Downloads" && "%ProgramFiles%\MariaDB 12.2\bin\mariadb-dump.exe" -u "root" --opt -r "mybb.sql" "mybb" | "%ProgramFiles%\MariaDB 12.3\bin\mariadb-dump.exe" -u "root" --opt --single-transaction -r "%UserProfile%\Downloads\mybb.sql" "mybb" |
| |
| ====== Restore ====== | ====== Restore ====== |
| * [[#database|Initial set-up]] | * [[#database|Initial set-up]] |
| |
| "%ProgramFiles%\MariaDB 12.2\bin\mariadb.exe" -u "root" --execute="CREATE DATABASE mybb" | "%ProgramFiles%\MariaDB 12.3\bin\mariadb.exe" -u "root" --execute="CREATE DATABASE mybb" |
| |
| "%ProgramFiles%\MariaDB 12.2\bin\mariadb.exe" -u "root" "mybb" < "%UserProfile%\Downloads\mybb.sql" | "%ProgramFiles%\MariaDB 12.3\bin\mariadb.exe" -u "root" "mybb" < "%UserProfile%\Downloads\mybb.sql" |
| |