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 18.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.
1.- Install Apache web server and PHP
As you can imagine, MyBB requires a functional web server. So the first step is to install the Apache web server. Note that it is also possible to use Nginx.
:~$ sudo apt install apache2
Ubuntu starts and enables the service automatically. Now, we have to install PHP. The basic requirements indicate that it supports PHP 5.2 onwards, but its developers recommend at least PHP 7.2. Let us install it.
:~$ sudo apt install php php-xml php-mbstring libapache2-mod-php php-mysql php-mbstring php-gd php-zip php-json
Finally, restart Apache.
:~$ sudo systemctl restart apache2
2. Install MySQL
It is not necessary to have an SQL database manager to enjoy MyBB. However, we will. So we will install MySQL.
:~$ sudo apt install mysql-server
After that, you need to define the root password and other settings. So run the mysql_secure_installation
script.
:~$ sudo mysql_secure_installation
After defining a password for the root user, you will be asked other configuration questions. We recommend that you read them carefully and give your answers. We have answered like this, Y, N, Y, Y.
The, create the database and the new user for MyBB.
:~$ sudo mysql -u root -p CREATE DATABASE mybbdb; GRANT ALL PRIVILEGES ON mybbdb.* TO 'mybbuser'@'localhost' IDENTIFIED BY 'mybbPSS123'; FLUSH PRIVILEGES; exit;
So, that is all with MySQL.
3. Download and install MyBB
Now we can download it from the project website. Currently, the last stable version is 1.8.19.
:~$ cd /tmp/ :~$ wget https://resources.mybb.com/downloads/mybb_1819.zip
After that, decompress it on /var/www/html
.
:~$ unzip mybb_1819.zip -d mybb
Then, move it to the Apache web root and set the proper permissions to the folder.
:~$ sudo mv mybb /var/www/html/ :~$ sudo chown -R www-data:www-data /var/www/html/mybb/ :~$ sudo chmod -R 775 /var/www/html/mybb/
Finally, create a new virtualhost for MyBB.
:~$ sudo nano /etc/apache2/sites-available/mybb.conf
And add the following.
<VirtualHost *:80> ServerAdmin [email protected] DocumentRoot /var/www/html/mybb/Upload/ ServerName your-domain.com ServerAlias www.your-domain.com <Directory /var/www/html/mybb/Upload/> Options FollowSymLinks AllowOverride All Order allow,deny allow from all </Directory> </VirtualHost>
Enable the new configuration and the rewrite module. Next, restart apache.
:~$ sudo a2ensite mybb.conf :~$ sudo a2enmod rewrite :~$ sudo systemctl restart apache2
4. Complete the installation on the web browser
Finally, open your web browser and access your server to complete the installation. First, the welcome screen. Click on the next button.
Now, you have to accept the license. Click on the next button.
Then, the installer will check for the requirements.
Next, you have to configure the database. Just type the credentials.
In the next screen, you will see the database tables creation. Scroll down and click on the next button if everything went OK.
Next, the installer will populate the tables.
After that, the installer will installer the default theme.
Next, the board configuration. Type your data.
After that, you have to create the admin account.
Finally, you will see a message that MyBB is installed.
Next, you can log in to acces to the Admin control panel.
And finally, you will see the control panel.
And that’s 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 18.04 does not require great technical knowledge because it is simple to do.
Please share this post with your friends.