This post is directed to Celeron55. Celeron55, this is the latest draft of the forum snapshot setup instructions.This is the README file for the Minetest forums snapshot tarball.
The tarball contains a copy of the Minetest forums from "forum.minetest.net" with private information removed. The snapshot is suitable for creating a read-only copy of the forums.
The procedure to be used is roughly as follows. This is simply an outline. You'll need to modify the sample paths used and/or make other changes.
1. Start with a Linux server which is running some type of httpd daemon, such as apache, nginx, or lighttpd. Debian is recommended, but other distros should work as well. You'll need MySQL and PHP5 in addition to the httpd daemon.
If you know what you're doing, you can substitute MariaDB for MySQL and HHVM for PHP5. Note: HHVM may be faster than PHP5, but it's limited to 64-bit distros; 32-bit distros aren't supported.
If you use PHP5 as opposed to HHVM, make sure that PHP5 was compiled with FPM support.
2. Configure the httpd daemon so as to properly enable support for PHP5 and FastCGI. The steps required will depend on the daemon used.
3. Download the snapshot tarball to some folder. The link is provided separately. The CLI commands used might be similar to the following:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
mkdir -p /var/bacon
cd /var/bacon
wget https://forum.minetest.net/forum.minetest.net_public_NUMBERS.tgz
4. The download might take 10 to 30 minutes. While it's running, in a separate CLI session, go to the top-level folder of your website documents tree. For example, depending on how you've set things up, this might be "/var/www" or "/var/www/minetest".
Remove any existing forum and/or phpBB3 folders, then unpack a fresh copy of phpBB3 3.0.12 and move it into place. Subsequently, set ownership and permissions appropriately.
The CLI commands to be used might go roughly as follows. Modify the "/var/www" path, "www-data" user name, and "www-data" group name used here appropriately for your system.
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
cd /var/www
rm -fr forum phpBB3
wget https://www.phpbb.com/files/release/phpBB-3.0.12.zip
unzip -q phpBB-3.0.12.zip
mv phpBB3 forum
chown -R www-data.www-data forum
chmod 770 forum/images/avatars/upload
5. Create an appropriate MySQL database. Shell commands similar to the following should work:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
DBROOTPASS=bacon # Put your system's MySQL root password here:
DBUSER=phpbb3
DBNAME=phpbb3
DBPASS=eggs # Put the desired forum-level MySQL admin password here
mysql -uroot -p$DBROOTPASS << END
# Set up database
drop database if exists $DBNAME;
create database $DBNAME;
use $DBNAME;
# Set up database user
grant usage on *.* to '$DBUSER'@'localhost';
drop user '$DBUSER'@'localhost';
create user '$DBUSER'@'localhost' identified by '$DBPASS';
grant all on $DBNAME.* TO '$DBUSER'@'localhost';
END
6. Set up phpBB3 as you would normally. To initiate the process, run a web browser and go to your website but add "/forum" to the link. For example:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
If your website is: www.minetest.bacon
Go to: www.minetest.bacon/forum
Important: When you get to the part about database prefix, set the prefix string to "mtfprefix_" (including the underscore).
For database name, database user name, and database password, use the settings that you specified in step 5.
7. After phpBB3 installation is completed, rename the "install" subfolder under the "forum" folder to "install.old".
8. Wait for the download that you started in step 3 to complete.
9. Unpack the downloaded tarball. You should find a large SQL file somewhere in the resulting directory tree and also a folder named "phpbb".
10. Merge the contents of the "phpbb" folder that you just unpacked into the "forum" folder created previously. For example, CLI commands similar to the following might work. Modify the "/bacon" path, "/var/www" path, "www-data" user name, and "www-data" group name used here appropriately for your system.
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
cp -r /bacon/phpbb/* /var/www/forum/
chown -R www-data.www-data /var/www/forum/
11. Update the MySQL database. To do this, use a CLI command similar to the following. $DBNAME, $DBUSER, and $DBPASS should be the associated values from step 5. Modify the pathname for the SQL file appropriately.
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
cat /bacon/minetest_forum_public.sql | mysql -u$DBUSER -p$DBPASS $DBNAME
12. Run a web browser and go to the link that you used in step 6. Press Reload. The forums should appear.
13. You might wish to set up an administrator user. There are two ways to do this:
(13a) If you have an existing Minetest forums account, you can promote yourself to administrator in your copy of the snapshot. To do this, execute MySQL commands similar to the following in MySQL or via a shell script similar to the one used in step 5. The UPDATE command should be all on one line; we've broken up the line here for readability.
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
USE phpbb3;
UPDATE mtfprefix_users
SET user_password='\$H\$BkadjjyVQ/RwfjMJ8/RusT9kHRj9lQ0',
user_type=3,
user_login_attempts=0
WHERE username='your_existing_username';
(13b) Alternatively, you can create a new administrator via MySQL, but this is a kludge and will only work partially. To do this, execute MySQL commands similar to the following in MySQL or via a shell script similar to the one used in step 5. The INSERT INTO command should be all on one line; we've broken up the line here for readability.
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
USE phpbb3;
INSERT INTO mtfprefix_users
(user_type, group_id, user_permissions, username, username_clean, user_password)
VALUES (3,3,10,'tmpadmin','tmpadmin','\$H\$BkadjjyVQ/RwfjMJ8/RusT9kHRj9lQ0');
For (13b), the new account name will be "tmpadmin".
The password for both (13a) or (13b) will be "manyblocks" initially. This should be changed as soon as possible. To do this, log-in as the appropriate user, go to the User Control Panel, and modify the password there. Then log-out and log-in again to test the results.
If you elect to try (13b), another step is required. Go to the Administrator Control Panel and use the group management features there to add the new administrator account to the Registered Members group. If you neglect to do this, the new account won't be able to see forum posts.
14. After things are basically working, you might wish to disable the captcha and/or make other tweaks.