In today’s article we will install MyBB on a Ubuntu 16.04 VPS. MyBB is a very popular open source, intuitive and extensible forum software developed using PHP and MySQL. Installing MyBB on Ubuntu is simple task, just follow the steps bellow. Installing MyBB on Ubuntu 16.04, should not take more then 10 minutes.
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.
We will be using our SSD 1 Linux VPS hosting plan for this tutorial.
Table of Contents
1. LOG IN TO YOUR SERVER VIA SSH
# ssh root@server_ip
You can check whether you have the proper Ubuntu version installed on your server with the following command:
# lsb_release -a
You should get this output:
Distributor ID: Ubuntu Description: Ubuntu 16.04.1 LTS Release: 16.04 Codename: xenial
2. UPDATE THE SYSTEM
Make sure your server is fully up to date using:
# apt update && apt upgrade
3. INSTALL REQUIRED PHP DEPENDENCIES
Install a much needed dependencies so your PHP based forum can connect to the respective MySQL database:
# apt install php-mysql
4. INSTALL MYBB
Now navigate to the html directory on your server.
# cd /var/www/html/
Download the latest MyBB version which at the moment of writing this tutorial it is 1.8.7.
# wget https://resources.mybb.com/downloads/mybb_1807.zip
Unzip the package:
# unzip mybb_1807.zip
Create a directory for your forum:
# mkdir mybb
Setup the correct file ownership to your Apache web server.
# chown www-data: -R /var/www/html/mybb/
Delete the zip file, enter the newly created directory and move the needed files from the Upload directory
# rm mybb_1807.zip # cd mybb/ # mv Upload/* .
5. CREATE MySQL DATABASE
Now create a MySQL database so the forum can be installed. Log into MySQL as root:
# mysql -u root -p mysql> create database mybb; mysql> grant all privileges on mybb.* to mybbuser@localhost identified by 'your_password'; mysql> flush privileges; mysql> exit Bye
Rename the config.default.php file in the inc directory to config.php since you will be asked to do this later during the MyBB installation via browser. Execute the following:
# mv inc/config.default.php inc/config.php
6. CREATE APACHE VIRTUAL HOST AND CONFIGURE IT
Now, create an Apache virtual host file for your domain so you can access MyBB via a domain. Create a new file, let’s call it mybb.conf:
Paste the following:
<VirtualHost *:80> ServerAdmin admin@your_domain.com DocumentRoot /var/www/html/mybb/ ServerName your_domain.com ServerAlias www.your_domain.com <Directory /var/www/html/mybb/> Options FollowSymLinks AllowOverride All Order allow,deny allow from all </Directory> ErrorLog /var/log/apache2/your_domain.com-error_log CustomLog /var/log/apache2/your_domain.com-access_log common </VirtualHost>
Do not forget to replace the your_domain value with your actual domain. Save and close the file. Then enable it:
# a2ensite mybb.conf
7. RESTART APACHE AND CONTINUE WITH THE SETTING
Now restart Apache so the changes can take effect:
# /etc/init.d/apache2 restart
Next, open your favorite web browser and finish the MyBB installation by navigating to http://your_domain.com. You will be welcomed by the forum installation wizard as shown in the below image.
Click on Next, accept the Licence Agreement and continue with the installation procedure.
Make sure that you meet all requirements from the Requirements Check page. Then click on Next and proceed with the database configuration. Enter the database values that you used during the database creation previously.
This installation is pretty straightforward, so once you configure your basic settings for the forum and your administrator settings, then you are good to go and use MyBB.
Once you complete the installation you should get this:
Congratulations you have successfully installed MyBB forum on your Ubuntu 16.04 VPS.
Of course, you don’t have to do any of this if you use one of our Ubuntu 16.04 Hosting, in which case you can simply ask our expert Linux admins to install and configure MyBB for you. They are available 24×7 and will take care of your request immediately.
PS. If you liked this post on Install MyBB on Ubuntu 16.04, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.