banner
Previous Page
PCLinuxOS Magazine
PCLinuxOS
Article List
Disclaimer
Next Page

Installing Your Own Forum With SMF


by YouCanToo


What is SMF? Simple Machines Forum – SMF in short – is a free, professional grade software package that allows you to set up your own online community within minutes.

It's powerful custom made template engine puts you in full control of the lay-out of your message board.

SMF is written in the popular language PHP and can use MySQL, PostgreSQL or SQLite databases, depending on the version of SMF. It is designed to provide you with all the features you need from a bulletin board, while having an absolute minimal impact on the resources of the server. SMF is the next generation of forum software and best of all it is completely free to use!

So, do you want to setup and run your own forum using SMF software?

Let's start by getting the required programs.

NOTE: This has only been installed on a 32bit system, as that is what I run. I have not tried installing this on a 64bit system, though the installation for the SMF software should be similar.

The forum software itself can be found here. The current version as of this writing is 2.0.9. Save it to your downloads folder. For those who prefer not to install software from outside of the repository, version 2.0.4-1pclos can be found in Synaptic.

Next, we need to install some software from synaptic. We need the following files and any dependencies.

apache_base
apache-mod_deflate
apache-mod_perl
apache-mod_php
apache-mpm-prefork

gd
gd-bundled

mysql
mysql-client

phpmyadmin or webmin for administering the mySQL database.

Now that you have the above software installed, let's begin!

Start out, as the root user, by creating a smf directory in your /var/www/html folder using the following command.

mkdir /var/www/html/smf

Now copy the SMF software you downloaded earlier, to the /var/www/html/smf folder using the following command.

cp /home/username/Downloads/smf_2-0-9_tar.gz /var/www/html/smf

Lets extract our smf package. In your /var/www/html/smf folder we will use the following command.

tar zxvf smf_2-0-9_tar.gz

Once you have extracted the files, we need to change some permissions to the folders and files. In a console window, as the root user, enter the following commands.

Note: Make sure you are in the folder /var/www/html/smf

The following files and folders need their permissions changed. In a console window, as the root user, use the command in the following format.

chmod 777 filename

where filename is replace with the actual folder or file name.

Permission

777
777
777 -R
777
777
755
755
755
755
      File or Folder Name

attachments
avatars
Packages
Smileys
Themes
agreement.txt
Settings.php
Settings_bak
install.php

Create a new database using phpMyAdmin

Open your favorite web browser and point it to http://localhost/phpmyadmin.

You should be greeted with the following window.



The login by default with phpmyadmin is root using no password. Once logged in you should see this page.



Now lets create our new database. In the left hand pane, click on new.



We now need to give our database a name. For this tutorial, I chose the name smf209.



Once you have entered your database name, press CREATE.

Now that your database has been created, you need to select it from the left hand pane. You will then see an area to create a table(s). We are not going to create any tables, but we are going to click on the Privileges tab. You will then see this window.



Under "New" click on the Add user link. We now are greeted with the following screen.

Here is where we setup a username and password for our database.

WARNING: Make sure that you copy your username and password down and store it in a safe place. If you should forget it, well, let's just say you are not going to be very happy!



When you are finished, be sure to scroll down to the bottom of the window and click SAVE.

Now that we have finished creating the required database with username and password, let's install the SMF software itself.

Installing the SMF software

Again using your favorite web browser, point it to the smf directory http://localhost/smf/install.php. You will be greeted with the SMF installer. It will perform a series of seven (7) steps to get the forum software up and running properly.

STEP 1. It is going to gather some data about our server and software. If there are any issues found, they will be displayed.



Great! We can move on. Click on the CONTINUE button.

STEP 2. The installer is going to check that it indeed has the necessary write permissions for the files and folders. It is now going to ftp into our system. If you do not have an ftp server installed, stop, and install one using Synaptic. vsFTPD is a very secure and easy to setup FTP server. If you do not know how to setup an ftp server, please ask in the forum.



We did well and were sent to the next step. If any of the permissions were wrong, it would have displayed a warning box.

STEP 3. We now need to tell the program about our database - username- password.



Again, make sure that you make a copy of your username and password and keep it somewhere safe. Once you have entered the information above, click CONTINUE.

STEP 4. You will be asked to enter some general forum settings, like the name of your new forum and the url of your forum.



In our case the URL of your forum should be http://localhost/smf. Again, when you have finished, click CONTINUE.

STEP 5. This is the population of your new database with its tables and other necessary files.



When you have finished, select CONTINUE.

STEP 6. Here we add an administrator for our new forum. This is the username and password that you will use to login to your forum.



See, I told you that you needed to remember that database password! When you are finished, click CONTINUE.

STEP 7. This is our final step in setting up our forum software. Be sure to checkmark the box about deleting the install.php file. Leaving it is a SECURITY RISK.



Now just click on the link "your newly installed forum."



What's this! It appears that the installed DID NOT remove the install.php from from the smf directory. Don't worry, this isn't a big problem. To remove the install.php file simply open a console window as the root user and cd to /var/www/html/smf, and once you are in that directory, enter the following command:

rm -f install.php

I told you it wasn't a big problem. Now go back to your web browser and press refresh (or F5), and you should now see your new forum.



Ahhh, that's better. You can access your forum by simply pointing your web browser to http://localhost/smf or by IP address if you have one at http://youripaddress/smf



Previous Page              Top              Next Page