For those of you who didn’t know, Simple Machines Forum (SMF) is a free, professional grade software package that allows you to set up your own online community within minutes. It is an open-source software which is written in PHP and uses a MySQL/MariaDB database. It provides many features and it is user-friendly.
This article assumes you have at least basic knowledge of linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple. I will show you through the step by step installation Simple Machines Forum on CentOS 7.
Step 1. First of all make sure that all packages are up to date.
yum -y update
Step 2. Install LAMP server and include some php extension.
yum install mysql-server httpd php php-mysql php-gd php-curl php-apc php-cli php-mbstring
Start service Apache and MySQL:
systemctl start mysqld
systemctl start httpd
Step 3. Configuring MySQL.
By default, MySQL is not hardened. You can secure MySQL using the mysql_secure_installation script. you should read and below each steps carefully which will set root password, remove anonymous users, disallow remote root login, and remove the test database and access to secure MySQL.
Next we will need to log in to the MySQL console and create a database for the forum. Run the following command:
mysql -u root -p
This will prompt you for a password, so enter your MySQL root password and hit Enter. Once you are logged in to your database server you need to create a database for the Simple Machines Forum software:
CREATE DATABASE smf;
CREATE USER 'smf_user'@'localhost' IDENTIFIED BY 'YoUr_PaSsWoRd';
GRANT ALL PRIVILEGES ON `smf`.* TO 'smf_user'@'localhost';
Step 4. Configure Apache web server for SMF.
Download latest Simple Machines Forum on your server:
tar -zxvf smf_2-0-9_install.tar.gz
We will need to change some folders permissions:
chmod 777 attachments avatars cache Packages Smileys Themes
Step 5. Accessing Simple Machines Forum.
SMF will be available on HTTP port 80 by default. Open your favorite browser and navigate to http://yourdomain.com or http://server-ip. You should see the SMF installer:
Congratulation’s! You have successfully installed Simple Machines Forum. Thanks for using this tutorial for installing Simple Machines Forum on CentOS 7 system.