In this tutorial, we will show you how to install and configure the Simple Machines Forum on Ubuntu 15.04. 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 open-source software that 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 and assumes you are running in the root account, if not you may need to add ‘sudo
‘ to the commands to get root privileges. I will show you the step-by-step installation of the Simple Machines Forum on a Ubuntu 15.04 server.
Prerequisites
- A server running one of the following operating systems: Ubuntu 15.04, and any other Debian-based distribution.
- It’s recommended that you use a fresh OS install to prevent any potential issues.
- SSH access to the server (or just open Terminal if you’re on a desktop).
- A
non-root sudo user
or access to theroot user
. We recommend acting as anon-root sudo user
, however, as you can harm your system if you’re not careful when acting as the root.
Install Simple Machines Forum on Ubuntu 15.04
Step 1. First, make sure that all your system packages are up-to-date by running the following apt-get
commands in the terminal.
sudo apt-get update sudo apt-get upgrade
Step 2. Install LAMP (Linux, Apache, MariaDB, PHP) server.
A Ubuntu 15.04 LAMP server is required. If you do not have LAMP installed, you can follow our guide here. Also, install all required PHP modules:
sudo apt-get install php5 libapache2-mod-php5 php5-mysql php5-curl php5-gd
Step 3. Installing Simple Machines Forum.
The first thing to do is to go to Simple Machines Forum’s download page and download the latest stable version of Simple Machines Forum, At the moment of writing this article it is version 2.0.11:
wget https://download.simplemachines.org/index.php?thanks;filename=smf_2-0-19_install.tar.gz
Unpack the Simple Machines Forum archive to the document root directory on your server:
tar -xvf smf_2-0-19_install.tar.bz2 -C /var/www/html
We will need to change some folders permissions:
chown www-data:www-data -R /var/www/html/
Step 4. Configuring MariaDB for Simple Machines Forum.
By default, MariaDB is not hardened. You can secure MariaDB using the mysql_secure_installation
script. you should read and below each step carefully which will set a root password, remove anonymous users, disallow remote root login, and remove the test database and access to secure MariaDB:
mysql_secure_installation
Configure it like this:
- Set root password? [Y/n] y - Remove anonymous users? [Y/n] y - Disallow root login remotely? [Y/n] y - Remove test database and access to it? [Y/n] y - Reload privilege tables now? [Y/n] y
Next, we will need to log in to the MariaDB console and create a database for the Simple Machines Forum. Run the following command:
mysql -u root -p
This will prompt you for a password, so enter your MariaDB root password and hit Enter. Once you are logged in to your database server you need to create a database for Simple Machines Forum installation:
CREATE DATABASE smf; CREATE USER 'smf_user'@'localhost' IDENTIFIED BY 'Your_Paasword'; GRANT ALL PRIVILEGES ON `smf`.* TO 'smf_user'@'localhost'; FLUSH PRIVILEGES;
Step 5. Accessing the Simple Machines Forum Web UI.
SMF will be available on HTTP port 80 by default. Open your favorite browser and navigate to http://your-domain.com
or http://your-server-ip
. and complete the required steps to finish the installation. If you are using a firewall, please open port 80 to enable access to the control panel. When you are finished with the installation you should remove install.php from the SMF directory due to security.
rm -rf /var/www/html/install.php
Congratulations! You have successfully installed the Simple Machines Forum. Thanks for using this tutorial for installing Simple Machines Forum (SMF) on your Ubuntu 15.04 system. For additional help or useful information, we recommend you check the official Simple Machines Forum website.