Deploy your custom forum by installing MyBB on Ubuntu 20.04

Windows Articles

How to install KVM on Debian 10?

Hello friends, in this post I will show you how to install KVM on Debian 10. KVM stands for...

How to open Windows 10 Mobility Center

Hello! There are many types of users of Windows 10. As it depends on the type of hardware used. That is, the...

Ubuntu 20.04.1 available

Canonical, the company led by Mark Shuttleworth, releases Ubuntu 20.04.1. It has a new image, with updates and security patches for the...

How to install Linux Kernel 5.8 on Ubuntu 20.04?

Upgrading the Linux Kernel can be a beneficial task, but it is always optional. Recently we talked about the Linux Kernel 5.8...

How to activate XPS Viewer in Windows 10

Hey, what's up! When working with Windows 10 we probably use a lot of files. Indeed, these files have many extensions. For...
angeloma
angeloma
Senior Writer and partner

Using mechanisms to deploy forums can be very useful in the field of education. It can even be a great idea for a company. That is why, in this post, I will show you how to install MyBB on Ubuntu 20.04.

MyBB is an open source application that is developed in PHP that supports multiple database handlers such as MySQL, PostgreSQL, and SQLite. Its main objective is to deploy forums and blog content. That is to say, it is a CMS with more advantages.

There are many features that make MyBB so special. For example, it is very extensible, thanks to its large community and plugins. Besides, the language will not be a problem because it supports more than 30. That is, it is a powerful tool but with good community support.

So, let us start.

Installing MyBB on Ubuntu 20.04

1.- Install LAMP on Ubuntu 20.04

MyBB is deployed using a web server. In this case, we will use the LAMP stack because it is easy and affordable for most people.

How to install LAMP on Ubuntu 20.04?

When installing the web server, you must also install these PHP modules:

php libapache2-mod-php php-mysql php7.4-gmp php7.4-curl php7.4-intl php7.4-mbstring php7.4-xmlrpc php7.4-gd php7.4-soap php7.4-xml php7.4-cli php7.4-zip php-imagick

2.- Create the database for MyBB

Now that the whole server is ready, we have to create a new database and user for MyBB. Remember that MyBB needs a relational database manager to store all the data required.

This is a good practice since it prevents the root user from being used by third-party applications.

So, access the MariaDB console.

:~$ sudo mysql -u root -p

And create the database, the new user, and assign permissions.

CREATE DATABASE mybbdb;
GRANT ALL PRIVILEGES ON mybbdb.* TO 'mybbuser'@'localhost' IDENTIFIED BY 'mybbPSS123';
FLUSH PRIVILEGES;
exit;

These credentials will be used later when we have to install MyBB. Remember that they are test values, you can choose another name for the database, as well as the username and of course, the password.

3.- Download MyBB on Ubuntu 20.04

Now we can start downloading MyBB. First, visit the project website to know which is the latest version available and then with the help of the wget command perform the download.

:~$ wget -c https://resources.mybb.com/downloads/mybb_1823.zip
--2020-07-25 01:44:32-- https://resources.mybb.com/downloads/mybb_1823.zip
Resolving resources.mybb.com (resources.mybb.com)… 104.24.30.89, 104.24.31.89, 172.67.67.178, …
Connecting to resources.mybb.com (resources.mybb.com)|104.24.30.89|:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: 2239204 (2.1M) [application/zip]
Saving to: ‘mybb_1823.zip’
mybb_1823.zip 100%[=====================================================================================>] 2.13M 274KB/s in 8.3s
2020-07-25 01:44:42 (262 KB/s) - ‘mybb_1823.zip’ saved [2239204/2239204]
2.- Download MyBB on Ubuntu 20.04
2.- Download MyBB on Ubuntu 20.04

At the time of writing, the latest version of MyBB is 1.8.23

Next, decompress it using the unzip command. If you don’t have it installed, you can do it via APT.

:~$ unzip mybb_1823.zip -d mybb

The above command generates a folder called mybb where all the contents of the application will be stored.

Then move it to the Apache root directory.

:~$ sudo mv mybb /var/www/html/

Make the Apache user the owner of the folder.

:~$ sudo chown -R www-data:www-data /var/www/html/mybb/

And assign the right permissions to the folder.

:~$ sudo chmod -R 775 /var/www/html/mybb/

Now it is necessary to create a new VirtualHost so that Apache can process it better.

:~$ sudo nano /etc/apache2/sites-available/mybb.conf

So, add the following content:

<VirtualHost *:80>
ServerAdmin admin@your-domain.com
DocumentRoot /var/www/html/mybb/Upload/
ServerName forum.osradar.test
ServerAlias forum.osradar.test

     <Directory /var/www/html/mybb/Upload/>
         Options FollowSymLinks
         AllowOverride All
         Order allow,deny
         allow from all
     </Directory>
</VirtualHost>
3.- New VirtualHost or MyBB
3.- New VirtualHost or MyBB

Save the changes and close the file. Remember that the values of ServerName and ServerAlias have to be your own.

Enable the new VirtualHost with the following command:

:~$ sudo a2ensite mybb.conf

Also, enable PHP’s rewrite module and restart Apache.

:~$ sudo a2enmod rewrite
:~$ sudo systemctl restart apache2

4.- Install MyBB on Ubuntu 20.04

Now you have to complete the installation, open a web browser, and go to http://your-server and you will see the welcome screen.

4.- MyBB welcome screen
4.- MyBB welcome screen

Then, you will have to accept the license terms.

5.- MyBB license agreement
5.- MyBB license agreement

On the next screen, the installer will verify if the requirements for installation on the server are met.

6.- Requeriments Check
6.- Requeriments Check

Then, you have to configure the MyBB database. To do this, you will need to enter the MariaDB credentials we created earlier.

7.- Database configuration
7.- Database configuration

Now the installer will create the whole database structure.

8.- Creating the database structure
8.- Creating the database structure

Then he will fill it with data.

9.- Table population screen
9.- Table population screen

Then it will start the default theme.

10.- Starting the default theme
10.- Starting the default theme

Now, you will have to configure the site name and other things.

11.- Deploy your forum with MyBB on Ubuntu 20.04
11.- Deploy your forum with MyBB on Ubuntu 20.04

Then, create the administrator user account.

12.- Creating the admin account for MyBB
12.- Creating the admin account for MyBB

In the end, you will be shown a message indicating that MyBB is successfully installed.

13.- MyBB installed on Ubuntu 20.04
13.- MyBB installed on Ubuntu 20.04

On that same screen, you will get the links for your site and the dashboard.

So, go to the administration panel, and first, you will see the log in.

14.- MyBB login screen
14.- MyBB login screen

After logging in, you will finally see the administration panel.

15.- MyBB on Ubuntu 20.04
15.- MyBB on Ubuntu 20.04

Please note that the direct link to your site is http://your-server/index.php and for the administration panel http://your-server/admin/index.php

So, enjoy it

Conclusion

MyBB is a great application to deploy forums. It is open source and very well supported by the community.

To install MyBB on Ubuntu 20.04 does not require great technical knowledge because it is simple to do.

Please share this post with your friends and join our Telegram Channel.

More articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest article

How to install KVM on Debian 10?

Hello friends, in this post I will show you how to install KVM on Debian 10. KVM stands for...

How to open Windows 10 Mobility Center

Hello! There are many types of users of Windows 10. As it depends on the type of hardware used. That is, the...

Ubuntu 20.04.1 available

Canonical, the company led by Mark Shuttleworth, releases Ubuntu 20.04.1. It has a new image, with updates and security patches for the...

How to install Linux Kernel 5.8 on Ubuntu 20.04?

Upgrading the Linux Kernel can be a beneficial task, but it is always optional. Recently we talked about the Linux Kernel 5.8...

How to activate XPS Viewer in Windows 10

Hey, what's up! When working with Windows 10 we probably use a lot of files. Indeed, these files have many extensions. For...