CentOSLinuxTutorials

How To Install PHP-Fusion on CentOS 7

Install PHP-Fusion on CentOS 7

In this tutorial, we will show you how to install and configuration of PHP-Fusion on your CentOS 7. For those of you who didn’t know, PHP-Fusion is a lightweight open-source content management system (CMS) written in PHP. It uses a MySQL database to store your site content and includes a simple yet comprehensive administration system. PHP-Fusion includes the most common features you would expect to see in many other CMS packages including news, articles, forums, polls, shoutboxes, comments, ratings, much more.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple. I will show you the step-by-step installation of PHP-Fusion on the CentOS 7 server.

Install PHP-Fusion on CentOS 7

Step 1. First, let’s start by ensuring your system is up-to-date.

yum -y update

Step 2. Install LAMP server.

A CentOS 7 LAMP server is required. If you do not have LAMP installed, you can follow our guide here.

Step 3. Install PHP-Fusion.

Download the latest stable version of PHP-Fusion, At the moment of writing this article it is version 7:

mkdir /var/www/html/mywebsite.com
wget http://downloads.sourceforge.net/project/php-fusion/PHP-Fusion%20Archives/7.x/PHP-Fusion-7.02.07.zip
unzip PHP-Fusion-7.02.07.zip
cp -R PHP-Fusion-7.02.07/files/* /var/www/html/mywebsite.com/

Now, we’ll rename _config.php file to config.php by running the command below:

cd /var/www/html/mywebsite.com/
mv _config.php config.php

We will need to change some folders permissions:

chown -R apache:apache /var/www/html/mywebsite.com/

Step 4. Configuring MariaDB.

By default, MariaDB is not hardened. You can secure MariaDB using the mysql_secure_installation script. You should read and below each step carefully which will set a root password, remove anonymous users, disallow remote root login, and remove the test database and access to secure MariaDB.

mysql_secure_installation

Configure it like this:

- Set root password? [Y/n] y
- 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

Next, we will need to log in to the MariaDB console and create a database for the PHP-Fusion. Run the following command:

mysql -u root -p

This will prompt you for a password, so enter your MariaDB root password and hit Enter. Once you are logged in to your database server you need to create a database for PHP-Fusion installation:

MariaDB > CREATE DATABASE phpfusion;
MariaDB > GRANT ALL ON phpfusion.* to phpfusionuser@localhost identified by 'YOURPASSWORD';
MariaDB > FLUSH PRIVILEGES;
MariaDB > \q

Step 5. Configuring Apache web server for PHP-Fusion.

It is time to configure Apache. Create a ‘/etc/httpd/conf.d/vhosts.conf’ file with the following content

nano /etc/httpd/conf.d/vhosts.conf
IncludeOptional vhosts.d/*.conf

Create a ‘/etc/httpd/vhosts.d’ directory where we will put all our virtual hosts:

mkdir /etc/httpd/vhosts.d

Create a virtual host for our domain:

cd /etc/httpd/vhosts.d
nano yourdomain.com

Add the following lines at the end of the file:

<VirtualHost YOUR_SERVER_IP:80>
ServerAdmin webmaster@yourdomain.com
DocumentRoot "/var/www/html/yourdomain.com"
ServerName yourdomain.com
ServerAlias www.yourdomain.com
ErrorLog "/var/log/httpd/yourdomain.com-error_log"
CustomLog "/var/log/httpd/yourdomain.com-access_log" combined

<Directory "/var/www/html/yourdomain.com/">
DirectoryIndex index.php
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>

Step 6. Accessing PHP-Fusion.

PHP-Fusion will be available on HTTP port 80 by default. Open your favorite browser and navigate to http://your-domain.com/ or http://server-ip and complete the required steps to finish the installation. If you are using a firewall, please open port 80 to enable access to the control panel.

Congratulations! You have successfully installed PHP-Fusion. Thanks for using this tutorial for installing PHP-Fusion CMS in CentOS 7 system. For additional help or useful information, we recommend you to check the official PHP-Fusion website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!

r00t

r00t is an experienced Linux enthusiast and technical writer with a passion for open-source software. With years of hands-on experience in various Linux distributions, r00t has developed a deep understanding of the Linux ecosystem and its powerful tools. He holds certifications in SCE and has contributed to several open-source projects. r00t is dedicated to sharing her knowledge and expertise through well-researched and informative articles, helping others navigate the world of Linux with confidence.
Back to top button