{"id":3328,"date":"2014-03-13T16:24:07","date_gmt":"2014-03-13T21:24:07","guid":{"rendered":"https:\/\/secure.rosehosting.com\/blog\/?p=3328"},"modified":"2022-12-13T04:26:36","modified_gmt":"2022-12-13T10:26:36","slug":"how-to-install-simple-machines-2-forum-software-on-a-debian-vps-with-nginx","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/how-to-install-simple-machines-2-forum-software-on-a-debian-vps-with-nginx\/","title":{"rendered":"How to Install Simple Machines 2 Forum Software on a Debian VPS with Nginx"},"content":{"rendered":"
Simple Machines forum is one of the best open source forum platforms available on the Internet powered by PHP and MySQL.<\/p>\n
In this step-by-step tutorial, we will show you how to easily install\u00a0Simple Machines 2 forum on your Debian based virtual server<\/a>.<\/p>\n <\/p>\n <\/p>\n At the time of writing this tutorial, the latest stable version is\u00a0Simple Machines 2.0.7 and it requires:<\/p>\n If you have Apache installed on your server, stop the Apache service and remove Apache packages:<\/p>\n In order to install Nginx, PHP-FPM and MySQL on your Debian VPS<\/a>, execute the following command:<\/p>\n Download Simple Machines 2 available at http:\/\/download.simplemachines.org\/ to the server and extract it using the following commands:<\/p>\n Create a new MySQL database for Simple Machines on your server:<\/p>\n Locate the PHP configuration file using the following command:<\/p>\n Edit the \/etc\/php5\/fpm\/php.ini configuration file using the following command:<\/p>\n and add\/modify the following lines:<\/p>\n Execute the following command:<\/p>\n Create a new Nginx configuration file:<\/p>\n and add the following lines:<\/p>\n Create a symbolic link using the following command:<\/p>\n ln -s \/etc\/nginx\/sites-available\/your-domain.com \/etc\/nginx\/sites-enabled\/your-domain.com<\/p>\n and restart the Nginx web server for the changes to take effect:<\/p>\n The webserver user (www-data) needs to be able to write to ‘attachments’, ‘avatars’, ‘cache’, ‘Packages’, ‘installed.list’, ‘Smileys’ and ‘Themes’ directories and ‘agreement.txt’, ‘Settings.php’, ‘Settings_bak.php’ files so you can easily accomplish that by executing the following command:<\/p>\n Open http:\/\/your-domain.com\/install.php in your favorite web browser and follow the easy instructions. Once the installation is complete, it is recommended to delete the ‘install.php’ script from your server:<\/p>\n <\/p>\n If you want to to customize the look and feel of your forum there are many themes available for download at http:\/\/custom.simplemachines.org\/themes\/ . Also, there are various mods available at http:\/\/custom.simplemachines.org\/mods\/ , such as ‘SMF Secure Login’, ‘Advanced Visual Verification’, ‘BotScout’, ‘Delete Spam Posts’ etc.<\/p>\n Of course you don\u2019t have to do any of this if you use one of our Linux VPS Hosting<\/a> services, in which case you can simply ask our expert Linux admins to install Simple Machines 2 forum software for you. They are available 24×7 and will take care of your request immediately.<\/p>\n PS<\/span>.<\/strong> If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.<\/p>\n <\/p>\n","protected":false},"excerpt":{"rendered":" Simple Machines forum is one of the best open source forum platforms available on the Internet powered by PHP and … <\/p>\n\n
\/etc\/init.d\/apache2 stop\r\napt-get remove apache2*<\/pre>\n
apt-get install nginx php5-fpm php5-cli php5-mysql php5-mcrypt php5-gd mysql-client-5.5 mysql-server-5.5 mysql-server-core-5.5<\/pre>\n
cd \/root\r\nwget http:\/\/download.simplemachines.org\/index.php\/smf_2-0-7_install.tar.bz2\r\nmkdir -p \/var\/www\/{your-domain.com,your-domain.com\/forum}\r\ntar -xvf smf_2-0-7_install.tar.bz2 -C \/var\/www\/your-domain.com\/forum<\/pre>\n
mysql -u root -p\r\nmysql> CREATE DATABASE smf2db;\r\nmysql> GRANT ALL PRIVILEGES ON smf2db.* TO 'smf2user'@'localhost' IDENTIFIED BY 'your-password' WITH GRANT OPTION;\r\nmysql> FLUSH PRIVILEGES;\r\nmysql> quit<\/pre>\n
php5-fpm -i | grep php.ini\r\nConfiguration File (php.ini) Path => \/etc\/php5\/fpm\r\nLoaded Configuration File => \/etc\/php5\/fpm\/php.ini<\/pre>\n
vi \/etc\/php5\/fpm\/php.ini<\/pre>\n
memory_limit = 128M\r\ncgi.fix_pathinfo = 0\r\nfile_uploads = On\r\nmax_input_time = 60\r\nmax_execution_time = 60\r\nregister_globals = Off\r\nsafe_mode = Off\r\nsession.use_trans_sid = 0\r\nmagic_quotes_sybase = Off<\/pre>\n
\/etc\/init.d\/php5-fpm restart<\/pre>\n
vi \/etc\/nginx\/sites-available\/your-domain.com<\/pre>\n
server {\r\n\tlisten 80;\r\n\tserver_name your-domain.com;\r\n\troot \/var\/www\/your-domain.com\/forum\/;\r\n\tindex index.php index.html;\r\n\taccess_log \/var\/log\/nginx\/your-domain.com-access.log;\r\n\terror_log \/var\/log\/nginx\/your-domain.com-error.log;\r\nlocation ~ \\.php {\r\n\tfastcgi_index index.php;\r\n\tfastcgi_split_path_info ^(.+\\.php)(.*)$;\r\n\tinclude \/etc\/nginx\/fastcgi_params;\r\n\tfastcgi_pass unix:\/var\/run\/php5-fpm.sock;\r\n\tfastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;\r\n\t}\r\n}<\/pre>\n
\/etc\/init.d\/nginx restart<\/pre>\n
chown www-data:www-data -R \/var\/www\/your-domain.com\/<\/pre>\n
rm -rf \/var\/www\/your-domain.com\/forum\/install.php<\/pre>\n