{"id":3384,"date":"2018-04-25T12:47:10","date_gmt":"2018-04-25T08:47:10","guid":{"rendered":"https:\/\/www.howtoforge.com\/tutorial\/ubuntu-pyrocms\/"},"modified":"2018-04-25T12:47:10","modified_gmt":"2018-04-25T08:47:10","slug":"how-to-install-pyrocms-on-ubuntu-linux","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/how-to-install-pyrocms-on-ubuntu-linux\/","title":{"rendered":"How to Install PyroCMS on Ubuntu Linux"},"content":{"rendered":"<p>PyroCMS is a free, open source, powerful, easy to use and modular CMS and development platform built with Laravel 5. PyroCMS is a lightweight CMS that allow us to create custom modules and for any end user to understand how PyroCMS works. PyroCMS comes with a responsive control panel that makes it easy to manage your content from a\u00a0central location.<\/p>\n<p>In this tutorial, I will explain how to install PyroCMS on Ubuntu 16.04 LTS server.<\/p>\n<h2 id=\"prerequisites\">Prerequisites<\/h2>\n<ul>\n<li>A server running Ubuntu 16.04.<\/li>\n<li>A non-root user with sudo privileges setup on your server.<\/li>\n<\/ul>\n<h2 id=\"getting-started\">Getting Started<\/h2>\n<p>Before starting, it is necessary to update your system to the latest version and install required packages to your server. You can do this with the following command:<\/p>\n<p class=\"command\">sudo apt-get update -y<br \/>sudo apt-get upgrade -y<\/p>\n<p>Once your system is updated, restart your system and install required packages with the following command:<\/p>\n<p class=\"command\">sudo apt-get install curl wget unzip git -y<\/p>\n<h2 id=\"install-nginx-mariadb-and-php\">Install Nginx, MariaDB, and PHP<\/h2>\n<p>Next, you will need to install Nginx, MariaDB, PHP and other PHP libraries to your system. You can install all of them by running the following command:<\/p>\n<p class=\"command\">sudo apt-get install nginx mariadb-server php7.0 php7.0-fpm php7.0-mysql php7.0-curl php7.0-sqlite3 php7.0-mbstring php7.0-cli php7.0-gd php7.0-dom -y<\/p>\n<p>Once all the packages are installed, start Nginx, MariaDB and Php7.0-fpm service and enable them to start on boot time with the following command:<\/p>\n<p class=\"command\">sudo systemctl start nginx<br \/>sudo systemctl start mysql<br \/>sudo systemctl start php7.0-fpm<br \/>sudo systemctl enable nginx<br \/>sudo systemctl enable mysql<br \/>sudo systemctl enable php7.0-fpm<\/p>\n<h2 id=\"configure-database\">Configure Database<\/h2>\n<p>Before configuring the database, you will need to secure MariaDB first. You can do this by running the following command:<\/p>\n<p class=\"command\">sudo mysql_secure_installation<\/p>\n<p>Answer all the questions as shown below:<\/p>\n<pre>Change the password for root ? N&#13;\nRemove anonymous users? Y&#13;\nDisallow root login remotely? Y&#13;\nRemove test database and access to it? Y&#13;\nReload privilege tables now? Y<\/pre>\n<p>Once the MariaDB is secured, log in to MariaDB console:<\/p>\n<p class=\"command\">mysql -u root -p<\/p>\n<p>Enter your root password, then create a database for PyroCMS:<\/p>\n<p class=\"command\">MariaDB [(none)]&gt;CREATE DATABASE pyrodb;<\/p>\n<p>Next, create a user for PyroCMS, assign a password and grant all privileges on Pyrodb database with the following command:<\/p>\n<p class=\"command\">MariaDB [(none)]&gt; CREATE user pyro identified by &#8216;password&#8217;;<br \/>MariaDB [(none)]&gt; GRANT ALL PRIVILEGES on pyrodb.* to <a href=\"https:\/\/www.howtoforge.com\/cdn-cgi\/l\/email-protection\" class=\"__cf_email__\" data-cfemail=\"d2a2aba0bd92bebdb1b3bebabda1a6\" target=\"_blank\" rel=\"noopener\">[email\u00a0protected]<\/a> identified by &#8216;password&#8217;;<\/p>\n<p>Next, flush the privileges with the following command:<\/p>\n<p class=\"command\">MariaDB [(none)]&gt; FLUSH PRIVILEGES;<\/p>\n<p>Finally, exit from the MySQL shell with the following command:<\/p>\n<p class=\"command\">MariaDB [(none)]&gt; exit;<\/p>\n<h2 id=\"install-pyrocms\">Install PyroCMS<\/h2>\n<p>Before starting, you will need to install the Composer. Composer is a dependency manager that can be used to install dependencies required by PHP. You can install Composer with the following command:<\/p>\n<p class=\"command\">curl -s https:\/\/getcomposer.org\/installer | php<br \/>sudo mv composer.phar \/usr\/local\/bin\/composer<br \/>sudo chmod 755 \/usr\/local\/bin\/composer<\/p>\n<p>Next, create a directory for PyroCMS where you need to install it:<\/p>\n<p class=\"command\">sudo mkdir \/var\/www\/html\/pyrocms<\/p>\n<p>Next, change the directory to the pyrocms\u00a0folder and download the latest version of the PyroCMS using the following command:<\/p>\n<p class=\"command\">cd \/var\/www\/html\/pyrocms\/<br \/>sudo composer create-project pyrocms\/pyrocms .<\/p>\n<p>Next, give proper permission to the pyrocms directory:<\/p>\n<p class=\"command\">sudo chown -R www-data:www-data \/var\/www\/html\/pyrocms<\/p>\n<h2 id=\"configure-nginx-for-pyrocms\">Configure Nginx for PyroCMS<\/h2>\n<p>Next, you will need to create a Nginx virtual host directive for PyroCMS. You can do this with the following command:<\/p>\n<p class=\"command\">sudo nano \/etc\/nginx\/sites-available\/pyro.conf<\/p>\n<p>Add the following lines:<\/p>\n<pre>server {&#13; listen 80;&#13;\n&#13; server_name 192.168.0.102; # Check this&#13; root \/var\/www\/html\/pyrocms\/public; # Check this&#13;\n&#13; index index.php index.html;&#13; charset utf-8;&#13;\n&#13; location \/ {&#13; try_files $uri $uri\/ \/index.php?$args;&#13; }&#13;\n&#13; location ~ \\.php$ {&#13; fastcgi_pass unix:\/var\/run\/php\/php7.0-fpm.sock; # Check this&#13; fastcgi_index index.php;&#13; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;&#13; include fastcgi_params;&#13; }&#13;\n&#13;\n}&#13;\n<\/pre>\n<p>Save and close the file, then enable virtual host and restart Nginx service with the following command:<\/p>\n<p class=\"command\">sudo ln -s \/etc\/nginx\/sites-available\/pyro.conf \/etc\/nginx\/sites-enabled\/<br \/>sudo systemctl restart nginx<\/p>\n<h2 id=\"access-pyrocms\">Access PyroCMS<\/h2>\n<p>Now, open your web browser and type the URL <strong>http:\/\/192.168.0.102<\/strong>, you will be redirected to the following page:<\/p>\n<p><a class=\"fancybox\" id=\"img-page1\" href=\"https:\/\/www.howtoforge.com\/images\/install_pyrocms_on_ubuntu_1604\/big\/page1.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/04\/how-to-install-pyrocms-on-ubuntu-linux.png\" alt=\"Accept PyroCMS license\" width=\"550\" height=\"284\" title=\"\"><\/a><\/p>\n<p><a class=\"fancybox\" id=\"img-page1.2_\" href=\"https:\/\/www.howtoforge.com\/images\/install_pyrocms_on_ubuntu_1604\/big\/page1.2_.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/04\/how-to-install-pyrocms-on-ubuntu-linux-1.png\" alt=\"MySQL database details\" width=\"550\" height=\"286\" title=\"\"><\/a><\/p>\n<p><a class=\"fancybox\" id=\"img-page1.3_\" href=\"https:\/\/www.howtoforge.com\/images\/install_pyrocms_on_ubuntu_1604\/big\/page1.3_.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/04\/how-to-install-pyrocms-on-ubuntu-linux-2.png\" alt=\"Username and password\" width=\"550\" height=\"199\" title=\"\"><\/a><\/p>\n<p><a class=\"fancybox\" id=\"img-page1.4_\" href=\"https:\/\/www.howtoforge.com\/images\/install_pyrocms_on_ubuntu_1604\/big\/page1.4_.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/04\/how-to-install-pyrocms-on-ubuntu-linux-3.png\" alt=\"Application settings\" width=\"550\" height=\"287\" title=\"\"><\/a><\/p>\n<p>Here, agree to the license agreement and provide all the information like, database username, database name, admin username and password, then click on the <strong>Install<\/strong> button, you should see the following page:<\/p>\n<p><a class=\"fancybox\" id=\"img-page2\" href=\"https:\/\/www.howtoforge.com\/images\/install_pyrocms_on_ubuntu_1604\/big\/page2.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/04\/how-to-install-pyrocms-on-ubuntu-linux-4.png\" alt=\"PyroCMS installation finished\" width=\"550\" height=\"286\" title=\"\"><\/a><\/p>\n<p>Now, click on <strong>Login<\/strong> button, you should see the following page:<\/p>\n<p><a class=\"fancybox\" id=\"img-page3\" href=\"https:\/\/www.howtoforge.com\/images\/install_pyrocms_on_ubuntu_1604\/big\/page3.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/04\/how-to-install-pyrocms-on-ubuntu-linux-5.png\" alt=\"Login to PyroCMS\" width=\"550\" height=\"285\" title=\"\"><\/a><\/p>\n<p>Now, provide your admin credential and click on the <strong>Login<\/strong> button, you should see the PyroCMS dashboard in the following page:<\/p>\n<p><a class=\"fancybox\" id=\"img-page5\" href=\"https:\/\/www.howtoforge.com\/images\/install_pyrocms_on_ubuntu_1604\/big\/page5.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/04\/how-to-install-pyrocms-on-ubuntu-linux-6.png\" alt=\"PyroCMS admin dashboard\" width=\"550\" height=\"286\" title=\"\"><\/a><\/p>\n<div>\n<p><b>Share this page:<\/b><\/p>\n<p>\n<a href=\"https:\/\/www.facebook.com\/sharer.php?u=https%3A%2F%2Fwww.howtoforge.com%2Ftutorial%2Fubuntu-pyrocms%2F\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><img decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/04\/how-to-install-pyrocms-on-ubuntu-linux-7.png\" height=\"20\" alt=\"\" title=\"\"><\/a><br \/>\n<a href=\"https:\/\/twitter.com\/intent\/tweet?url=https%3A%2F%2Fwww.howtoforge.com%2Ftutorial%2Fubuntu-pyrocms%2F&amp;text=How+to+Install+PyroCMS+on+Ubuntu+Linux&amp;via=howtoforgecom&amp;related=howtoforgecom\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><img decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/04\/how-to-install-pyrocms-on-ubuntu-linux-8.png\" height=\"20\" alt=\"\" title=\"\"><\/a><br \/>\n<a href=\"https:\/\/twitter.com\/howtoforgecom\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><img decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/04\/how-to-install-pyrocms-on-ubuntu-linux-9.png\" height=\"20\" alt=\"\" title=\"\"><\/a><br \/>\n<a href=\"https:\/\/plus.google.com\/share?url=https%3A%2F%2Fwww.howtoforge.com%2Ftutorial%2Fubuntu-pyrocms%2F\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><img decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/04\/how-to-install-pyrocms-on-ubuntu-linux-10.png\" height=\"20\" alt=\"\" title=\"\"><\/a>\n<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>PyroCMS is a free, open source, powerful, easy to use and modular CMS and development platform built with Laravel 5. PyroCMS is a lightweight CMS that allow us to create custom modules and for any end user to understand how PyroCMS works. PyroCMS comes with a responsive control panel that makes it easy to manage &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[36],"tags":[],"class_list":["post-3384","post","type-post","status-publish","format-standard","hentry","category-36"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/3384","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/comments?post=3384"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/3384\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=3384"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=3384"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=3384"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}