MyBB is free and open source forum application. It is written in PHP and uses MySQL or SQLite to store its data. The application is very tiny yet powerful and can be installed on servers with few resources available.
MyBB is a very popular forum application and it is powering numerous community forums. It is very simple to use and its interface is kept clean for ease of use. It provides many administration tools for moderation of the forum so that you can keep it clean from spammers. MyBB is highly customizable and many plugins are also available to extend the features of the forum.
MyBB does not have any special hardware requirements. It can be installed on servers with a small amount of RAM. All the required dependencies will be installed throughout the tutorial. You will need a minimal installation of CentOS 7 with root access on it. If you are logged in as a non-root user, you can run sudo -i to switch to root user.
Before installing any package it is recommended that you update the packages and repository using the following command.
yum -y update
Once you have your system updated, you can proceed to install the LAMP stack. Start the LAMP installation by installing Apache web server and MariaDB, which is a fork of MySQL using the following command.
yum -y install httpd mariadb-server mariadb
MyBB can be installed on any version of PHP > 5.2. To install PHP and the required modules run the following command.
The above command will install PHP 5.4 along with the required modules. To check the PHP version, run the following command.
You will likely see the following output.
[root@ip-172-31-25-44 ~]# php -v
PHP 5.4.16 (cli) (built: Nov 6 2016 00:29:02)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
Now start the Apache web server and enable it to start at boot time using the following command.
systemctl start httpdsystemctl enable httpd
To start MariaDB and enable it to start at boot time using the following commands.
systemctl start mariadbsystemctl enable mariadb
Now run the following commands to secure your MySQL or MariaDB installation.
It will run a small script which asks you to set a root password for your MariaDB installation. Most of the questions are self-explanatory and you should answer yes to all the questions.
As we have all the dependencies ready we can now create a database to store the data of MyBB. MyBB can also use an SQLite database to store its data. Using SQLite is not recommended when you have the option to use MySQL database as SQLite database is stored in the file system as a file, hence it affects the speed of the application. It is recommended to use MySQL/MariaDB to store MyBB data. To create a database we will need to login to MySQL command line first. Run the following command for same.
mysql -u root -p
This will prompt you for the password, provide the root password of MySQL which you have set earlier. Now run the following query to create a new database for your MyBB installation.
CREATE DATABASE mybb_data;
The above query will create a database named mybb_data. For the database, you can use any name you prefer in the place of mybb_data. Make sure that you use semicolon at the end of each query as the query always ends with a semicolon. Once the database is created you can create a new user and grant all the permissions to the user for the database. Using root user is not recommended for the databases. To create a new database user, run the following query.
CREATE USER 'mybb_user'@'localhost' IDENTIFIED BY 'StrongPassword';
The above query will create a user with username mybb_user. You can use any preferred username instead of mybb_user. Replace StrongPassword with a strong password. Now provide the appropriate privileges to your database user over the database you have created. Run the following command.
GRANT ALL PRIVILEGES ON mybb_data.* TO 'mybb_user'@'localhost';
Now run the following command to immediately apply the changes on the database privileges.
Exit from MySQL prompt using exit command.
As we have all the dependencies ready, we can now download the install package from MyBB site.
cd /var/www/htmlwget https://resources.mybb.com/downloads/mybb_1809.zip -O mybb.zip
The above command will download the installer archive and store it as mybb.zip file. You can always look for the latest release by going to the MyBB download page.
Extract the archive using the following command.
If you don't have unzip installed, you can run yum -y install unzip. The above command will extract the archive in two folders, one is Documentation folder, another is Upload folder. All the installer files are stored in Upload folder. To move all the files from Upload folder to the default web root directory, use the following command.
mv /var/www/html/Upload/* /var/www/html
Remove the zip file as it is not required now.
Now you will need to disable your SELinux because MyBB does not work with SELinux policies. To temporary disable SELinux, run the following command.
To completely disable the SELinux you will need to edit /etc/selinux/config file.
If you don't have nano installed, you can install it using yum -y install nano Find the following line:
Change it to:
Now you will need to reboot your server so that the new configuration can take effect. Once the server is rebooted, you will need to provide the ownership of the application to web server user using the following command.
chown -R apache:apache /var/www/html
Now you will need to start the browser installation, go to the following link using your favorite web browser.
You will see the welcome interface, you can choose the installer language here.
Choose database engine as MySQL improved, and leave the default value in database host. Provide the username and password of the database which we have created earlier to store MyBB data. Provide the database name also. Leave default value of Table Prefix. This is used when we have multiple installations of MyBB on the same database. Also, leave the default value of Table Encoding.
You can also choose the database engine as SQLite3 instead of MySQL if you like, but it is strongly recommended to use MySQL only. Provide the path to store the database and leave the default value of table prefix. Click Next to proceed further.
If the database credentials are correct then the installer will automatically create the tables into the database. If the installer shows any error in connectivity of the database, please recheck the database credentials provided. Click Next button to continue to the interface on which installer is ready to write the data into the tables which are created.
In next interface, you will need to provide some basic information about your forum. Provide a name and URL for your forum. You can provide your server IP address here if you do not have a domain name setup. Make sure that you do not put any slash or \ at the end of the URL.
Now, provide your main website details. This is optional settings, enter the name and URL of your website. This information is shown in the footer of the forum. Furthermore, in Cookie Domain and Path settings, leave the default value. If you provide any wrong value here, the login and registration feature might not work properly. Provide the email address of server admin and set a PIN for ACP or Administrator Control Panel login. This provides an additional layer of security to the admin control panel. ACP PIN is optional, leave the field blank if you don't want to set the PIN now.
In next interface, you will need to provide the administrator credentials. Set a username and password for admin user. Also provide the email of the administrator.
In this tutorial, we have learned how to install MyBB on CentOS 7. You can now easily install MyBB to create a forum for your community. Using MyBB is very easy, you can now brand the forum with your logo and other settings.
If you find your cPanel disk space filling up, or an email address has hit its disk space quota, cPanel has a helpful built in Email Disk Usage tool. This will provide you with a simple to understand breakdown of how much disk space each folder for a particular email...
Although WHM will normally automatically keep itself up to date, you may want to manually check for server updates / push through an update that is pending, or it may be that you have automatic updates switched off on your cPanel server. In this guide we will show you how...
You may sometimes need to manually adjust the PHP settings on your cPanel server – for example if a site is hitting the PHP memory, or file size upload limit. WHM allows you to quickly change the settings of any PHP version installed on the server when needed, using the...