<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Grav &#8211; Hostry Help Center</title>
	<atom:link href="https://help.hostry.com/article-tags/grav/feed/" rel="self" type="application/rss+xml" />
	<link>https://help.hostry.com</link>
	<description>Full information on how to use HOSTRY, provided by 24/7 community based support</description>
	<lastBuildDate>Mon, 08 Feb 2021 08:29:03 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.9.12</generator>

<image>
	<url>https://help.hostry.com/wp-content/uploads/cache/2021/01/cropped-apple-icon-180x180-1/836712163.png</url>
	<title>Grav &#8211; Hostry Help Center</title>
	<link>https://help.hostry.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How to install Grav CMS on Fedora 28</title>
		<link>https://help.hostry.com/knowledge-base/how-to-install-grav-cms-on-fedora-28/</link>
					<comments>https://help.hostry.com/knowledge-base/how-to-install-grav-cms-on-fedora-28/#respond</comments>
		
		<dc:creator><![CDATA[Alex]]></dc:creator>
		<pubDate>Tue, 10 Dec 2019 07:27:38 +0000</pubDate>
				<guid isPermaLink="false">https://help.hostry.com/?post_type=ht_kb&#038;p=1034</guid>

					<description><![CDATA[The Grav administration plugin is a very simple and intuitive interface. It makes setting up content creation very enjoyable and easy! This CMS is open source, and written in PHP. Checking Fedora Version Before we begin the installation of Grav CMS, we must check the version of Fedora Next, you [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>The Grav administration plugin is a very simple and intuitive interface. It makes setting up content creation very enjoyable and easy! This CMS is open source, and written in PHP.</p>



<h2 id="checking-fedora-version" >Checking Fedora Version</h2>



<p>Before we begin the installation of Grav CMS, we must check the version of Fedora</p>



<pre class="wp-block-code"><code>cat /etc/fedora-release
# Fedora release 28 (Twenty Eight)</code></pre>



<p>Next, you need to create a new account, it is important that it is non-root and go to it</p>



<pre class="wp-block-code"><code>useradd -c "Alex Moure" alexmoure &amp;&amp; passwd johndoe
usermod -aG wheel alexmoure
su - alexmoure</code></pre>



<p><strong>Note! In this manual, replace &#8220;alexmoure&#8221; with your username</strong></p>



<p>Set the time zone</p>



<pre class="wp-block-code"><code>timedatectl list-timezones
sudo timedatectl set-timezone 'Region/City'</code></pre>



<p>Make sure that your system is up to date</p>



<pre class="wp-block-code"><code>sudo dnf check-upgrade || sudo dnf upgrade -y</code></pre>



<p>Install the necessary packages</p>



<pre class="wp-block-code"><code>sudo dnf install -y wget curl vim unzip</code></pre>



<p>For easier operation, disable SELinux and Firewall</p>



<pre class="wp-block-code"><code>sudo setenforce 0 ; sudo systemctl stop firewalld ; sudo systemctl disable firewalld</code></pre>



<h2 id="install-php-and-the-necessary-php-extensions" >Install PHP and the necessary PHP extensions</h2>



<p>To install, enter the following command:</p>



<pre class="wp-block-code"><code>sudo dnf install -y php-cli php-fpm php-common php-curl php-gd php-json php-mbstring php-xml php-zip php-opcache php-pecl-apcu</code></pre>



<p>Check the version</p>



<pre class="wp-block-code"><code>php --version</code></pre>



<p>Next, you need to start and enable the PHP-FPM service</p>



<pre class="wp-block-code"><code>sudo systemctl start php-fpm.service
sudo systemctl enable php-fpm.service</code></pre>



<h2 id="install-and-configure-nginx" >Install and configure Nginx</h2>



<p>To install, enter the following:</p>



<pre class="wp-block-code"><code>sudo dnf install -y nginx</code></pre>



<p>Check the version of Nginx</p>



<pre class="wp-block-code"><code>nginx -v</code></pre>



<p>Launch and enable the Nginx service</p>



<pre class="wp-block-code"><code>sudo systemctl start nginx.service
sudo systemctl enable nginx.servic</code></pre>



<p>Then configure Nginx. Run sudo vim <strong>/etc/nginx/conf.d/grav.conf</strong> and fill in the file with the following configuration</p>



<pre class="wp-block-code"><code>server {

  listen 80;

  server_name example.com;
  root /var/www/grav;

  index index.html index.php;

  location / {
    try_files $uri $uri/ /index.php?$query_string;
  }

  location ~* /(\.git|cache|bin|logs|backup|tests)/.*$ { return 403; }
  location ~* /(system|vendor)/.*\.(txt|xml|md|html|yaml|yml|php|pl|py|cgi|twig|sh|bat)$ { return 403; }
  location ~* /user/.*\.(txt|md|yaml|yml|php|pl|py|cgi|twig|sh|bat)$ { return 403; }
  location ~ /(LICENSE\.txt|composer\.lock|composer\.json|nginx\.conf|web\.config|htaccess\.txt|\.htaccess) { return 403; }

  location ~ \.php$ {
    fastcgi_pass unix:/run/php-fpm/www.sock;
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    fastcgi_index index.php;
    include fastcgi_params;
    fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
  }

}</code></pre>



<p>Then check the configuration of Nginx</p>



<pre class="wp-block-code"><code>sudo nginx -t</code></pre>



<p>Restart Nginx</p>



<pre class="wp-block-code"><code>sudo systemctl reload nginx.service</code></pre>



<h2 id="install-grav" >Install Grav</h2>



<p>Create the root directory of the document</p>



<pre class="wp-block-code"><code>sudo mkdir -p /var/www/grav</code></pre>



<p>Change the owner of the <strong>/var/www/grav</strong> directory to <strong>alexmoure</strong></p>



<pre class="wp-block-code"><code>sudo chown -R alexmoure:alexmoure /var/www/grav</code></pre>



<p>Go to the root folder of the document</p>



<pre class="wp-block-code"><code>cd /var/www/grav</code></pre>



<p>Then download and unzip Grav</p>



<pre class="wp-block-code"><code>wget https://getgrav.org/download/core/grav-admin/1.4.8
unzip 1.4.8
mv grav-admin/* . &amp;&amp; mv grav-admin/.* .
rm -rf grav-admin 1.4.8</code></pre>



<p>After successful unpacking Change the owner of the <strong>/var/www/grav </strong>directory to<strong> nginx</strong></p>



<pre class="wp-block-code"><code>sudo chown -R nginx:nginx /var/www/grav</code></pre>



<p>Run sudo vim <strong>/etc/php-fpm.d/www.conf</strong> and set the user and group to <strong>nginx</strong></p>



<pre class="wp-block-code"><code>sudo vim /etc/php-fpm.d/www.conf
# user = nginx
# group = nginx</code></pre>



<p>Restart the PHP-FPM service</p>



<pre class="wp-block-code"><code>sudo systemctl restart php-fpm.service</code></pre>



<p>Create<strong> /var/lib/php/session/</strong> directory and change the owner to <strong>nginx</strong></p>



<pre class="wp-block-code"><code>sudo mkdir -p /var/lib/php/session/ &amp;&amp; sudo chown -R nginx:nginx /var/lib/php/session/</code></pre>



<p>Open <strong>http://example.com</strong> in your web browser and follow the instructions on the screen, so that you have access to Grav admin add <strong>/admin</strong> your URL</p>
]]></content:encoded>
					
					<wfw:commentRss>https://help.hostry.com/knowledge-base/how-to-install-grav-cms-on-fedora-28/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Install Grav CMS on Ubuntu 18.04</title>
		<link>https://help.hostry.com/knowledge-base/how-to-install-grav-cms-on-ubuntu-18-04/</link>
		
		<dc:creator><![CDATA[Alex]]></dc:creator>
		<pubDate>Tue, 01 Dec 2020 11:40:10 +0000</pubDate>
				<guid isPermaLink="false">https://help.hostry.com/?post_type=ht_kb&#038;p=2627</guid>

					<description><![CDATA[In 2016, Grav CMS was named the best open source CMS. Also Voted &#8220;Best Flat File CMS&#8221; in 2017 and 2019. Grav has a powerful API and a sophisticated package manager, making it super flexible. It is written in PHP and its source code Grav is publicly posted on GitHub. [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>In 2016, <strong><a href="https://getgrav.org/">Grav</a></strong> CMS was named the best open source CMS. Also Voted &#8220;Best Flat File CMS&#8221; in 2017 and 2019. Grav has a powerful API and a sophisticated package manager, making it super flexible. It is written in  PHP and its source code Grav is publicly posted on GitHub. The Grav administration plugin is a very simple and intuitive interface. This makes setting up your content creation really nice and easy! In this article we will try to tell you in detail and describe the possibility of installing this CMS on Ubuntu 18.04. </p>



<h2 id="steps-to-be-taken-before-installation" >Steps To Be Taken Before Installation</h2>



<p>First, you need to check your version of Ubuntu OS. This can be done as follows:</p>



<pre class="wp-block-code"><code>lsb_release -ds
# Ubuntu 18.04 LTS</code></pre>



<p>Next, you must create a <span style="text-decoration: underline;">new</span> <strong>non-root</strong> user account with sudo access and then switch to it</p>



<pre class="wp-block-code"><code>adduser Username --gecos "User Name"
usermod -aG sudo usename
su - Username</code></pre>



<p>Set up  your necessary time zone</p>



<pre class="wp-block-code"><code>sudo dpkg-reconfigure tzdata</code></pre>



<p>Make sure your system is up to date</p>



<pre class="wp-block-code"><code>sudo apt update &amp;&amp; sudo apt upgrade -y</code></pre>



<p>Install <strong>unzip</strong></p>



<pre class="wp-block-code"><code>sudo apt install -y unzip</code></pre>



<h2 id="install-php-and-required-php-extensions" >Install PHP and Required PHP Extensions</h2>



<p>You can install this using the following command:</p>



<pre class="wp-block-code"><code>sudo apt install -y php7.2 php7.2-cli php7.2-fpm php7.2-common php7.2-curl php7.2-gd php7.2-json php7.2-mbstring php7.2-xml php7.2-zip php7.2-opcache php-apcu
</code></pre>



<h2 id="install-and-configure-nginx" >Install and Configure Nginx</h2>



<p>You can install this web server using the following command:</p>



<pre class="wp-block-code"><code>sudo apt install -y nginx</code></pre>



<p>Run sudo vim <strong>/etc/nginx/sites-available/grav.conf</strong> and configure Nginx for Grav</p>



<pre class="wp-block-code"><code>server {

  listen 80;

  server_name example.com;
  root /var/www/grav;

  index index.html index.php;

  location / {
    try_files $uri $uri/ /index.php?$query_string;
  }

  location ~* /(\.git|cache|bin|logs|backup|tests)/.*$ { return 403; }
  location ~* /(system|vendor)/.*\.(txt|xml|md|html|yaml|yml|php|pl|py|cgi|twig|sh|bat)$ { return 403; }
  location ~* /user/.*\.(txt|md|yaml|yml|php|pl|py|cgi|twig|sh|bat)$ { return 403; }
  location ~ /(LICENSE\.txt|composer\.lock|composer\.json|nginx\.conf|web\.config|htaccess\.txt|\.htaccess) { return 403; }

  location ~ \.php$ {
    fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    fastcgi_index index.php;
    include fastcgi_params;
    fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
  }

}</code></pre>



<p>Activate the new <strong>grav.conf</strong> configuration by linking the file to the sites-enabled directory </p>



<pre class="wp-block-code"><code>sudo ln -s /etc/nginx/sites-available/grav.conf /etc/nginx/sites-enabled/</code></pre>



<p>Then, after activation, you need to test the configuration</p>



<pre class="wp-block-code"><code>sudo nginx -t</code></pre>



<p>Then. restart your Nginx server </p>



<pre class="wp-block-code"><code>sudo systemctl reload nginx.service</code></pre>



<h2 id="install-grav" >Install Grav</h2>



<p>Before installation, there is a need to create a document root directory</p>



<pre class="wp-block-code"><code>sudo mkdir -p /var/www/grav</code></pre>



<p>Change the owner of the <strong>/var/www/grav</strong> directory to <strong><em>username</em></strong>.</p>



<pre class="wp-block-code"><code>sudo chown -R johndoe:johndoe /var/www/grav</code></pre>



<p>Go to the <strong>root</strong> folder of the <strong>document</strong>.</p>



<pre class="wp-block-code"><code>cd /var/www/grav</code></pre>



<p>Download the latest <strong>Grav</strong> zip and <strong>unzip </strong>it.</p>



<pre class="wp-block-code"><code>wget https://getgrav.org/download/core/grav-admin/1.5.6
unzip 1.5.6
mv grav-admin/* . &amp;&amp; mv grav-admin/.* .
rm -rf grav-admin 1.5.6</code></pre>



<p>Change the owner of the <strong>/var/www/grav</strong> directory to <strong><span style="text-decoration: underline;"><em>www-data</em></span></strong>.</p>



<pre class="wp-block-code"><code>sudo chown -R www-data:www-data /var/www/grav</code></pre>



<p>Open <strong>http://example.com</strong> in your web browser and follow the instructions on the screen. To access your admin panel, <strong>add/admin</strong> to your url.</p>



<p></p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
