{"id":17294,"date":"2015-06-25T16:26:00","date_gmt":"2015-06-25T21:26:00","guid":{"rendered":"https:\/\/secure.rosehosting.com\/blog\/?p=17294"},"modified":"2022-12-15T09:46:39","modified_gmt":"2022-12-15T15:46:39","slug":"install-fuel-cms-on-an-ubuntu-14-04-vps-with-nginx-php-fpm-and-mysql","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/install-fuel-cms-on-an-ubuntu-14-04-vps-with-nginx-php-fpm-and-mysql\/","title":{"rendered":"Install Fuel CMS on an Ubuntu 14.04 VPS with Nginx, PHP-FPM and MySQL"},"content":{"rendered":"
Fuel CMS is a lightweight, highly customizable CMS built with the very popular PHP framework CodeIgniter. You can create custom modules, views and controllers and use the CMS part only when you need it. It is a hybrid of a framework and a CMS.<\/p>\n
<\/p>\n
In this tutorial we will cover the steps needed for installing Fuel CMS on an Ubuntu 14.04 VPS<\/a> with Nginx, PHP-FPM and MySQL.<\/p>\n REQUIREMENTS<\/strong><\/p>\n We will be using our SSD 1 Linux VPS<\/a> Hosting plan for this tutorial.<\/p>\n UPDATE THE SYSTEM<\/strong><\/p>\n Make sure your server is fully up to date using:<\/p>\n Your next step is to install Nginx, PHP-FPM and MySQL. Run the following command:<\/p>\n Then, create the database needed for Fuel CMS. Log into your MySQL service as root:<\/p>\n INSTALL FUEL CMS<\/strong><\/p>\n Now, install Fuel CMS. For our purposes we will download Fuel into the \/opt<\/em> directory. Run the following commands:<\/p>\n Unzip the downloaded archive:<\/p>\n Rename the directory into a simpler name:<\/p>\n Move the Fuel CMS installation into \/var\/www\/ :<\/p>\n Enter the directory:<\/p>\n Configure the fuel\/application\/config\/database.php<\/em> file with the proper database connection settings. With your favorite text editor open the file, we are using vim:<\/p>\n Fill in the credentials of the database you created previously. After modifying, the lines should look like this:<\/p>\n Save and close the file.<\/p>\n Now, import the fuel\/install\/fuel_schema.sql<\/em> file into the newly created database. You can do that using the following command:<\/p>\n When prompted, enter the password you set for the fuelusr user.<\/p>\n You need to set an encryption key and fill in the appropriate line in the fuelcms\/fuel\/application\/config\/config.php<\/em> file. You can get a random encryption key at: http:\/\/randomkeygen.com\/ Open the file:<\/p>\n After setting up the key, our line looks like this:<\/p>\n Last but not least, set additional configuration values within the MY_fuel.php<\/em> file: Configure your site name and enable the admin backend:<\/p>\n Set the correct ownership of the fuelcms<\/em> directory:<\/p>\n CONFIGURE NGINX FOR FUEL CMS<\/strong><\/p>\n Your next step is to configure an Nginx block so you can access Fuel CMS using a domain. Therefore, create a new file using the below command:<\/p>\n Paste the following into the file:<\/p>\n Of course, you should replace the your_domain values with your actual domain.<\/p>\n Enable the site:<\/p>\n Restart Nginx:<\/p>\n Now, open your favorite web browser and navigate to http:\/\/your_domain.com. The welcome page for Fuel CMS will appear with instructions on finishing the installation. Nginx doesn’t use .htaccess files, so you can skip the first step. The second step is already completed, but the third isn’t. Therefore, make the required directories writable. Execute the following commands:<\/p>\n The fourth step is already completed.<\/p>\n To access the FUEL administration backend, go to:<\/p>\n http:\/\/your_domain.com\/fuel<\/p>\n and use the following login credentials:<\/p>\n Username: admin<\/p>\n Password: admin<\/p>\n After logging in, you need to change your admin password.<\/p>\n That is it, you have successfully installed Fuel CMS on your Ubuntu 14.04 VPS<\/a> with Nginx, PHP5-FPM and MySQL.<\/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 Fuel CMS for you.They are available 24\u00d77 and will take care of your request immediately.<\/p>\n PS.<\/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":" Fuel CMS is a lightweight, highly customizable CMS built with the very popular PHP framework CodeIgniter. You can create custom … <\/p>\n# apt-get update && apt-get upgrade<\/pre>\n
# apt-get install nginx php5-fpm mysql-server php5-mysql<\/pre>\n
# mysql -u root -p\r\n\r\nmysql> create database fuel;\r\n\r\nmysql> grant all privileges on fuel.* to fuelusr@localhost identified by 'your_password';\r\n\r\nmysql> flush privileges;\r\n\r\nmysql> exit\r\nBye<\/pre>\n
# cd \/opt\r\n\r\n# wget https:\/\/codeload.github.com\/daylightstudio\/FUEL-CMS\/zip\/master<\/pre>\n
# unzip master<\/pre>\n
# mv FUEL-CMS-master\/ fuelcms<\/pre>\n
# mv fuelcms\/ \/var\/www\/<\/pre>\n
# cd \/var\/www\/<\/pre>\n
# vim fuelcms\/fuel\/application\/config\/database.php<\/pre>\n
$active_group = 'default';\r\n$active_record = TRUE;\r\n\r\n$db['default']['hostname'] = 'localhost';\r\n$db['default']['username'] = 'fuelusr';\r\n$db['default']['password'] = 'your_password';\r\n$db['default']['database'] = 'fuel';\r\n$db['default']['dbdriver'] = 'mysql';\r\n$db['default']['dbprefix'] = '';\r\n$db['default']['pconnect'] = TRUE;\r\n$db['default']['db_debug'] = TRUE;\r\n$db['default']['cache_on'] = FALSE;\r\n$db['default']['cachedir'] = '';\r\n$db['default']['char_set'] = 'utf8';\r\n$db['default']['dbcollat'] = 'utf8_general_ci';\r\n$db['default']['swap_pre'] = '';\r\n$db['default']['autoinit'] = TRUE;\r\n$db['default']['stricton'] = FALSE;<\/pre>\n
# mysql -u fuelusr -p fuel < fuelcms\/fuel\/install\/fuel_schema.sql<\/pre>\n
# vim fuelcms\/fuel\/application\/config\/config.php<\/pre>\n
$config['encryption_key'] 'RvT1WH17eg9a1w7INabs5sXUnuE3xeQX' ;<\/pre>\n
# vim fuelcms\/fuel\/application\/config\/MY_fuel.php\r\n\r\n$config['site_name'] = 'your_site_name';\r\n\r\n\/\/ whether the admin backend is enabled or not\r\n$config['admin_enabled'] = TRUE;<\/pre>\n
# chown www-data: -R fuelcms\/<\/pre>\n
# vim \/etc\/nginx\/sites-available\/your_domain<\/pre>\n
server {\r\n listen 80 ;\r\n\r\n root \/var\/www\/fuelcms;\r\n index index.php index.html index.htm;\r\n rewrite ^\/sitemap_index\\.xml$ \/index.php?sitemap=1 last;\r\n rewrite ^\/([^\/]+?)-sitemap([0-9]+)?\\.xml$ \/index.php?sitemap=$1&sitemap_n=$2 last;\r\n\r\n server_name your_domain.com ;\r\n\r\n access_log \/var\/log\/nginx\/your_domain\/access.log;\r\n error_log \/var\/log\/nginx\/your_domain\/error.log;\r\n\r\n location \/ {\r\n # try_files $uri $uri\/ =404;\r\n try_files $uri $uri\/ \/index.php?q=$uri&$args;\r\n }\r\n\r\n error_page 404 \/404.html;\r\n\r\n error_page 500 502 503 504 \/50x.html;\r\n location = \/50x.html {\r\n root \/usr\/share\/nginx\/html;\r\n }\r\n\r\n location ~ \\.php$ {\r\n try_files $uri =404;\r\n fastcgi_split_path_info ^(.+\\.php)(\/.+)$;\r\n fastcgi_pass unix:\/var\/run\/php5-fpm.sock;\r\n fastcgi_index index.php;\r\n include fastcgi_params;\r\n\r\n }\r\n}<\/pre>\n
# ln -s \/etc\/nginx\/sites-available\/your_domain \/etc\/nginx\/sites-enabled\/your_domain<\/pre>\n
# \/etc\/init.d\/nginx restart<\/pre>\n
# chmod +x \/var\/www\/fuelcms\/fuel\/application\/cache\/\r\n\r\n# chmod +x \/var\/www\/fuelcms\/fuel\/application\/cache\/dwoo\/\r\n\r\n# chmod +x \/var\/www\/fuelcms\/fuel\/application\/cache\/dwoo\/compiled\r\n\r\n# chmod +x \/var\/www\/fuelcms\/assets\/images<\/pre>\n