Using a Different System?
How to Install Vanilla Forum on CentOS 7
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.
- A Vultr Ubuntu 16.04 server instance.
- A sudo user.
For this tutorial, we will use
forum.example.com as the domain name pointed towards the Vultr instance. Please make sure to replace all occurrences of the example domain name with the actual one.
Update your base system using the guide How to Update Ubuntu 16.04. Once your system has been updated, proceed to install the dependencies.
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
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'
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.
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
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.
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
sudo systemctl restart apache2
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.
Want to contribute?
You could earn up to $300 by adding new articles
Suggest an update
Request an article
Leave a Reply