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.
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';
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)… 184.108.40.206, 220.127.116.11, 18.104.22.168, … Connecting to resources.mybb.com (resources.mybb.com)|22.214.171.124|: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]
At the time of writing, the latest version of MyBB is
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 [email protected] 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>
Save the changes and close the file. Remember that the values of
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.
Then, you will have to accept the license terms.
On the next screen, the installer will verify if the requirements for installation on the server are met.
Then, you have to configure the MyBB database. To do this, you will need to enter the MariaDB credentials we created earlier.
Now the installer will create the whole database structure.
Then he will fill it with data.
Then it will start the default theme.
Now, you will have to configure the site name and other things.
Then, create the administrator user account.
In the end, you will be shown a message indicating that MyBB is successfully installed.
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.
After logging in, you will finally see the administration panel.
Please note that the direct link to your site is
http://your-server/index.php and for the administration panel
So, enjoy it
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.