Spin up Ubuntu 12.10 x64 droplet:

<img src="images/how-to-install-simple-machines-on-ubuntu-12-10-section-1.png; width="680">

We recommend using 64 bit distribution as it would let you scale your droplet a lot easier in the future.

Step 1 - Install LAMP stack

install illustration for: Step 1 - Install LAMP stack

To install a LAMP (Linux/Apache/MySQL/PHP) stack on Ubuntu, we will set our dpkg frontend to “noninteractive”.

This lets you complete installation process without being prompted, and speeds up the process.

We should also install sendmail as it will be used to send e-mails to new forum users, and password reset requests.

				
					export DEBIAN_FRONTEND=noninteractive

apt-get -y install apache2 mysql-server mysql-client php5 php5-mysql php5-gd sendmail
				
			

Step 2 - Create A Database

We will create database ‘SMF’ and user ‘SMF’ with password ‘PassWord’, make sure to change it to your own value:

				
					mysqladmin create SMF

mysql -Bse "create user 'SMF'@'localhost' identified by 'PassWord';"

mysql -Bse "grant all privileges on \`SMF\`.* to 'SMF'@'localhost';"

mysqladmin flush-privileges
				
			

Step 3 - Install Simple Machines Forum

You can find latest version of SMF from their website.

We will download latest version and copy it over into Apache’s default folder:

				
					rm -rf /var/www/*

cd /var/www

wget http://mirror.ord.simplemachines.org/downloads/smf_2-0-4_install.tar.gz

tar xvfz smf_2-0-4_install.tar.gz

rm -rf smf_2-0-4_install.tar.gz
				
			

Set Correct Directory and File Permissions

				
					cd /var/www

for dirs in attachments avatars cache Packages Packages/installed.list Smileys Themes agreement.txt Settings.php Settings_bak.php; do chmod 777 $dirs; done
				
			

Now you can finish installation by navigating to your droplet’s IP address:

<img src="images/how-to-install-simple-machines-on-ubuntu-12-10-section-1.png; width="680">

For database credentials, enter the following values, replacing PassWord with your own value from Step 2 above:

				
					Server name: localhost

Username: SMF

Password: PassWord

Database name: SMF

Table prefix: smf_
				
			

If you want to setup multiple forums on same database, you would have to set a unique Table prefix for each forum.

<img src="images/how-to-install-simple-machines-on-ubuntu-12-10-section-1.png; width="680">

In the next step you can customize your forum name, forum URL, and other settings:

<img src="images/how-to-install-simple-machines-on-ubuntu-12-10-section-1.png; width="680">

Your installer will populate the database with tables and required entries:

<img src="images/how-to-install-simple-machines-on-ubuntu-12-10-section-1.png; width="680">

In this next step, you will be asked to create an admin account:

<img src="images/how-to-install-simple-machines-on-ubuntu-12-10-section-1.png; width="680">

Your installation is now (almost) complete:

<img src="images/how-to-install-simple-machines-on-ubuntu-12-10-section-1.png; width="680">

To finish installation, remove install.php file:

				
					rm -rf /var/www/install.php
				
			

<img src="images/how-to-install-simple-machines-on-ubuntu-12-10-section-1.png; width="680">

Setup CAPTCHA

CAPTCHA stands for “Completely Automated Public Turing test to tell Computers and Humans Apart”, and is used to prevent spamming on your forums.

You can prevent forum spamming by requiring new users to pass this test. This module can be downloaded from Simple Machines mods – Anti Spam: KeyCAPTCHA.

This module protects new user registration, forum searching, new posts, private messaging, and quick replies by guests.

A demo of KeyCAPTCHA is available at author’s website.

Integrating Simple Machines Forum with WordPress

This plugin would let your users be registered in both databases at the same time. It would also synchronize profile and role updates between your forum and blog.

You can install it on a new or existing Simple Machines forum and WordPress installation.

This plugin would migrate existing users to both SMF and WordPress databases.

Login and logout out process is simplified as you would only need to do it on either forum or blog to be logged into or logged out of both.

And you are all done!