SMF is a very user friendly forum platform for LAMP servers. Simple Machines is easy to configure and build. Our instructions will make for an easy installation. Just follow the commands on the instruction sheet.
Forums are a big target for spammers, and other actors. We have eliminated some of the security risks by only granting the permissions we need to grant, working through every issue we encountered to make the instructions as simple and safe as we can make them.
Another positive side effect, was our ability to always get the latest stable version, so this downloads 2.0.10 at the moment it was written, or 2.10 when it becomes stable in the future. This also makes the installations safer.
The instructions are for a fresh installation, not an upgrade, and they were tested and saved to video on a VPS CentOS 7 64-bit minimal.
- Instructions were verified on InterServer’s OpenVZ VPS Hosting, with CentOS 7 64-bit (instructions are for minimal distribution, but should work for regular distribution as well).
- Putty or similar SSH client
- root login and password or an account capable of sudo
- A working LAMP server - See our instructions here
- nano or similar text editor installed
We have to update the system, to make sure everything will work:
sudo yum update
Now, will prepare to download the software into a sub-directory off ~:
Will download the files from SMF. Notice we are getting the "latest", meaning the latest stable version.
sudo wget wget -O smf.tar.gz http://www.simplemachines.org/download/index.php/latest/install/
Will use tar to extract the contents:
sudo tar -zxvf smf.tar.gz
Creating the database for SMF:
sudo mysql -u root -p
In the mysql console, will run these commands. All values (database name, user, password) need to be changed to anything you want. Make sure you write them down, because you will use them later
Paste these in line by line and change the db name, smf_user and password to your preference:
CREATE DATABASE smf;
CREATE USER smf_user@localhost IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON smf.* TO smf_user@localhost;
We have to copy the files over to where Apache can see them. Will use rsync, so nothing gets missed:
sudo rsync -avP ~/forum/ /var/www/html/forum
If you receive the error: rsync not found, install it and try again:
sudo yum install rsync
The first thing will do is give apache ownership of the php files we are about to execute:
sudo chown apache:apache /var/www/html/forum/*
We are done on this side. Now we have to open our browser to complete the configuration.
Go to yourdomain.com/forum/ or replace yourdomain.com with your IP, if you have not configured this yet.
Ok, we had a permissions problem. The documentation told us to expect this, so will address it one file at a time, through our SSH connection:
sudo chmod 777 /var/www/html/forum/Packages/installed.list
Back to the browser, click on "click here" at the bottom right. Looks like it worked!
We are finished. Let's check our new forum and dream of the possibilities!
We tested further, by testing categories and boards. Everything works, so it's time to clean up:
sudo rm /var/www/html/forum/install.php
sudo rm /var/www/html/forum/smf.tar.gz
We will also want to clean up our ~/forum directory:
lsMake sure we are in the right place.
sudo rm -rf forum
This website is supported by our affiliation with web hosting companies. We encourage you to visit our friends at Interserver. They really do offer $6 per month VPS Hosting. Linux, windows and cpanel available, have super fast service, and they care about their customers