Vanilla Forum is an open-source forum application written in PHP. It is 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 many more.
This guide was written for Vanilla Forums 2.3, but may also work on newer releases.
An AKLWEB HOST CentOS 7 Server instance.
A sudo user.
For this tutorial, we will use forum.example.com the domain name pointed toward the AKLWEB HOST instance. Please make sure to replace all occurrences of the example domain name with the actual one.
Install Apache.
sudo yum -y install httpdStart Apache and enable it to automatically run at boot time.
sudo systemctl start httpd
sudo systemctl enable httpdWe will use PHP 7.1 to obtain maximum security and stability. First, add and enable the Remi repository.
sudo rpm -Uvh http://rpms.remirepo.net/enterprise/remi-release-7.rpm
sudo yum -y install yum-utils
sudo yum-config-manager --enable remi-php71Install the latest version of PHP along with the modules required by Vanilla Forum.
sudo yum -y install php php-gd php-mysqli php-mbstring php-curl php-cli php-pear php-devel php-opensslMariaDB is a fork of MySQL. Add the MariaDB repository to your system. The default YUM repository contains an older version of MariaDB, which is unsupported by Vanilla.
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.repoInstall MariaDB.
sudo yum -y install mariadb mariadb-serverStart MariaDB and enable it to automatically start at boot time.
sudo systemctl start mariadb
sudo systemctl enable mariadbBefore configuring the database, you will need to secure MariaDB first.
sudo mysql_secure_installationYou will be asked for the current MariaDB root password. By default, there is no root password in a fresh MariaDB installation. Press the Enter key to proceed. Set a strong password for the root user of your MariaDB server and answer Y all of the other questions that are asked. The questions asked are self-explanatory.
Log in to the MySQL shell as root.
mysql -u root -pProvide the password for the MariaDB root user to log in.
Run the following queries to create a database and a database user for the 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.
Download the Vanilla forum zip archive.
wget https://open.vanillaforums.com/get/vanilla-core.zipInstall unzip.
sudo yum -y install unzipExtract the archive.
sudo unzip vanilla-core.zip -d /var/www/vanillaProvide the appropriate ownership.
sudo chown -R apache:apache /var/www/vanillaAllow HTTP traffic on port 80 through the firewall.
sudo firewall-cmd --zone=public --permanent --add-service=http
sudo firewall-cmd --zone=public --permanent --add-service=https
sudo firewall-cmd --reloadCreate a virtual host for your Vanilla forum site.
sudo nano /etc/httpd/conf.d/forum.example.com.confPopulate 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>Restart Apache.
sudo systemctl restart httpdNow that you have successfully installed and configured the Vanilla forum, you can access the application at http://forum.example.com. Provide the database and administrator details. Once you have provided the required database and admin details, the setup will write to 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 the Vanilla forum on the CentOS 7 server.