Learn How To Install Vanilla Forum on Ubuntu 16.04

February 13, 2019

Table of Contents

If you are using a different system, please check our other tutorials.

Vanilla forum is an open source forum application written in PHP. It is a fully customizable, easy to use, and supports external themes and plugins. It is packed with all the required features needed to run a forum. You can install a responsive theme to make the forum responsive to different screen sizes, or you can create a theme matching the style of your website. It supports SSO using WordPress, Jquery, SAML or OAuth. You can also set up social logins using Google, Facebook or Twitter. It easily integrates with many applications such as WordPress, MailChimp, Zendesk, Github, Salesforce and much more.

This guide was written for Vanilla Forums 2.3, but may also work on newer releases.

In this tutorial, we will install the latest version of Vanilla forum on Ubuntu 16.04 server.

Prerequisites

  • An ITWeb.Services Ubuntu 16.04 server instance.
  • A sudo user.

For this tutorial, we will use forum.example.com as the domain name pointed towards the IT Web Services instance. Please make sure to replace all occurrences of the example domain name with the actual one.

https://www.itweb.services/tutorials/linux-guides/how-to-update-centos-7-ubuntu-16-04-and-debian-8″>How to Update Ubuntu 16.04. Once your system has been updated, proceed to install the dependencies.

Install Apache

Install Apache.

sudo apt -y install apache2

Start Apache and enable it to automatically run at boot time.

sudo systemctl start apache2
sudo systemctl enable apache2

Install PHP 7

In this tutorial, we will use PHP 7 to obtain maximum security and stability. Install PHP 7 along with the modules required by Vanilla Forum.

sudo apt -y install php libapache2-mod-php php-gd php-mysql php-mbstring php-curl php-cli php-pear php-dev

Install MariaDB

MariaDB is a fork of MySQL. Add the MariaDB repository into the system.

sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
sudo add-apt-repository 'deb [arch=amd64,i386,ppc64el] http://mirror.nodesdirect.com/mariadb/repo/10.2/ubuntu xenial main'

Install MariaDB.

sudo apt update
sudo apt -y install mariadb-server

Provide a strong password for the MariaDB root user when asked. Start MariaDB and enable it to automatically start at boot time.

sudo systemctl start mariadb
sudo systemctl enable mariadb

Before configuring the database, you will need to secure MariaDB.

sudo mysql_secure_installation

You will be asked for the current MariaDB root password. Provide the password you have set during the installation. You will be asked if you wish to change the existing password of the root user of your MariaDB server. You can skip setting a new password if you have already provided a strong password during installation. Answer “Y” to all of the other questions which are asked. The questions asked are self-explanatory.

Log into the MySQL shell as root.

mysql -u root -p

Provide the password for the MariaDB root user to log in.

Run the following queries to create a database and a database user for Vanilla installation.

CREATE DATABASE vanilla_data CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE USER 'vanilla_user'@'localhost' IDENTIFIED BY 'StrongPassword';
GRANT ALL PRIVILEGES ON vanilla_data.* TO 'vanilla_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;

You can replace the database name vanilla_data and username vanilla_user according to your choice. Please make sure to change StrongPassword to a very strong password.

Install Vanilla forum

Download the Vanilla forum zip archive.

wget https://open.vanillaforums.com/get/vanilla-core.zip

Install unzip.

sudo apt -y install unzip

Extract the archive.

sudo unzip vanilla-core.zip -d /var/www/vanilla

Provide the appropriate ownership.

sudo chown -R www-data:www-data /var/www/vanilla

Create virtual host

Create a virtual host for your Vanilla forum site.

sudo nano /etc/apache2/sites-available/forum.example.com.conf

Populate the file.

<VirtualHost *:80>
    ServerName forum.example.com
    DocumentRoot /var/www/vanilla
    <Directory /var/www/vanilla>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
    </Directory>
</VirtualHost>

Activate the configuration.

sudo a2ensite forum.example.com.conf

Enable the Apache rewrite module.

sudo a2enmod rewrite

Restart Apache.

sudo systemctl restart apache2

Wrapping Up

Now that you have successfully installed and configured Vanilla forum, you can access the application on http://forum.example.com. Provide the database and administrator details. Once you have provided the required database and admin details, the setup will write into the database and you will be taken to the administration interface. You can now configure the forum according to your needs.

Congratulations, you have successfully installed Vanilla forum in Ubuntu 16.04 server.

Need help?

Do you need help setting up this on your own service?
Please contact us and we’ll provide you the best possible quote!