miniBB or Mini Bulletin Board is a PHP based standalone, open source program for building your own Internet forums. In this tutorial we will install miniBB on a CentOS 7 VPS with Apache, PHP and MariaDB.
Log in to your CentOS server via SSH as user root
and first of all make sure that all packages installed on your server are up to date:
yum -y update
miniBB requires and empty database, so we will have to install a database server. Run the following command to install MariaDB server:
yum install mariadb mariadb-server
Start the MariaDB database server and enable it to start at the boot time:
systemctl start mariadb systemctl enable mariadb
Run the ‘mysql_secure_installation’ script to secure the database server and set your MariaDB root password.
Log in to the MariaDB server using the MySQL ‘root’ user and create new database and user for miniBB:
mysql -u root -p CREATE DATABASE minibb; CREATE USER 'minibbuser'@'localhost' IDENTIFIED BY 'PASSWORD'; GRANT ALL PRIVILEGES ON `minibb`.* TO 'minibbuser'@'localhost'; FLUSH PRIVILEGES;
Don’t forget to replace ‘PASSWORD’ with a strong password.
Install Apache web server
yum install httpd
Start the web server and add it to automatically start on the system start-up:
systemctl start httpd systemctl enable httpd
miniBB is a PHP based application and it requires PHP. So, install PHP on your server:
yum install php php-common
Download the latest stable release of miniBB forum from their official website. At the moment of writing this article it is version 3.2.1.
Unpack the downloaded zip archive to the document root directory on your server:
unzip minibb.zip -d /var/www/html
If you are not sure where is your document root directory you can use the following command to find out:
grep -i '^documentroot' /etc/httpd/conf/httpd.conf DocumentRoot "/var/www/html"
Change the ownership of the miniBB files:
chown -R apache:apache /var/www/html/minibb
Now, open the ‘setup_options.php’ file which contains almost every common option of miniBB. We will enter the information of the MySQL database we created in this post and create a new administrator user.
vim /var/www/html/minibb/setup_options.php $DBhost='localhost'; $DBname='minibb'; $DBusr='minibbuser'; $DBpwd='PASSWORD'; $admin_usr = 'ADMIN_USR'; $admin_pwd = 'ADMIN_PASSWORD'; $admin_email = 'firstname.lastname@example.org'; $main_url='http://yourdomain.com';
More information about the options available in the configuration file you can find at miniBB’s official website
Next, create Apache virtual host for your domain. Create ‘/etc/httpd/conf.d/vhosts.conf’ file with the following content
vim /etc/httpd/conf.d/vhosts.conf IncludeOptional vhosts.d/*.conf
and create the virtual host
vim /etc/httpd/vhosts.d/yourdomain.com.conf <VirtualHost YOUR_SERVER_IP:80> ServerAdmin email@example.com DocumentRoot "/var/www/html/minibb/" ServerName yourdomain.com ServerAlias www.yourdomain.com ErrorLog "/var/log/httpd/yourdomain.com-error_log" CustomLog "/var/log/httpd/yourdomain.com-access_log" combined <Directory "/var/www/html/minibb/"> DirectoryIndex index.html index.php Options FollowSymLinks AllowOverride All Require all granted </Directory> </VirtualHost>
Restart the Apache web server for the changes to take effect.
systemctl restart httpd
Now, navigate your favorite web browser to http://yourdomain.com/_install.php to finish the miniBB installation.
Of course you don’t have to do any of this if you use one of our Linux VPS Hosting services, in which case you can simply ask our expert Linux admins to install miniBB for you. They are available 24×7 and will take care of your request immediately.
PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.