How to Install MyBB CMS on Ubuntu 20.4.1

To install MYBB CMS on Ubuntu 20.4.1

Introduction:

MyBB, formerly MyBBoard and originally MyBulletinBoard, is a free and open-source content management system.MyBB is a free open source forum software developed in PHP, that offers support for the following databases: MySQL, PostgreSQL and SQLite and has a database failover support.You can manage everything from creating a new forum to users, private messaging and templates

Installation process:

Run lsb_release command to check the installed version of OS as follows.

root@linuxhelp:~# lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.1 LTS
Release:	20.04
Codename:	focal

Install Apache:

root@linuxhelp:~# apt install apache2
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-5.4.0-42 linux-headers-5.4.0-42-generic linux-headers-5.4.0-52 linux-headers-5.4.0-52-generic
  linux-image-5.4.0-42-generic linux-image-5.4.0-52-generic linux-modules-5.4.0-42-generic linux-modules-5.4.0-52-generic
  linux-modules-extra-5.4.0-42-generic linux-modules-extra-5.4.0-52-generic
Use 'sudo apt autoremove' to remove them.

Start the apache by following command

root@linuxhelp:~# systemctl start apache2

Install PHP modules by using the below commands:

root@linuxhelp:~# apt install php php-xml php-mysql php-mbstring php-zip php-soap php-sqlite3 php-curl php-gd php-ldap php-imap php-common
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-5.4.0-42 linux-headers-5.4.0-42-generic linux-headers-5.4.0-52 linux-headers-5.4.0-52-generic
  linux-image-5.4.0-42-generic linux-image-5.4.0-52-generic linux-modules-5.4.0-42-generic linux-modules-5.4.0-52-generic
  linux-modules-extra-5.4.0-42-generic linux-modules-extra-5.4.0-52-generic
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libapache2-mod-php7.4 libc-client2007e libonig5 libzip5 mlock php7.4 php7.4-cli php7.4-common php7.4-curl php7.4-gd
  php7.4-imap php7.4-json php7.4-ldap php7.4-mbstring php7.4-mysql php7.4-opcache php7.4-readline php7.4-soap php7.4-sqlite3
  php7.4-xml php7.4-zip

Install mysql by using the below command:

root@linuxhelp:~# apt install mysql-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-5.4.0-42 linux-headers-5.4.0-42-generic linux-headers-5.4.0-52 linux-headers-5.4.0-52-generic
  linux-image-5.4.0-42-generic linux-image-5.4.0-52-generic linux-modules-5.4.0-42-generic linux-modules-5.4.0-52-generic
  linux-modules-extra-5.4.0-42-generic linux-modules-extra-5.4.0-52-generic
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libaio1 libcgi-fast-perl libcgi-pm-perl libevent-core-2.1-7 libevent-pthreads-2.1-7 libfcgi-perl libhtml-template-perl
  libmecab2 mecab-ipadic mecab-ipadic-utf8 mecab-utils mysql-client-8.0 mysql-client-core-8.0 mysql-server-8.0
  mysql-server-core-8.0

Create database for Mybb CMS:

root@linuxhelp:~# mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.22-0ubuntu0.20.04.3 (Ubuntu)
Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> create database mybb;
Query OK, 1 row affected (0.00 sec)
mysql> use mybb;
Database changed
mysql> create user 'mybbuser'@localhost identified by '123456';
Query OK, 0 rows affected (0.04 sec)
mysql> grant all privileges on mybb.* to 'mybbuser'@localhost;
Query OK, 0 rows affected (0.01 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
mysql> exit
Bye

Download Mybb cms by using the below command:

root@linuxhelp:~# wget https://resources.mybb.com/downloads/mybb_1820.zip
--2020-12-02 12:16:58--  https://resources.mybb.com/downloads/mybb_1820.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: 2251084 (2.1M) [application/zip]
Saving to: ‘mybb_1820.zip’
mybb_1820.zip                    100%[=======================================================>]   2.15M   608KB/s    in 3.6s    
2020-12-02 12:17:02 (608 KB/s) - ‘mybb_1820.zip’ saved [2251084/2251084]

Extract the Zip file by using the below command:

root@linuxhelp:~# unzip mybb_1820.zip 
Archive:  mybb_1820.zip
   creating: Documentation/
  inflating: Documentation/credits.html  
   creating: Documentation/images/
  inflating: Documentation/images/logo.png  
 extracting: Documentation/images/notice_credits.png  
 extracting: Documentation/images/notice_install.png  
 extracting: Documentation/images/notice_license.png  
 extracting: Documentation/images/notice_upgrade.png  

Rename the directory:

root@linuxhelp:~# mv Upload /var/www/mybb

Give the Ownership and permissions to Mybb directory

root@linuxhelp:~# chown -R www-data.www-data /var/www/mybb
root@linuxhelp:~# chmod -R 755 /var/www/mybb

Create a virtualhost for Mybb CMS:

root@linuxhelp:~# vim /etc/apache2/sites-available/mybb.conf

Disable default access

root@linuxhelp:~# a2dissite 000-default.conf
Site 000-default disabled.
To activate the new configuration, you need to run:
  systemctl reload apache2

Enable site access

root@linuxhelp:~# a2ensite mybb.conf
Enabling site mybb.
To activate the new configuration, you need to run:
  systemctl reload apache2

Enable rewrite module

root@linuxhelp:~# a2enmod rewrite
Enabling module rewrite.
To activate the new configuration, you need to run:
  systemctl restart apache2

Once it is completed, Restart the Apache Web Server by running the following command

root@linuxhelp:~# systemctl restart apache2

Once completed above step goto browser type URL Welcome page for Mybb CMS License agreement page Check requirements Database configuration After that click next, for installation process pages Check board configuration and click next Create admin account Click admin control panel Login admin page Then it will show dashboard

With this installation of mybb cms comes to end on ubuntu 20.4.1

FAQ
Q
How do you check the status of the apache service?
A
he command is # systemctl status apache2
Q
How do you install the modules of PHP?
A
The command is # apt install php php-xml php-mysql php-mbstring php-zip php-soap php-curl php-gd php-ldap
php-imap php-common php-dev libmcrypt-dev php-pear
Q
How do you enable the rewrite module?
A
The command is # a2enmod rewrite
Q
What is the path of the apache configuration?
A
The path is # /etc/apache2/sites-available/
Q
What is MyBB CMS?
A
MyBB is an open-source, multi-lingual extensible blogging engine. It stores all of its content on text files.