Published on April 21, 2016 by Daniel Lanza
This tutorial will explain how to install MyBB in Ubuntu Server.
A Ubuntu Server virtual machine with:
Check out these posts to get ready:
Our virtual machine has two network adapters. The second one (eth1) is a host-only adapter with a static IP address -> 192.168.56.101
Apache Web Server needs to be running. The installation and configuration was indicated in the previous post.
sudo apt-get install apache2
MySQL will be the database management system.
We have installed MySQL. However, we are going to install other libraries and modules that let MyBB communicate easily with the database.
sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql
PHP is a requirement for MyBB.
sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt
sudo service apache2 restart
Check out PHP is working.
By default, HTML and PHP files needs to be placed in /var/www/html. So, we are going to create a simple PHP file in that path.
sudo nano /var/www/html/info.php
Type the following content and save the file.
<?php phpinfo(); ?>
Check out you can display the PHP file on your local machine by typping http://192.168.56.101/info.php.
MySQL database needs to be initialized with the following command:
Then, our database needs to be secure. Run the following command:
And answer the following questions. Feel free to change your answers 😃
PHP files needs to take preference over HTML files. Hence, we are going to change Apache file configuration.
sudo vim /etc/apache2/mods-enabled/dir.conf
Make sure index.php is before index.html
<IfModule mod_dir.c> DirectoryIndex index.php index.html index.cgi index.pl index.xhtml index.htm </IfModule>
Save and restart Apache.
sudo service apache2 restart
We need to create a database for our application. Log into MySQL as root user.
mysql -u root -p
You will be in MySQL interface (mysql >).
Create an empty database.
CREATE DATABSE mybb;
Create a user.
CREATE USER 'mybbuser'@'localhost' IDENTIFIED BY 'password';
Grant permissions to the new user.
GRANT ALL PRIVILEGES ON mybb.* TO 'mybbuser'@'localhost';
Reload all privileges with a flush command and exit the MySQL interface.
FLUSH PRIVILEGES; exit
We are going to download the MyBB package, so we are going to create a temp folder to place them.
mkdir ~/temp cd ~/temp
Download MyBB package, unzip and place Upload directory in ~/temp. You can do it by FTP or Samba.
sudo mv ~/temp/Upload /var/www/htm/forum
The installation wizard is available in the following address: http://192.168.56.101/forum/install/
As you can see, there are some errors because we need to meet MyBB requirements.
First, we place into /var/www/htm/forum
Rename inc/config.default.php to inc/config.php.
sudo mv inc/config.default.php inc/config.php
Check again the MyBB requirements by the following url -> http://192.168.56.101/forum/install/.
Give write permissions to cache/, uploads/ and uploads/avatars/.
sudo chmod 777 cache sudo chmod 777 uploads sudo chmod 777 uploads/avatars
Check out again the MyBB requirements, and now we meet them. So, we can follow the installation.
Fill out the database configuration.
The installation wizard will create tables for MyBB application.
Congratulations! You have successfully installed your MyBB. Go to your new MyBB forum -> http://192.168.56.101/forum/.
Ups! Remove the install directory from your server to prevent other user runs the installation again.
sudo rm -r /var/www/forum/install
Try again the forum url -> http://192.168.56.101/forum/.
You got it! Enjoy your new MyBB forum on Ubuntu Server 😃comments powered by Disqus
This tutorial will explain how to set up a Ubuntu Server virtual machine with: Apache FTP Samba First, check out how to install Ubuntu Server on VirtualBox to get ready a virtual machine to test. Our virtual machine has two network adapters. The second one (eth1) is a host-only adapter with a static IP address -> 192.168.56.101 Apache Web Server Apache Web Server needs to be running. The installation and configuration was indicated in the previous post.Read more
This tutorial will explain how to install Ubuntu Server on a virtual machine. First, you need to have Ubuntu Server ISO file and VirtualBox installed. VirtualBox Ubuntu Server Create a new virtual machine on VirtualBox by clicking on New. Create new virtual machine Select type and version of the virtual machine. In this case, Linux and Ubuntu (64-bits). Select type and version of the virtual machine Select the amount of memory (RAM).Read more