How to install Simple Machine Forum on CentOS 7

To install Simple Machine Forum on CentOS 7

Simple Machines Forum, also known as SMF, is a free, popular professional grade forum platform, and it is widely used for setting up an online forum within few minutes. SMF is built based on PHP and uses a MySQL/MariaDB for database storage. It provides many features and it is user-friendly. In this tutorial you will get briefed on the method to install Simple Machine Forum on CentOS 7.

Pre-requirement
Install LAMP(apache, php 7, mariadb)
In mariadb (create database, user and give privilages to user)

For php
Install
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

php modules(yum install -y mod_php71w php71w-cli php71w-common php71w-gd php71w-mbstring php71w-mcrypt php71w-mysqlnd php71w-xml)

Installing Simple Machine Forum

Before you begin the installation process you should get into your HTML location, from where all the actions are to be executed. Run the following command for the same purpose.

[root@linuxhelp ~]# cd /var/www/html/


And once you are in there, you shall download the SMF package by simply running the wget command in the following manner.

[root@linuxhelp html]# wget https://download.simplemachines.org/index.php/smf_2-0-14_install.zip
--2017-11-18 02:06:57--  https://download.simplemachines.org/index.php/smf_2-0-14_install.zip
Resolving download.simplemachines.org (download.simplemachines.org)... 66.71.247.135, 66.71.247.134
Connecting to download.simplemachines.org (download.simplemachines.org)|66.71.247.135|:443... connected.
HTTP request sent, awaiting response... 200 OK
Syntax error in Set-Cookie:  at position 0.
Length: unspecified [application/octet-stream]
Saving to: ‘ smf_2-0-14_install.zip’ 

    [                 < =>                    ] 26,94,219    586KB/s   in 4.5s   

2017-11-18 02:07:08 (586 KB/s) - ‘ smf_2-0-14_install.zip’  saved [2694219]


When the file is downloaded, you need to extract it by running the following command. Here the file is extracted in .zip format.

[root@linuxhelp html]# unzip smf_2-0-14_install.zip -d smf
Archive:  smf_2-0-14_install.zip
  inflating: smf/proxy.php           
  inflating: smf/SSI.php             
  inflating: smf/subscriptions.php   
  inflating: smf/index.php           
  inflating: smf/Themes/index.php    
  inflating: smf/Themes/default/Stats.template.php  
  inflating: smf/Themes/default/ManageScheduledTasks.template.php  
  inflating: smf/Themes/default/Notify.template.php  
  inflating: smf/Themes/default/Themes.template.php  
  inflating: smf/Themes/default/ManageMail.template.php  
.
.
.
inflating: smf/Settings_bak.php    
  inflating: smf/install_2-0_postgresql.sql  
  inflating: smf/install_2-0_mysql.sql  
  inflating: smf/install_2-0_sqlite.sql  

Once you are done with that, you need to change the ownership of extracted directory. You shall make use of the chown command as follows.

[root@linuxhelp html]# chown -R apache.apache smf

And then follows an important step. You need to create Apache VirtualHost for the SMF application and you need to configure it. So, let us create a .conf file as follows.

[root@linuxhelp html]# vim /etc/httpd/conf.d/smf.conf

And in that file, you need to make the following configuration.

< virtualHost *:80> 
ServerAdmin admin@linuxhelp11.com
DocumentRoot /var/www/html/smf/
ServerName linuxhelp11.com
ServerAlias www.linuxhelp11.com
< Directory /var/www/html/smf/> 
Options FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
< /Directory> 
ErrorLog /var/log/httpd/linuxhelp11.com-error_log
CustomLog /var/log/httpd/linuxhelp11.com-access_log common
< /VirtualHost> 

Once you are done, you shall save the file and exit.

Later, you must make an entry in hosts file as follows.

[root@linuxhelp html]# vim /etc/hosts
< ip addr>   linuxhelp11.com

And then restart your Apache service so that the above changes can take effect.

[root@linuxhelp html]# systemctl  restart httpd

You shall now continue the process graphically, so open your browser and give your domain name as URL. The installar of SMF appears on your screen. Click continue to proceed with it.


Fill database details in the appropriate fields and click continue to proceed further.

In the next page, you shall configure the Forum Settings by giving the essential details in the related fields. And then, click on the Continue button to proceed further.

In the next file, the database details are shown, and you shall go to the next page by clicking on the Continue button.

In the next page, you should fill all the details regarding your account in the related fields, and then click on the Continue option to proceed further with the process, you have almost reached the end of the procees.

The installation setup is complete, but before you proceed further you need to click on the checkbox and click“ your newly installed forum” to reach your page.

The Home page of your SMF account gets appeared on your screen now.

With this, the installation of SMF on CentOS comes to and end.

Tag : CentOS
FAQ
Q
How can I install a mod that doesn't work in my SMF version?
A
A mod written for a previous version of SMF can sometimes still work with the latest one, but if the mod author does not update the package to support the latest version then the package manager does not allow the installation. For these situations, in SMF 2.0 a new feature has been introduced: Version Emulation.
Q
Why Do I See a White Page and Not the Error Itself?
A
Your PHP configuration may prevent this error from being displayed. On a live and fully functional web site your guests are not supposed to see errors (if they occur), because they might reveal file paths or other sensitive information. For this reason, some hosts specifically configure PHP to not show errors.
Q
can I integrate it with wordpress?
A
yes, you can integrate with wordpress
Q
I accidentally lost my admin account! What can I do?
A
If you accidentally delete your administrator account, you will need to register again and run the appropriate query for your SMF version in phpMyAdmin.
Q
What are the similar tools like this?
A
you can also try phpBB, Simple Machines Forum, MyBB, FluxBB, vBulletin, ZeroTalk, YaBB