MyBB is a popular open source extensible forum PHP based script powered by LAMP. It allows webmasters and students to easily create discussion forums that look professional.
This brief tutorial is going to show students and new users how to easily install it on Ubuntu server and run a great forum website.
When you want to run a from website, there are few good choices to choose from in the open source community. MyBB will certainly be among those choices. It’s a great software to help users create robust online forum community.
With extensive range of plugins and themes that are free, you’ll be up and running in no time managing a professional looking forum. The below steps describe how to install and manage MyBB on Ubuntu servers.
Step 1: You’ll need the LAMP stack
Like many other PHP based software and applications, you’ll need the LAMP stack to run MyBB. For those who don’t know, the LAMP stack is an acronym for Linux, Apache2, MySQL and PHP.
To install the LAMP stack on Ubuntu, follow the guide below
Or you can quickly install it with a single command line. The commands below install the standard LAMP stack on Ubuntu. To customize the stack you’ll have to manually install each component of it.
To quickly install the LAMP stack, run the commands below.
sudo apt-get update sudo apt-get install lamp-server^
When you run the commands above, you’ll be prompted to create MySQL root password.. Create and confirm the password and you’re all set.
Now that the stack is installed, go and download MyBB content from online. At the time of this post, the current version was 1.8.8. You may have to change the version number if new ones are available.
Step 2: Downloading MyBB content
To download MyBB, run the commands below.
cd /tmp/ && wget https://resources.mybb.com/downloads/mybb_1808.zip
Next, extract the content and copy it to the default Apache2 root directory on Ubuntu, which is /var/www/html/
sudo unzip mybb_1808.zip sudo cp -rf /tmp/Upload/* /var/www/html/
The commands above will extract MyBB content and copy it to the default Apache directory. This assumes you don’t have any other application using the default root directory.
After extracting the content, change the file permissions on the directory to allow MyBB to function properly.
Do not forget to remove Apache2 default index.html file.. it can create problem in some cases.
sudo rm -rf /var/www/html/index.html
Step 3: Change the root directory permissions
To allow MyBB to function properly, change the permissions of the root directory by running the commands below.
sudo chown -R www-data:www-data /var/www/html sudo chmod -R 755 /var/www/html
Step 4: Create MyBB Database
At this point, all should be ready except for the database. You need to create a single database for MyBB to use to store content in. To do that, logon to MySQL database server
mysql -u root -p
Then run the command statement below to create a database called mybb
CREATE DATABASE mybb;
Then create a new user called mybbuser and grant the user access to the database by running the commands below
GRANT ALL ON mybb.* TO 'mybbuser'@'localhost' IDENTIFIED BY 'type_new_passowrd_here';
Finally, save your changes and exit.
FLUSH PRIVILEGES; exit
You’re almost done.
Restart Apache2 webserver by running the commands below:
sudo systemctl restart apache2
Now go to your browser and browse to the server IP address or hostname.
You should see a setup page for MyBB. Continue with the wizard until you’re done.
Make sure the requirement check is good. I had to install php-xml to pass this screen. If you run into the same issues, run the commands below to install php-xml and restart Apache2.
sudo apt-get install php-xml
Next, enter the database information and continue.
Finally, brand your forum and finish.