Tutorials  /  Linux Basics

Install Vanilla Forum on CentOS 7 with PHP & MariaDB

Ccentron Redaktion · June 2025 ·6 min read ·Linux Basics, Tutorial

Vanilla Forum is a PHP-based open-source forum platform. It's fully customizable, user-friendly, and supports plugins and themes. With the ability to install responsive themes, it adjusts to various screen sizes, or you can develop your own theme to match your site design.

Vanilla offers Single Sign-On (SSO) via WordPress, jQuery, SAML, or OAuth. Additionally, social login functionality can be set up using providers like Google, Facebook, or Twitter. Integration is straightforward with tools like WordPress, MailChimp, Zendesk, GitHub, Salesforce, and others.

This documentation is tailored for Vanilla Forums version 2.3, though it may be compatible with later versions as well.

Prerequisites

  • One CentOS 7 server instance.
  • A user with sudo privileges.
  • Throughout this guide, the domain forum.example.com will be used. Replace it with your actual domain name in practice.

Start by updating your base system using the tutorial "How to Update CentOS 7." After completing the system update, continue by installing the necessary packages.

VM

Matching infrastructure at centron

No hardware needed to follow along: ccloud³ VMs with full root access start at €3.12 per month, billed by the hour and ready in seconds. Rent a cloud server →

Step 1: Install Apache

Begin by installing the Apache web server.

Console
sudo yum -y install httpd

Start the Apache service and configure it to launch on system boot.

Console
sudo systemctl start httpd
sudo systemctl enable httpd

Step 2: Install PHP 7.1

For optimal security and reliability, PHP version 7.1 will be used. First, enable the Remi repository.

Console
sudo rpm -Uvh http://rpms.remirepo.net/enterprise/remi-release-7.rpm
sudo yum -y install yum-utils
sudo yum-config-manager --enable remi-php71

Install the latest PHP version along with the modules required for Vanilla Forum.

Console
sudo yum -y install php php-gd php-mysqli php-mbstring php-curl php-cli php-pear php-devel php-openssl

Step 3: Install and Configure MariaDB

MariaDB, a MySQL-compatible database, will be used in this setup. Since the default YUM repository contains an outdated version not supported by Vanilla, you'll need to add the official MariaDB repository manually.

Create the MariaDB YUM repository file using the command below:

Console
echo "[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.2/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1" | sudo tee /etc/yum.repos.d/mariadb.repo

Next, install MariaDB using the following command:

Console
sudo yum -y install mariadb mariadb-server

Start MariaDB and set it to launch automatically when the system boots:

Console
sudo systemctl start mariadb
sudo systemctl enable mariadb

Before creating the database, it's important to secure your MariaDB installation:

Console
sudo mysql_secure_installation

When prompted for the current root password, just press Enter since there is no password set by default. Then, assign a secure root password and answer Y to all subsequent prompts.

To proceed, log into the MariaDB shell as root:

Code
mysql -u root -p

After entering the root password, run the following SQL commands to create the database and user for the Vanilla Forum application:

Code
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 are free to replace vanilla_data and vanilla_user with names of your choice. Make sure to choose a strong password instead of StrongPassword.

Step 4: Install Vanilla Forum

Start by downloading the compressed archive of Vanilla Forum.

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

Install the unzip utility if it is not already present on your system:

Console
sudo yum -y install unzip

Extract the contents of the archive into the web root directory:

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

Update file ownership so that Apache has proper permissions:

Console
sudo chown -R apache:apache /var/www/vanilla

Step 5: Configure Firewall Access

Enable HTTP and HTTPS traffic through the system firewall:

Console
sudo firewall-cmd --zone=public --permanent --add-service=http
sudo firewall-cmd --zone=public --permanent --add-service=https
sudo firewall-cmd --reload

Step 6: Set Up Virtual Host

Create a virtual host configuration file for your forum domain:

Console
sudo nano /etc/httpd/conf.d/forum.example.com.conf

Insert the following configuration into the file:

Code
<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>

Restart Apache for the changes to take effect:

Console
sudo systemctl restart httpd

Wrapping Up

You have now successfully installed and configured Vanilla Forum. Open your browser and go to http://forum.example.com to begin the setup process. Fill in your database credentials and administrator account details. Once completed, the setup will store the necessary configurations in your database and redirect you to the admin panel. You can now proceed to personalize your forum as needed.

Conclusion

Setting up Vanilla Forum on CentOS 7 with Apache, PHP 7.1, and MariaDB provides a robust and scalable discussion platform. With theme and plugin support, integration options, and SSO capabilities, Vanilla is ideal for building modern community forums. After completing this guide, your forum is ready for use and further customization to match your project's needs.

Jetzt 200 € Guthaben sichern

Testen Sie Ihr Setup auf ccloud³

Registrieren Sie sich in der ccloud³ und erhalten Sie 200 € Startguthaben für Ihr Projekt – z. B. für eine PostgreSQL-VM mit automatischen Backups.

centron Redaktion Technische Redaktion

Das Redaktionsteam von centron schreibt Anleitungen aus dem Betriebsalltag: getestet auf unserer eigenen Plattform, betrieben im Rechenzentrum in Hallstadt bei Bamberg.

Kategorie Linux Basics
Teilen
Noch offene Fragen?

Our team will help you with your specific setup - in German or English, by people who run the platform themselves.

War dieses Tutorial hilfreich?

Your answer is stored anonymously and helps us improve our tutorials.

Kommentare

No comments yet - be the first to ask a question about this tutorial.

Sign in to comment

Comments are open to centron customers. Sign in to your account to ask a question about this tutorial.

Weiterlesen

Das könnte Sie auch interessieren

Jetzt kostenlos anfangen

Melden Sie sich an und erhalten Sie in den ersten 60 Tagen ein Guthaben von 200 € bei centron.

Dieses Werbeangebot gilt nur für neue Konten. Angebot ausschließlich für Gewerbetreibende.

Jetzt loslegen Sales kontaktieren