This time you will learn how to install MyBB Forum on Ubuntu / Debian
MyBB is a open-source forum application which comes with amazing unique features which gives your forum a completely unbelievable look. It comes with many pre-installed features and utilities to keep your forum completely managed and solid. Since, It’s open source, There are many themes developed by the community members for you to use it freely, also there are many plugins which gives you and your forum users more accessibility to the forum. Plugins like Social Login Integration, ShoutBox, Arcade Gamers etc. It’s one of the most reliable free forums software on the market. Many known communities uses MyBB to this day
Requirements :
- Minimum PHP 5.2 or PHP 7.X
- NGINX or Apache2 Server
- PHP GD, SimpleXML, MBString extension
- Minimum MySQL 5.0 or MariaDB Server
Lets get started with the installation!
Step 1 : Updating your VPS Server
apt-get update && apt-get upgrade
Installing some additional packages which might be needed later to extract or edit some files
apt-get install unzip nano
Step 2 : Installing Required Packages
By default we cannot install PHP7.x packges on Debian, for that we have to enable PPA by using the following commands, Make sure to follow the correct commands below for the right distributions or it may cause issues.
— Do the following for Debian Servers to install PHP 7.X Packages
apt install apt-transport-https lsb-release ca-certificates wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list apt update
Then, do the following for Ubuntu Servers to install PHP 7.X Packages
apt -y install software-properties-common
add-apt-repository ppa:ondrej/php
apt-get update
Apache2 and MySQL Server
apt-get install apache2 mariadb-server
After installing MariaDB Server, Configure it before moving onto the next step
mysql_secure_installation
You will have a following prompt like this can follow the steps as shown in below.
Set root password? [Y/n] Y
Remove anonymous users? [Y/n] Y
Disallow root login remotely? [Y/n] n
Remove test database and access to it? [Y/n] Y
Reload privilege tables now? [Y/n] Y
PHP and PHP Extensions
apt install php7.2 libapache2-mod-php7.2 php7.2-common php7.2-curl php7.2-intl php7.2-mbstring php7.2-xmlrpc php7.2-mysql php7.2-gd php7.2-pgsql php7.2-xml php7.2-cli php7.2-imagick php7.2-bcmath php7.2-gmp php7.2-zip
Step 3 : Configuring Database for MyBB
Now, We need to create a Database for our forums where everything will be stored. Use your password which you used while configuring in Step 2!
mysql -u root -p
You will see a prompt like this!
MariaDB [(none)]>
Enter the following commands to create a database for forum, Make sure to replace the password with yoour own
CREATE DATABASE mybb;
CREATE USER 'mybbuser'@localhost IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON mybb.* TO 'mybbuser'@localhost;
use mybb;
exit
Step 4 : Installing MyBB Files / Installation
After doing the above steps, We have successfully updated our VPS Installed the required packages for MyBB Forum, and setup MySQL Server and a database, Now we can further move on installing the files and extracting and moving it in the right folder.
So, Change directory to the apache2 folder
cd /var/www/html
Then, Download files for the forum from the mirror
wget https://resources.mybb.com/downloads/mybb_1829.zip
After that, Unzip files
unzip mybb_1829.zip
— Move all the files from the Upload folder to the root directory
mv /var/www/html/Upload/* /var/www/html
You will see the following screen, Click Next and you will be prompted to check requirements
— After clicking next and accepting the terms, You will see the following screen and if you have the same errors do the following steps:
— Use the following commands to change the permissions for the following indiviually, It’s better to change the followings files and folders permissions individually:
chmod 777 /var/www/html/uploads/
chmod 777 /var/www/html/uploads/avatars
chmod 777 /var/www/html/cache
chmod 666 /var/www/html/inc/settings.php
mv config.default.php config.php
chmod 666 /var/www/html/inc/config.php
— Then, You will be moved on to input your MySQL Database Details:
— If you have followed the above steps as shown exactly, Use the following commands and leave Table Prefix and Encoding as it is unless you know exactly what you are doing:
Database Server Hostname : localhost
Database Username: mybbuser
Database Password: password(or if you have changed it)
Database Name: mybb
The installation tool will automatically generate all the tables for you and then you can move on to set basic details for your board, Change it according to your needs or leave it for later too. It depends upon you.
If you have done everything correctly, The final step will be to create a administrator user for the board which will manage everything from themes to plugins or adding more administrative users or moderators etc. Add details according to yourself
Finally, You have successfully installed MyBB on your Debian/Ubuntu server, The final step will be is to delete the /install directory if you do not delete the folder the board will not work
rm -rf /var/www/html/install
This tutorial has been tested on Ubuntu 20.04 & Debian 9/10, This may work on older versions too, This is a straight normal tutorials for setting up PHP , Apache2 , MariaDB (MySQL) Server easily and easily installing the forum.