Simple Machine Forum or SMF is a popular free and open source web application that provides internet forum and message board services.
SMF is written in PHP and the current version as of this writing is 2.1 RC4.
In this tutorial we will install SMF using the LAMP stack.
1 1. Updating the system
To update and upgrade our system, run the command.
sudo apt update && apt upgrade -y
2 2. Apache Installation
In this step we will install the type of web server that we are going to use. To do that run the command.
sudo apt install apache2 -y
Let’s start the Apache web server.
sudo systemctl start apache2
Let’s enable Apache to start on reboot.
sudo systemctl enable apache2
You can check the status of Apache webserver by running this command.
sudo systemctl status apache2
3 3. Database Installation and configuration
The database that we are going to use in this tutorial is MariaDB.
To install MariaDB, run this command.
sudo apt install mariadb-server -y
After the installation, we need to configure MariaDB. To do that run this command.
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.
Enter current password for root (enter for none): Press Enter
You already have a root password set, so you can safely answer 'n'.
Change the root password? [Y/n] n
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
After that restart MariaDB service.
sudo systemctl restart mariadb
4 4. Installation of PHP and PHP extensions
SMF is written in PHP. To run SMF we need to install PHP and some PHP extensions rquired to run SMF. To do that run the following command.
Then Let us restart Apache service for our configuration to take effect.
Before we restart Apache let us check if the configuration we made has no errors. To do that run this command.
If syntax is OK we can proceed in restarting the Apache service
sudo systemctl restart apache2
8 8. SMF Installation
Now that we are finished with configuration we can now access the SMF application through our favorite browser and finalize the installation process.
Open http://mydomain.com on your browser.
You should see the screen above. Let’s continue in finalizing our installation process and click continue.
The next step is setting the database values. Put the values we created in step 5 then click continue.
In the Forum settings modify the Forum name to the name of your forum and select your preferred Registration Mode and you can leave the rest as it is then click continue.
This step will populate the database just click continue.
We are almost done with the installation, in this step you will be required to create an administrator account. Just fill up the form and click continue.
Congratulation we are done with SMF installation but before closing the browser don’t forget to check the check box(Click here to delete this install.php file now. (does not work on all servers.)), this will remove the installation script.
Hope you enjoy our tutorial
You have learned how easy to install SMF on Ubuntu 20.04 with the LAMP stack. If you like this article you might like also our article on phpBB .
If you have questions, feel free to leave a comment and we will try to answer it.