MyBB Image Guide

Version 1.8.10

Websoft9 MyBB is a pre-configured, ready to run image for running MyBB on Alibaba Cloud.

MyBB is the free and open source, intuitive, extensible, and incredibly powerful forum you’ve been looking for.With everything from forums to threads, posts to private messages, search to profiles, and reputation to warnings, MyBB features everything you need to run an efficient and captivating community. Through plugins and themes, you can extend MyBB’s functionality to build your community exactly as you’d like it.

MyBB Stack Components

Software Version: MyBB 1.8.10 Software directory: /data/wwwroot/default/

Basic software environment: LAMP (http://en.websoft9.com/xdocs/php- stack-linux-image-guide/) PHP Configuration File: /usr/local//etc/php.ini Virtual host Configuration File directory: /usr/local/apache/conf/vhost Virtual host Configuration Command: /root/oneinstack/vhost.sh

Database install directory: /usr/local/ data directory: /data/mysql Database Configuration File: /etc/my.cnf  Verify the Image

After the installation of Image,please verify it

Login on Alibaba Cloud console,get you Internet IP Address

Open you Chrome or on your local PC,visit the http://Internet IP Address/ If verify successfully,you can enter the boot page of Websoft9 below

If no response from browser,please check the Security Group settings (https://www.alibabacloud.com/help/doc-detail/25471.htm) to ensure that port 80 is been allowed

Database Password

This Image use MySQL for database

#default user/password:root/123456 MySQL User Guide: Click here (http://en.websoft9.com/xdocs/manage-  mysql%ef%bc%88lnmplamp-image-%ef%bc%89)

Getting Started with MyBB

Step1. Create a database

1.login in MySQL:

Method 1:Use following URL to open phpMyAdmin page: http://< Public net IP >/phpMyAdmin

Method 2:Use SSH command to login in.

mysql -uroot –p #enter mysql console

#default user/password:root/123456 More MySQL User Guide: Click here (http://en.websoft9.com/xdocs/manage-mysql%ef%bc%88lnmplamp- image-%ef%bc%89)

2.create a database:

MySQL [(none)]> create database mydbname;

MySQL [(none)]> show ;

3.Create a Database User and grants permissions to the User:

MySQL [(none)]> grant all privileges on mydbname.* to username@'localhost'

identified by 'userpassword';

MySQL [(none)]> flush privileges;

MySQL [(none)]> exit;

(http://libs.websoft9.com/Websoft9/DocsPicture/en/common/before2.png)

Step2. Add a virtual host

Use SSH Command to Add a virtual host:

[root@iZbp1i4rjdsy216yq7lgucZ ~]# cd /root/oneinstack

[root@iZbp1i4rjdsy216yq7lgucZ oneinstack]# ./vhost.sh

(http://libs.websoft9.com/Websoft9/DocsPicture/en/mybb/mybb00.png)  Step3. Install MyBB

Open your domain name via browser: 1. Click “Next”;

(http://libs.websoft9.com/Websoft9/DocsPicture/en/mybb/mybb01.png) 2. Click “Next”;

(http://libs.websoft9.com/Websoft9/DocsPicture/en/mybb/mybb02.png) 3. Click “Next”; 

(http://libs.websoft9.com/Websoft9/DocsPicture/en/mybb/mybb03.png) 4. Fill in Database Configuration, Click “Next”;

(http://libs.websoft9.com/Websoft9/DocsPicture/en/mybb/mybb04.png) 5. Click “Next”; 

(http://libs.websoft9.com/Websoft9/DocsPicture/en/mybb/mybb05.png) 6. Click “Next”;

(http://libs.websoft9.com/Websoft9/DocsPicture/en/mybb/mybb06.png) 7. Click “Next”;

(http://libs.websoft9.com/Websoft9/DocsPicture/en/mybb/mybb07.png) 8. Set your Forum Configuration, Click “Next”; 

(http://libs.websoft9.com/Websoft9/DocsPicture/en/mybb/mybb08.png) 9. Set your Administrator Account, Click “Next”;

(http://libs.websoft9.com/Websoft9/DocsPicture/en/mybb/mybb10.png) 10. OK, it has been installed successfully,Click “Admin Control Panel”; 

(http://libs.websoft9.com/Websoft9/DocsPicture/en/mybb/mybb11.png) 11. Enter your username and password, Click “login”;

(http://libs.websoft9.com/Websoft9/DocsPicture/en/mybb/mybb12.png)

Admin Control Panel:

(http://libs.websoft9.com/Websoft9/DocsPicture/en/mybb/mybb12.png)

 Use http:/// to go to your index page.

(http://libs.websoft9.com/Websoft9/DocsPicture/en/mybb/mybb14.png)

Using Plugins

MyBB has one of the most advanced plugin systems found in modern forum software. It takes only minutes to install plugins that can make MyBB suit your needs even better.

Most plugins will come with their own documentation on where the files included should go! If the mod does not come with documentation and

contains a single php file then that file should be uploaded to MyBB Root

Folder/inc/plugins .

If the plugin still lacks documentation on where the files go, but there are

directories such as jscripts , inc , or admin at the root of the plugin download’s folder, then upload the files within those directories to the respective folders of your MyBB installation.

If you then browse to Admin Control Panel -> Configuration -> Plugins you will see the plugin that you have recently uploaded listed. Click the Install or Activate links to install the plugin. 

Upgrade

Preparing for your Upgrade

Before you upgrade, you should do the following steps:

1. First, you may want to shut down your forum. Doing this means that no one will interrupt the upgrade process accidentally. Please remember that switching the forum off by using the Board Online/Offline setting is not recommended. The best method is to use a .htaccess restriction on your forum’s root folder so that no one can access the front-end.To restrict access to your forum except from your IP address, you need to place the following code in your root .htaccess file if you’re using apache or in the server block of your site’s config file if you’re using nginx. Replace 127.0.0.1 with your IP address.Apache 2.4:

Require all denied Require ip 127.0.0.1

2. Secondly, you should back up your files and database and store them in a safe place. Just in case something goes wrong, you can restore the backup and start again. You can back up the database using the MyBB Admin CP or your database management software. 3. You must deactivate (or disable) all of your plugins. This is because it is likely they will need to be updated to work on the new version and can cause problems if they are left active. You can deactivate (or disable) your plugins by going to Admin CP > Board Settings >  General Configuration and changing “Disable All Plugins” to Yes.

Beginning the Upgrade

Once you’ve downloaded the correct upgrade package for you, it’s time to do the upgrade. Please follow these steps carefully.

1. Upload all of the files and folders inside the package (from inside the Upload/ folder if using the full package), including

the install/ folder (if it exists), overwriting the existing copies of the files in your file system. 2. If the post announcement mentions that the upgrade script is required, then perform the following: 1. Open your forum’s home page in your web browser and

add /install/ to the URL. For

example, www.yourdomain.com/install/ or www.yourdomain.com/forum/install/ .

2. It might ask you to remove a file called lock in this folder. Use

an FTP Client or a File Manager to remove the install/lock file. 3. You should see a drop down list asking what version of MyBB you’re upgrading from. Remember to select the correct version – the one you’re currently using – or else the upgrade will not work correctly. 4. Follow the instructions to run the upgrade. 5. After the upgrade has finished, check that the file

called lock was created in the install/ folder. If it is missing,

create it yourself or delete the install/ folder from your server.

For extra protection, chmod 644 inc/config.php . 3. If the blog post announcement mentions that there are theme  changes, then perform the following: 1. Go to Admin CP > Templates & Style > Templates > Find Updated Templates. This will show you a list of all the templates that have changed during the upgrade.

2. You can either revert these templates to their default – meaning all the changes you’ve made to it will be removed – or you can see a Diff Report which will show you exactly what’s changed. If you have a custom theme installed, it is probably best that you look at the Diff Report and apply the changes you need. 4. If the blog post announcement mentions that there are language changes and you’ve either customised your English language pack (the default pack) or installed a custom language pack, then perform the following: 1. Check to see if the language pack you’re using has already been updated in the Translation Releases Forum (https://community.mybb.com/forum-169.html). Download and install any updates you need. 2. If you have made customisations to the packs yourself, or you manage a language pack for MyBB, then read through the blog post announcement for a list of changes to the language packs and apply the changes as necessary. 5. The upgrade process should now be complete! You may want to re-

open your forum by removing the .htaccess block or turning your forum on again. Before you do this, ensure that your forum functions correct and it looks the way it’s supposed to look! Take your time don’t rush it.

Backup & Restore There are three main “sections” of the migration process(Restore):  backups/export of data, uploading of data to the new host, and domain transfer.

From the database backups page, you can easily create backups that are either stored on your server or downloaded to your computer. The database backups listing page shows you all backups that are currently stored on your server, the size of the backup, the time and day of creation, and allows you to download or delete the backup.

Backup

1. Log into your MyBB Admin Control Panel, and disable all plugins by

navigating to Configuration and setting Disable All Plugins to Yes .

2. Close your forum by navigating to Configuration , Board Online /

Offline , and setting the board to closed. This will ensure that the data you export in the next step is the latest and that no activity is lost in the transfer to the new host.

3. Export your database by navigating to the Tools &

Maintenance section, Backup Database , New Backup . Select All tables,

check GZIP Compressed , Download , Structure and Data , and Analyze

and Optimize Selected Tables . Save the resulting file to a location on your computer. See the below image for reference.

4. Using an FTP client, such as FileZilla (https://filezilla- project.org/download.php?show_all=1), download ALL of your forum’s files to a location on your computer.

Moving to a New Web Host 1. Create a new database and user on the new host. Change the  database configuration variables in ./inc/config.php to the values appropriate for your new host. 2. Using a tool such as phpMyAdmin, browse to the blank database on your new host, and import the data exported in Step 3 of Backup/Export Data (https://docs.mybb.com/1.8/faq/moving-to-a- new-web-host/#backup-export-data). 3. Using an FTP client, upload ALL of your forum’s files to the new web host. 4. Domain Transfer:In many cases, your new web host will help transfer your domain and point it to their systems. If not, please contact them for assistance with changing the settings for your domain at your registrar, as the settings differ between hosts. Also, keep in mind that DNS propagation (the time it takes for computers to learn that your domain points somewhere new) can often take up to a few hours, so if it doesn’t update immediately, there is no cause for concern. 5. Your domain should hopefully be pointed to the new host at this point, and your forum should behave exactly as it did on your old host. If it doesn’t, create a support thread in the MyBB Community Forums (https://community.mybb.com/newthread.php?fid=176), or contact your new web host for assistance, providing them with a link to this documentation. 6. Re-open your board by following Steps 1-2 of Backup/Export Data (https://docs.mybb.com/1.8/faq/moving-to-a-new-web-host/#backup- export-data), but opening the board instead of closing it.

How to do an Automatic Backups?

For automatically scheduled backups, see Task manager. 

The “Weekly Backup” task can be used to periodically back up your MyBB database, but its use is recommended only for small boards, because it might slow down the board (https://community.mybb.com/thread- 98163.html) when it takes its time to complete. If you have it running as a task but notice the board is slow when the backup task is running, then use a cron job instead. Below is an example for MySQL.

Create a shell script named, for example, ~/forum_backup.sh :

now=`date +%Y-%m-%dT%H-%M` ; mysqldump -u --password= --skip-opt --add-drop-table --complete-insert --create-op tions --disable-keys=FALSE --extended-insert=FALSE --lock-tables --sk ip-set-charset --skip-comments --dump-date > $now. ; zip -m $now.zip $now.sql

These parameters configure the mysqldump to be very close to the format of the backups generated via Admin CP (https://docs.mybb.com/1.8/administration/backups/). In particular, one INSERT per line vs. multi-value INSERTs allow for easier visual comparison of dumps using visual diff tools (https://en.wikipedia.org/wiki/Diff_utility).

To create a cron job for automatically executing that backup, run:

chmod +x ~/forum_backup.sh crontab -e # in the crontab editor, enter a CRON expression like: 0 4 * * * ~/forum_backup.sh # run the backup every day at 4am

Note that having backups on the server won’t protect you from a server failure, or losing access to the server. Make sure you transfer the backups from the server to an off-site location.  How to access phpMyAdmin?

Websoft9 Mybb Image have installed the phpMyadmin

phpMyAdmin install directory: /data/wwwroot/default/phpMyAdmin

Linux

Following is the step for access phpMyadmin

1. Open Chrome or Firefox on your local PC 2. visit the http://Internet IP Address/phpMyAdmin,you can enter the login page

3. select you language,Username:root,Password:123456 4. Click the button “Go”

Windows Following is the step for access phpMyadmin  1. User Remote Desktop Connection of Window to connect to you ECS

2. Install a Chrome or Firefox browser on you ECS 3. Open Chrome or Firefox on your ECS 4. visit the http://localhost/phpMyAdmin,you can enter the login page

5. select you language,Username:root,Password:123456 6. Click the button “Go” 

How to change the permissions of filesytem?

When install new extension from back-end it will not successful,may be the permissions of file and folder is not appropriate,you should change it

Web site root permissions to follow: file 644, folder 755 ,Permissions Users and groups www If there is a file permissions problem, execute the following three commands:

chown -R www.www /data/wwwroot/default/mybb find /data/wwwroot/default/mybb -type d -exec chmod 755 {} \; find /data/wwwroot/default/mybb -type f -exec chmod 644 {} \;

How to modify the allowed limit for upload?

Modify the /usr/local/php/etc/php.ini file to increase the allowed size for uploads:

; Maximum size of POST data that PHP will accept. post_max_size = 16M ; Maximum allowed size for uploaded files. upload_max_filesize = 16M

then,restart the apache

# service httpd restart

How to modify PHP settings? The PHP configuration file allows you to configure the modules enabled,  the email settings or the size of the upload files. It is located at /usr/local/php/etc/php.ini.

There are some PHP settings that need to be sufficient for Mybb to install.

The values for PHP.ini below are suggested values only.

memory_limit – Minimum: 64M Recommended: 128M or better upload_max_filesize – Minimum: 20M post_max_size – Minimum: 20M max_execution_time: At Least 120 Recommended: 300

After modifying the PHP configuration file, restart both Apache and PHP- FPM for the changes to take effect:

# service httpd restart

How to change the max_execution_time?

If you receive the message “Maximum execution time of 30 seconds exceeded”.You may also like to extend the max_execution_time for PHP and you can modify it by two methods below

Method one: edit your /usr/local/php/etc/php.ini

; Maximum execution time of each script, in seconds ; http://php.net/max-execution-time ; Note: This directive is hardcoded to 0 for the CLI SAPI max_execution_time = 90 ; Maximum amount of time each script may spend parsing request data. It ; idea to limit this time on productions servers in order to eliminate ; long running scripts.

Method two: edit your .htaccess:  php_value max_execution_time 90

Unable to Log In?

Most of the time this is a problem with your cookie settings being incorrect or inadequate. For more information about MyBB’s cookies, read Cookies (https://docs.mybb.com/1.8/development/cookies/).

Your cookie settings can be found in: Admin CP > Configuration > Settings > Site Details. The two settings are Cookie Domain and Cookie Path.

By default, MyBB suggests Cookie Domain to be blank, and Cookie Path to be /. Although this theoretically will work, in many cases it is inadequate.

You can use this tool (https://docs.mybb.com/tools/cookie-settings) to generate appropriate cookie settings, but here are some examples of what valid cookie settings look like:

Cookie Forum URL Cookie Domain Path http://www.example.com .example.com / http://www.example.com/directory/ .example.com /directory/ http://www.subdomain.example.com subdomain.example.com/ http://www.subdomain.example.com/directory/subdomain.example.com/directory/ These cookie settings should work on all MyBB installations. If you have site- integration, your cookie settings may need to be more generalized.

After you change your cookie settings, please advise your users to log out and clear cookies stored by their browser, so that the new cookies can take effect.

How to use a CDN with MyBB? MyBB 1.8 brings built-in CDN compatibility to MyBB for the first time. This  feature allows the loading of static files such as JavaScript, CSS, and images from a CDN of your choice. In this tutorial, we will guide you through the basic setup steps.

Note: Only the basic “pull” type CDNs are supported as of the time this guide was written.

Setting up your domains/subdomains

When setting up a CDN, you will want to choose a subdomain to use. In the case of this tutorial, we used “s.mybbstuff.com”. All the files for this

subdomain live in the following path: /home/euan/webapps/s_mybbstuff_com/ .

Once you have created this subdomain, you should copy your current static files to it. Below is a list of the folders/files you will need to copy across in a default installation of MyBB:

cache/themes/* images/* uploads/* jscripts/*

Configuring your CDN

Once these files are copied over, you should now be able to access stylesheets from the specified domain, with this done it is now time to configure your actual CDN. You should pick a provider that you prefer and trust (a list of some are listed below); however for the purposes of this tutorial, we are using “cdn.net”.

Once you have signed up for an account with your provider you will need to set up a zone or package. This is how ours was configured:

The resource type should be of “pull” type and the origin should be the subdomain we configured earlier (s.mybbstuff.com in my case). You can use any CDN hostname that you desire – most CDN providers will actually give you a subdomain of theirs if you do not wish to configure CNAME DNS  records and such. I chose to use cdn.mybbstuff.com just because it looks good.

Setting up MyBB to use the CDN

Now that our CDN is configured, it’s time to change our MyBB settings to

make use of it. Log into your Admin Control Panel and select Configuration

> Settings > Server and Optimization Options .

You will see the CDN settings near the bottom of the page, and can change the settings to suit your needs. In the case of this tutorial, our settings looked like this:

Use a CDN?: Yes URL to use for static files: This is the CDN hostname that you configured in step two. In my case, it is http://cdn.mybbstuff.com Path to store static files: This is the path to the subdomain that we set up earlier for static files to be stored. All uploads and stylesheets will be saved here from now on. In my case, the path is “/home/euan/webapps/s_mybbstuff_com”

Once configured, save your settings then reload the forum home page. All of your images, stylesheets and should now be loading from a CDN.

How to deal with Spam? MyBB has several built-in features that help protect your community from  spammers.

Get more from Spam (https://docs.mybb.com/1.8/administration/spam/)

MyBB Merge System

The MyBB Merge System allows for easy merging of an existing forum (be it MyBB or another forum software) into a MyBB 1.8 forum. The Merge System automatically converts the data from the other forum software (if applicable) into a MyBB-friendly format. Only the 1.8 Merge System is supported, all other versions aren’t supported anymore.

The following forum software are supported by the MyBB Merge System:

bbPress FluxBB Invision Power Board 3 Invision Power Board 4 (Pre-Release) MyBB 1.8 (Merge) phpBB 3 punBB SMF 1 SMF 2 Vanilla vBulletin 3 vBulletin 4 WoltLab Burning Board 3 WoltLab Burning Board 4 Woltlab Burning Board Lite 2 XenForo

The MyBB Merge System uses “modules” to take you through the conversion process. This makes it easier for you to choose what you want converted over, and what you don’t want converted. You will also notice that some modules have “dependencies,” which means it requires the displayed modules to be run before it can run itself. The modules that are included for each forum software vary based on what  that forum supports in comparison to MyBB. For instance, not all software have a “calendar” feature, so only those that do have a module that transfers over the calendar events.

MyBB Help Links

Links

Open Source | MyBB (https://mybb.com/)

Websoft9