Installing: Difference between revisions From Online Manual

Jump to: navigation, search
mNo edit summary
(Add PG tool)
 
(78 intermediate revisions by 15 users not shown)
Line 1: Line 1:
{{TOCright}}Installing an SMF forum has never been easier! Installing SMF can be done in five fast and simple steps:<br />
{{TOC right|limit=2}}


==Download the Install Archive==
Installing an SMF forum is very simple! It can be done in six quick and simple steps.  
The latest SMF release can be found on the downloads page of the official Simple Machines website.<br />


Download the latest version of SMF from the official Simple Machines website. Commonly, .zip files are the preferred download type. Most operating systems have the tools available to extract .zip archives already installed. <br />
It is not recommended to use an auto-installer to install SMF, because many of them are known to have issues or confuse users in the long run. Installing SMF manually is not difficult and will help you to understand better how it works.


SMF is free forum software that can be installed on a webserver. To install it, you will need a webserver with PHP, and access to a database. You can create a database ahead of time (be sure to note all the important database information) or wait for the installer to help you with this step.  Please see the [[requirements and recommendations]] for more information on what you need before you start an install.


==Extract and Upload the Install Archive==
==Create a Database==
Once the install archive has been downloaded it will need to be uploaded and extracted before the installer can be run. There are two possible methods for this step. The method used will depend on the tools available with the control panel supplied by the hosting service provided. Please ensure you upload in Binary if using an FTP client.<br />


SMF can be uploaded to the site root, or to a directory on the site, such as www.yourdomain.com/forum<br />
An SMF forum needs a database to store all the information about members, posts, and topics. You can use the tools your web host provides to create a new database and a database user for SMF to log in as and use. If you neglect this step at this point, the SMF installer will offer to help you with it later on.


===Uploading Before Extracting===
Once you have created your database, be sure to make note of the database name, database user name, and password. You will need these details when you run the installer.
Some control panels have the ability to extract an archive, such as cPanel. This allows for hassle free uploading and extraction of the archive. Once the archive is uploaded, select the extract option to extract the archive to the desired location. <br />


===Extracting Before Uploading===
===Creating a Database with phpMyAdmin===
If extracting abilities are not available inside the control panel, the archive can be extracted before uploading. Generally right clicking the archive and selecting the extract all option will work. The directory structure should be retained when the install archive is extracted, so all files and directories are in the correct places.<br />


Most shared hosting services disable the option to create a database with [[phpMyAdmin]]. However, if this option is available to you, the database can be created from the phpMyAdmin home page.  PostgreSQL users can use phpPgAdmin equivalent.


==Set File Permissions==
===Creating a Database with a Control Panel===
After the install archive has been uploaded and extracted, the files need to have their permissions set. This is commonly called CHMOD. The correct CHMOD for SMF files is either 777, 775 or 755, depending on the hosting service provided. There are two methods for this step, the method used depends on the hosting service provided. <br />


===Setting File Permissions With the Installer===
If your hosting service provides a control panel interface, then this can be used to create a database. Selecting the "MySQL Databases" or "Database Wizard" options should take you to a page prompting you to create a MySQL database. With different hosts, these options may have different names.
The SMF installer can set file permissions simply and easily. Navigating to the directory where SMF resides, should redirect to the install.php file and prompt the installer. For example: www.yourdomain.com/forum/install.php. If the installer detects files that need their permissions adjusted it will prompt for FTP details so it can CHMOD the files it requires for the install. This may not work on some servers.<br />


===Setting File Permissions With FTP===
SMF 2.1 supports MySQL, and PostgreSQL. SMF 2.0 supports MySQL, PostgreSQL and SQLite. SMF 1.1 supports only MySQL.
Using a control panel or FTP client, file permissions can be changed quickly and easily. Usually, FTP programs will allow permissions to be changed by right clicking files/directories and selecting properties, attributes or permissions. The desired numerical value can be entered, or if provided, check boxes can be changed.<br />


The Following files and directories should have CHMOD values of 777, 775 or 755:<br />
===Creating a Database User===
*/attachments
*/avatars
*/Packages
*/Packages/installed.list
*/Smileys
*/Themes
*/Themes/default/languages/Install.english.php
*agreement.txt
*Settings.php
*Settings_bak.php
*install.php


A database user can be created through the control panel provided by your hosting service. Selecting the "MySQL Databases" or "Database Wizard" options should take you to a page, prompting you to create a MySQL database user. With different hosts, these options may have different names.


==Create a Database and a Database User==
The database user requires the following permissions: <code>SELECT, INSERT, UPDATE, DELETE, CREATE, CREATE TEMPORARY TABLES, ALTER, DROP,</code> and <code>INDEX</code>. Additional permissions may be granted, if desired.
Before running the installer, a database and a database user will need to be created. A database will store all of the information a forum requires, such as members, posts, and topics. A database user will allow the forum to access the stored information. The information for the database and the database user should be remembered for use with the installer.<br />


===Creating a Database Using phpMyAdmin===
==Get SMF==
Most shared hosting services disable this option. If the option to create databases through phpMyAdmin is available through the hosting service provided, the database can be created from the phpMyAdmin home page.<br />


===Creating a Database Using a Control Panel===
Using your browser, you can download the latest version of SMF to your desktop computer. All SMF downloads can be found at [http://download.simplemachines.org SMF Downloads]. The latest recommended version will always be available at http://www.simplemachines.org/download/index.php/latest/install/.
Shared hosting services usually disable the ability to create a database through phpMyAdmin. If the hosting service provides a control panel interface, this can be used to create a database. Selecting the MySQL Databases or Database Wizard[ option should take you to prompts for creating a MySQL database. With different hosts these options may have different names.<br />


SMF 2.0 has the ability to support other database schemas, including PostgreSQL and SQLite. SMF 1.1 supports only MySQL database schemas.<br />
{{Extract and Upload|install}}


===Creating a Database User===
{{Set file permissions|install}}
A database user can be created through the control panel provided by the hosting service. Selecting the MySQL Databases or database Wizard option should take you to prompts for creating a MySQL database user. With different hosts these options may have different names. These options may change if a different database schema is used for SMF.<br />


The database user requires the following permissions, however, more can be granted: SELECT, INSERT, UPDATE, DELETE, ALTER, and INDEX.<br />
==Run the Installer==


This is nearly the last step. You know where your forum directory is, because you put the files there yourself.  So, point your browser at the file ''install.php'' in that directory. For example, if you put your forum in ''www.yourdomain.com/forum'', you should point your browser at ''www.yourdomain.com/forum/install.php''.


==Run the Installer==
This script will ask you for information, some of which you have created and collected earlier.
The final step in installing SMF is running the installer. The information from the previous steps will be used in the installation process.<br />
 
The SMF install screen looks different for SMF 2.0 and SMF 1.1, however, both still require the same information. Navigating to the directory where SMF resides, should redirect to the install.php file and prompt the installer to run. For eg: www.yourdomain.com/forum/install.php<br />


===Basic Forum Settings===
===Basic Forum Settings===


;Forum Name  
;Forum Name  
:The name for the forum being installed should go here. By default this is set to “My Community”. This can be changed later via the server settings section of the administration center if needed.
:The name for the forum being installed should go here. By default, this is set to “My Community”. This can be changed later in the [[Server settings|Server Settings]] section of the administration center.
;Forum URL
;Forum URL
:The URL the forum can be found at, without the trailing slash. The SMF installer will most likely have this correct, so it is safe to leave this field alone.
:The URL for the forum, without the trailing slash (for example, ''http://www.yourdomain.com/forum''). The SMF installer will probably guess this one correctly.
;Gzip Output
;Gzip Output
:If Gzip output tests pass, this can be used to save bandwidth and make pages load faster.
:If Gzip output tests pass, use this to save bandwidth and make pages load faster.
;Database Sessions
;Database Sessions
:Sessions can be stored in the database, or in files. Database sessions are more reliable, secure, and may work better on sites with multiple servers.
:Choose whether to store sessions in the database or in files. Database Sessions are preferred because they are more reliable, secure and may work better on sites with multiple servers.
;UTF-8 Character Set
;UTF-8 Character Set
:UTF-8 character sets are useful for international forums, or forums that use languages other than English. <br />
:UTF-8 character sets are useful for international forums, or forums that use languages other than English.
;Allow Stat Collection
;Allow Stat Collection
:This option allows Simple Machines to collect statistics from your forum, anonymously, so the software can grow to meet the needs of its user base.
:This option allows Simple Machines to collect statistics from your forum, anonymously, to help the developers understand the needs of the user community.


===Database server settings===


===Database Server Settings===
;Database type
;Database type
:The database schema can be selected here from a list of database schemas supported by the server being used. Newer schemas (for SMF 2.0) such as PostgreSQL and SQLite may be listed here if available. MySQL and PostgreSQL are recommended.
:The database schema can be selected here from a list of database schemas supported by the server being used. Newer schemas (for SMF 2.0) such as PostgreSQL and SQLite may be listed here if available. MySQL and PostgreSQL are recommended.
;Server name
;Server name
:The location of the database is specified here. 99% of the time this will be localhost.
:The location of the database is specified here. 99% of the time this will be ''localhost''.
;Username
;Username
:The username used for the database user should be placed here. If help is required for this, the hosting service provider should be contacted.
:The username for the database user should be placed here. If help is required for this, the hosting service provider should be contacted.
;Password
;Password
:The password for the database user is entered here.  
:The password for the database user is entered here.  
;Database name
;Database name
:The name used for the database should be placed here. If help is required for this, the hosting service provider should be contacted.
:The name used for the database should be placed here. If you created a database in advance, enter that. Otherwise, you can use the database name suggested by the installer to create a new database. If help is required for this, the hosting service provider should be contacted.
;Database prefix
;Database prefix
:The prefix for all tables associated with this install is specified here. Prefixing tables with unique prefixes enables more than one application, or SMF install, to use the same database safely.
:The prefix for all tables associated with this install is specified here. Prefixing tables with unique prefixes enables more than one application, or SMF install, to use the same database safely. The installer will suggest a prefix for you automatically, but you can customize it to whatever you prefer.
 
===Creating an administrator account===
 
The SMF installer will ask for information to create the forum's administrator account. This information includes username, password and e-mail address for the administrator account. This account will be necessary to get access to the SMF administration center, to manage and configure the forum.


===Finishing the installation process===


===Creating an Administrator Account===
Once all steps of the installation process have been completed, check the box to remove the install files from the server. If this does not work, they will need to be deleted via FTP. All installer files should be removed from the server once the installation process is complete. SMF does not need them any longer and they are a security risk.
The SMF installer will ask for information to create the forums administrator account. This information includes username, password, and email, just like a regular account. Once created, this account can be used to visit the administration center to manage and configure the forum. <br />


===Finishing the Installation Process===
==Tidy Up==
Once all parts of the install have completed, check the box to remove the install files from the server. If this does not work they will need to be deleted via FTP. All installer files should be removed from the server once the installation process is complete as they are a major security risk if left on a server unattended. Once SMF is installed they are no longer needed.<br />


'''Congratulations on installing SMF successfully!'''
* If you have not already done so, delete ''install.php''. It is a security risk to leave in place once the install has been completed.
* Check your file and folder permissions for safety.
** Most directory permissions are set to 755, while most files are set to 644, although this will depend on your server configuration. If in doubt, ask your host what CHMOD settings should be used for files and directories.
** The only exceptions are your root forum directory, the  '''attachments''' and '''cache''' directories, which may need to be set as high as 777 on some servers (this setting will cause 500 errors on other servers).


{{Installing SMF}}
{{Installing SMF}}

Latest revision as of 22:40, 16 October 2023

Installing an SMF forum is very simple! It can be done in six quick and simple steps.

It is not recommended to use an auto-installer to install SMF, because many of them are known to have issues or confuse users in the long run. Installing SMF manually is not difficult and will help you to understand better how it works.

SMF is free forum software that can be installed on a webserver. To install it, you will need a webserver with PHP, and access to a database. You can create a database ahead of time (be sure to note all the important database information) or wait for the installer to help you with this step. Please see the requirements and recommendations for more information on what you need before you start an install.

Create a Database

An SMF forum needs a database to store all the information about members, posts, and topics. You can use the tools your web host provides to create a new database and a database user for SMF to log in as and use. If you neglect this step at this point, the SMF installer will offer to help you with it later on.

Once you have created your database, be sure to make note of the database name, database user name, and password. You will need these details when you run the installer.

Creating a Database with phpMyAdmin

Most shared hosting services disable the option to create a database with phpMyAdmin. However, if this option is available to you, the database can be created from the phpMyAdmin home page. PostgreSQL users can use phpPgAdmin equivalent.

Creating a Database with a Control Panel

If your hosting service provides a control panel interface, then this can be used to create a database. Selecting the "MySQL Databases" or "Database Wizard" options should take you to a page prompting you to create a MySQL database. With different hosts, these options may have different names.

SMF 2.1 supports MySQL, and PostgreSQL. SMF 2.0 supports MySQL, PostgreSQL and SQLite. SMF 1.1 supports only MySQL.

Creating a Database User

A database user can be created through the control panel provided by your hosting service. Selecting the "MySQL Databases" or "Database Wizard" options should take you to a page, prompting you to create a MySQL database user. With different hosts, these options may have different names.

The database user requires the following permissions: SELECT, INSERT, UPDATE, DELETE, CREATE, CREATE TEMPORARY TABLES, ALTER, DROP, and INDEX. Additional permissions may be granted, if desired.

Get SMF

Using your browser, you can download the latest version of SMF to your desktop computer. All SMF downloads can be found at SMF Downloads. The latest recommended version will always be available at http://www.simplemachines.org/download/index.php/latest/install/.

Extract the SMF Archive and Upload the Files to Your Website

The SMF install archive contains files that need to be copied to the correct place on your website before the installer can be executed. Wherever these files are located on the server, that is where your forum will be located. Extracting before uploading is usually the simplest method. If your host provides the necessary tools, you can try uploading before extracting.

You will need to use either FTP (in binary mode) or the tools in your hosting account's control panel (for more information on the control panel supplied by your hosting service, please see the documentation provided by your hosting service).

SMF can be uploaded to the site root, or to a directory on the site, such as www.yourdomain.com/forum.

Extracting Before Uploading

This is the way most people do it. It is easy, but can take longer.

  1. Extract the archive, usually by right-clicking the archive and selecting the "Extract All" option. When the install archive is extracted, a new folder should be created with all the files and directories in the correct places.
  2. Set your FTP client for binary transfer, select all the files and folders and copy them to the directory where you want to locate your forum.

Uploading Before Extracting

Some control panels, such as cPanel, give the ability to extract an archive right on the server. This can be a quicker than waiting for all the extracted files to copy via FTP. First, upload the file via your account's control panel. Second, select the extract option to extract the archive to the desired location -- the directory where you want your forum to be located.

Set File and Directory Permissions

File and directory permissions control who can see your files and use your directories. They can control whether you will be able to install mods to your forum. On Linux and other Unix-like servers the chmod command is used to designate permissions. On most servers, a setting of 755 for directories and 644 for files will work. If this does not work on your hosting service, you may need 777 or 775 for directories, and 666 or 664 for files. Some hosts do not allow using 777 for directories or 666 for files -- using such high values will cause Internal Server Errors, 500 erors, or other errors. If the permission on your files or directories does not make them writable, the SMF installer will report the problem -- if it can detect it.

Note: If a Windows server is being used rather than a Linux server, then you will need to contact your host to change the file/directory permissions.

Setting File Permissions with the Installer

In many cases, the SMF installer can handle this for you. If you want to give this a try, skip this step for now, and wait until you come to the appropriate point in the installer. The installer might need to ask you for FTP login details to get the job done, so be sure to make a note of them. If you run into any problems setting file permissions with the installer, you can use the instructions below for setting file permissions with FTP to handle it yourself.

Setting File Permissions with FTP

Using a control panel or FTP client, file permissions can be changed quickly and easily. Usually, FTP programs will allow permissions to be changed by right-clicking files/directories and selecting "Properties", "Attributes" or "Permissions". The desired numerical value can be entered, or if provided, check boxes can be changed.


Run the Installer

This is nearly the last step. You know where your forum directory is, because you put the files there yourself. So, point your browser at the file install.php in that directory. For example, if you put your forum in www.yourdomain.com/forum, you should point your browser at www.yourdomain.com/forum/install.php.

This script will ask you for information, some of which you have created and collected earlier.

Basic Forum Settings

Forum Name
The name for the forum being installed should go here. By default, this is set to “My Community”. This can be changed later in the Server Settings section of the administration center.
Forum URL
The URL for the forum, without the trailing slash (for example, http://www.yourdomain.com/forum). The SMF installer will probably guess this one correctly.
Gzip Output
If Gzip output tests pass, use this to save bandwidth and make pages load faster.
Database Sessions
Choose whether to store sessions in the database or in files. Database Sessions are preferred because they are more reliable, secure and may work better on sites with multiple servers.
UTF-8 Character Set
UTF-8 character sets are useful for international forums, or forums that use languages other than English.
Allow Stat Collection
This option allows Simple Machines to collect statistics from your forum, anonymously, to help the developers understand the needs of the user community.

Database server settings

Database type
The database schema can be selected here from a list of database schemas supported by the server being used. Newer schemas (for SMF 2.0) such as PostgreSQL and SQLite may be listed here if available. MySQL and PostgreSQL are recommended.
Server name
The location of the database is specified here. 99% of the time this will be localhost.
Username
The username for the database user should be placed here. If help is required for this, the hosting service provider should be contacted.
Password
The password for the database user is entered here.
Database name
The name used for the database should be placed here. If you created a database in advance, enter that. Otherwise, you can use the database name suggested by the installer to create a new database. If help is required for this, the hosting service provider should be contacted.
Database prefix
The prefix for all tables associated with this install is specified here. Prefixing tables with unique prefixes enables more than one application, or SMF install, to use the same database safely. The installer will suggest a prefix for you automatically, but you can customize it to whatever you prefer.

Creating an administrator account

The SMF installer will ask for information to create the forum's administrator account. This information includes username, password and e-mail address for the administrator account. This account will be necessary to get access to the SMF administration center, to manage and configure the forum.

Finishing the installation process

Once all steps of the installation process have been completed, check the box to remove the install files from the server. If this does not work, they will need to be deleted via FTP. All installer files should be removed from the server once the installation process is complete. SMF does not need them any longer and they are a security risk.

Tidy Up

  • If you have not already done so, delete install.php. It is a security risk to leave in place once the install has been completed.
  • Check your file and folder permissions for safety.
    • Most directory permissions are set to 755, while most files are set to 644, although this will depend on your server configuration. If in doubt, ask your host what CHMOD settings should be used for files and directories.
    • The only exceptions are your root forum directory, the attachments and cache directories, which may need to be set as high as 777 on some servers (this setting will cause 500 errors on other servers).


Advertisement: