{"id":16659,"date":"2014-12-23T15:33:51","date_gmt":"2014-12-23T21:33:51","guid":{"rendered":"https:\/\/secure.rosehosting.com\/blog\/?p=16659"},"modified":"2022-12-16T04:38:21","modified_gmt":"2022-12-16T10:38:21","slug":"install-php-fusion-7-on-a-centos-7-vps","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/install-php-fusion-7-on-a-centos-7-vps\/","title":{"rendered":"Install PHP-Fusion 7 on a CentOS 7 VPS"},"content":{"rendered":"
PHP-Fusion is a lightweight PHP based open source content management system (CMS). It utilizes a MySQL database to store the website content and includes a very simple administration system to manage your sites.<\/p>\n
In this tutorial we will install PHP-Fusion 7 on a CentOS 7 VPS<\/a> with Apache, MariaDB and PHP.<\/p>\n <\/p>\n PHP-Fusion 7 is built to run on most configurations, but still your server needs to meet the following requirements: First of all, log in to your CentOS 7 VPS and make sure that all installed packages are up tp date<\/p>\n We need to have a LAMP stack in order to run PHP-Fusion, so first we will install Apache web server, MariaDB and PHP.<\/p>\n MariaDB is the default database server in CentOS 7 and it can be installed using the yum command.<\/p>\n Start the MariaDB service and enable it to start at boot<\/p>\n Once MariaDB is installed, run the following post-installation script in order to secure your database server and set a root password<\/p>\n and use the following options<\/p>\n New, we will install Apache web server<\/p>\n Start the web server and enable it to start at boot<\/p>\n PHP-Fusion is a PHP based application so we need to install PHP Restart the Apache web server for the changes to take effect<\/p>\n Now we have a fully functional LAMP stack installed on our CentOS 7 server and we can start with the PHP-Fusion installation.<\/p>\n Download the latest stable version of PHP-Fusion on your server<\/p>\n Unpack the downloaded zip archive<\/p>\n Create a directory for your new PHP-Fusion website in the document root directory on your server<\/p>\n Copy the PHP-Fusion files from the unpacked directory to the newly created mywebsite.com directory<\/p>\n Rename the PHP-Fusion configuration file<\/p>\n Rename the created directory<\/p>\n and change the owner of the PHP-Fusion files<\/p>\n Next, login to your MariaDB server as user root and create a new database and user<\/p>\n Don’t forget to replace ‘YOURPASSWORD’ with an actual strong password.<\/p>\n Now, we will set up Apache virtual hosting directive for the ‘yourdomain.com’ domain name.<\/p>\n Create a ‘\/etc\/httpd\/conf.d\/vhosts.conf’ file with the following content<\/p>\n Create a ‘\/etc\/httpd\/vhosts.d’ directory where we will put all our virtual hosts.<\/p>\n Create a virtual host for our domain<\/p>\n and add the following content<\/p>\n That’s all. The installation from the command line is completed. Now, head your favorite web browser to http:\/\/yourdomain.com and follow the instructions to finish the installation.<\/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 PHP-Fusion for you. They are available 24\u00d77 and will take care of your request immediately.<\/p>\n PS.<\/strong><\/span> 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":" PHP-Fusion is a lightweight PHP based open source content management system (CMS). It utilizes a MySQL database to store the … <\/p>\n
\nPHP version 5.3.4 or higher
\nMySQL version 4.1 or higher<\/p>\nyum -y update<\/pre>\n
yum install mariadb mariadb-server<\/pre>\n
systemctl start mariadb.service\r\nsystemctl enable mariadb.service<\/pre>\n
mysql_secure_installation<\/pre>\n
- Set root password? [Y\/n] y\r\n- Remove anonymous users? [Y\/n] y\r\n- Disallow root login remotely? [Y\/n] y\r\n- Remove test database and access to it? [Y\/n] y\r\n- Reload privilege tables now? [Y\/n] y<\/pre>\n
yum install httpd<\/pre>\n
systemctl start httpd\r\nsystemctl enable httpd<\/pre>\n
\nyum install php php-mysql<\/p>\nsystemctl restart httpd<\/pre>\n
wget http:\/\/downloads.sourceforge.net\/project\/php-fusion\/PHP-Fusion%20Archives\/7.x\/PHP-Fusion-7.02.07.zip<\/pre>\n
yum install unzip\r\nunzip PHP-Fusion-7.02.07.zip<\/pre>\n
mkdir \/var\/www\/html\/mywebsite.com<\/pre>\n
cp -R PHP-Fusion-7.02.07\/files\/* \/var\/www\/html\/mywebsite.com\/<\/pre>\n
cd \/var\/www\/html\/mywebsite.com<\/pre>\n
mv _config.php config.php<\/pre>\n
chown -R apache:apache \/var\/www\/html\/mywebsite.com\/<\/pre>\n
mysql -u root -p\r\n\r\nMariaDB [(none)]> CREATE DATABASE phpfusion;\r\nMariaDB [(none)]> GRANT ALL ON phpfusion.* to phpfusionuser@localhost identified by 'YOURPASSWORD';\r\nMariaDB [(none)]> FLUSH PRIVILEGES;\r\nMariaDB [(none)]> \\q<\/pre>\n
vim \/etc\/httpd\/conf.d\/vhosts.conf\r\nIncludeOptional vhosts.d\/*.conf<\/pre>\n
mkdir \/etc\/httpd\/vhosts.d<\/pre>\n
cd \/etc\/httpd\/vhosts.d\r\nvim yourdomain.com<\/pre>\n
<VirtualHost YOUR_SERVER_IP:80>\r\nServerAdmin webmaster@yourdomain.com\r\nDocumentRoot \"\/var\/www\/html\/yourdomain.com\"\r\nServerName yourdomain.com\r\nServerAlias www.yourdomain.com\r\nErrorLog \"\/var\/log\/httpd\/yourdomain.com-error_log\"\r\nCustomLog \"\/var\/log\/httpd\/yourdomain.com-access_log\" combined\r\n\r\n<Directory \"\/var\/www\/html\/yourdomain.com\/\">\r\nDirectoryIndex index.php\r\nOptions FollowSymLinks\r\nAllowOverride All\r\nRequire all granted\r\n<\/Directory>\r\n<\/VirtualHost><\/pre>\n