{"id":16571,"date":"2014-12-12T13:25:30","date_gmt":"2014-12-12T19:25:30","guid":{"rendered":"https:\/\/secure.rosehosting.com\/blog\/?p=16571"},"modified":"2022-11-01T03:44:22","modified_gmt":"2022-11-01T08:44:22","slug":"install-fluxbb-on-a-centos-7-vps-with-nginx-and-php-fpm","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/install-fluxbb-on-a-centos-7-vps-with-nginx-and-php-fpm\/","title":{"rendered":"Install FluxBB on a CentOS 7 VPS with Nginx and PHP-FPM"},"content":{"rendered":"
In this tutorial, we will show you how to install FluxBB on a CentOS 7 VPS<\/a> with Nginx, MariaDB and PHP-FPM. FluxBB is blazing fast and open source forum application written in PHP. Some of the main features of FluxBB are: clean admin interface, flexible permission system, easy to use, blazing fast speed and powerful moderator tools. This guide should work on other Linux VPS<\/a> systems as well but was tested and written for a CentOS 7 VPS.<\/p>\n <\/p>\n To install a MariaDB server run the following command:<\/p>\n start the service and enable it at boot time:<\/p>\n It is very important to secure your MariaDB server, run the following script before creating and populating the databases.<\/p>\n Once you are finished with the step above, login as the MariaDB root user and create a new database and user:<\/p>\n At the time of this writing the latest stable version of FluxBB is version 1.5.7. The following commands will create a root directory for your forum and download and extract the FluxBB zip file.<\/p>\n Installing PHP and Nginx is pretty easy, just run the following command:<\/p>\n To change PHP-FPM to listen on a unix socket, open the default www pool<\/p>\n and change from<\/p>\n to<\/p>\n and restart the service for changes to take effect<\/p>\n Create a php session directory and change the ownership to apache (the user under which PHP runs).<\/p>\n Create a new Nginx server block with the following content:<\/p>\n Test the Nginx configuration and restart the server by running the following commands:<\/p>\n That’s it. Now open your browser, go to <\/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 set this up 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","protected":false},"excerpt":{"rendered":" In this tutorial, we will show you how to install FluxBB on a CentOS 7 VPS with Nginx, MariaDB and … <\/p>\nUpdate the system and install the necessary packages.<\/h4>\n
root@vps:~# yum -y update\r\nroot@vps:~# yum install unzip wget<\/pre>\n
Install MariaDB and create a database.<\/h4>\n
root@vps:~# yum install mariadb-server mariadb<\/pre>\n
root@vps:~# systemctl start mariadb.service\r\nroot@vps:~# systemctl enable mariadb.service<\/pre>\n
mysql_secure_installation<\/pre>\n
root@vps:~# mysql -uroot -p<\/pre>\n
MariaDB [(none)]>> create database fluxbb;\r\nMariaDB [(none)]>> GRANT ALL PRIVILEGES ON fluxbb.* TO 'fluxbb'@'localhost' IDENTIFIED BY 'fluxbbPassword';\r\nMariaDB [(none)]>> flush privileges;\r\nMariaDB [(none)]>> \\q;<\/pre>\n
Download and unzip FluxBB<\/h4>\n
root@vps:~# mkdir -p \/var\/www\/html\/myForum.org\/\r\nroot@vps:~# cd \/var\/www\/html\/myForum.org\/\r\nroot@vps:~# wget http:\/\/fluxbb.org\/download\/releases\/1.5.7\/fluxbb-1.5.7.zip\r\nroot@vps:~# unzip fluxbb-1.5.7.zip\r\nroot@vps:~# mv fluxbb-1.5.7\/* .\r\nroot@vps:~# rm -rf fluxbb-1.5.7*\r\n<\/pre>\n
Install and configure PHP and Nginx<\/h4>\n
root@vps:~# yum install nginx php-fpm php-cli php-mysqlnd php-mbstring php-gd php-curl php-pdo<\/pre>\n
root@vps:~# systemctl start php-fpm.service\r\nroot@vps:~# systemctl enable php-fpm.service\r\nroot@vps:~# systemctl start nginx.service \r\nroot@vps:~# systemctl enable nginx.service<\/pre>\n
root@vps:~# vim \/etc\/php-fpm.d\/www.conf<\/pre>\n
listen = 127.0.0.1:9000<\/pre>\n
listen = \/var\/run\/php-fpm\/php-fpm.socket<\/pre>\n
root@vps:~# systemctl restart php-fpm<\/pre>\n
root@vps:~# mkdir \/var\/lib\/php\/session<\/pre>\n
root@vps:~# chown apache:apache \/var\/lib\/php\/session<\/pre>\n
root@vps:~# cat <<'EOF' >> \/etc\/nginx\/conf.d\/myForum.org.conf\r\nserver {\r\n server_name myForum.org;\r\n listen 80;\r\n root \/var\/www\/html\/myForum.org;\r\n access_log \/var\/log\/nginx\/myForum.org-access.log;\r\n error_log \/var\/log\/nginx\/myForum.org-error.log;\r\n index index.php;\r\n \r\n location \/ {\r\n try_files $uri $uri\/ \/rewrite.php?$args;\r\n }\r\n\r\n location ~ \/(cache|include|lang|plugins) {\r\n deny all;\r\n return 403;\r\n }\r\n\r\n location ~ \\.php$ {\r\n fastcgi_index index.php;\r\n fastcgi_split_path_info ^(.+\\.php)(.*)$;\r\n fastcgi_keep_conn on;\r\n include \/etc\/nginx\/fastcgi_params;\r\n fastcgi_pass unix:\/var\/run\/php-fpm\/php-fpm.socket;\r\n fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;\r\n }\r\n \r\n location ~ \/\\.ht {\r\n deny all;\r\n }\r\n\r\n}\r\nEOF<\/pre>\n
root@vps:~# nginx -t\r\n\r\nroot@vps:~# systemctl restart nginx<\/pre>\n
Set the correct permissions<\/h4>\n
root@vps:~# chown -R apache:apache \/var\/www\/html\/myForum.org\/<\/pre>\n
http:\/\/myForum.org\/install.php<\/code> and follow the FluxBB installation wizard.<\/p>\n
\n