<?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>Polr &#8211; Hostry Help Center</title>
	<atom:link href="https://help.hostry.com/article-tags/polr/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>Thu, 27 May 2021 08:55:37 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.9.13</generator>

<image>
	<url>https://help.hostry.com/wp-content/uploads/cache/2021/01/cropped-apple-icon-180x180-1/836712163.png</url>
	<title>Polr &#8211; Hostry Help Center</title>
	<link>https://help.hostry.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How To Install Polr on CentOS 8</title>
		<link>https://help.hostry.com/knowledge-base/how-to-install-polr-on-centos-8/</link>
					<comments>https://help.hostry.com/knowledge-base/how-to-install-polr-on-centos-8/#comments</comments>
		
		<dc:creator><![CDATA[Alex]]></dc:creator>
		<pubDate>Wed, 16 Sep 2020 10:06:26 +0000</pubDate>
				<guid isPermaLink="false">https://help.hostry.com/?post_type=ht_kb&#038;p=2141</guid>

					<description><![CDATA[Polr is a free open source link shortening tool written in PHP and Lumen. This allows you to quickly host your own URL shortener. Its important features include dashboard, detailed link analytics and API. This guide will walk you through the process of installing Polr on CentOS 8. Install Apache [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>Polr is a free open source link shortening tool written in PHP and Lumen. This allows you to quickly host your own URL shortener. Its important features include dashboard, detailed link analytics and API. This guide will walk you through the process of installing Polr on CentOS 8.</p>



<h2 id="install-apache" >Install Apache</h2>



<p>Polr requires a web server, MySQL database and PHP. In this tutorial, we will be using the Apache web server. Install Apache web server.</p>



<pre class="wp-block-code"><code>dnf install httpd -y
systemctl enable httpd.service</code></pre>



<p>Open ports <em>80</em> <strong>(HTTP)</strong> and <em>443</em> <strong>(HTTPS)</strong> through your firewall to access the server from the Internet</p>



<pre class="wp-block-code"><code>sudo firewall-cmd --permanent --zone=public --add-service=http
sudo firewall-cmd --permanent --zone=public --add-service=https
sudo firewall-cmd --reload</code></pre>



<p>Create a new Apache config file to install <strong>Polr</strong></p>



<pre class="wp-block-code"><code>nano /etc/httpd/conf.d/polr.conf</code></pre>



<p>Paste the following snippet into the newly created file, replacing it with domain_example.com with your own domain name</p>



<pre class="wp-block-code"><code>&lt;VirtualHost *:80&gt;
    ServerName domain_example.com
    ServerAlias domain_example.com
    DocumentRoot "/var/www/html/public"
    &lt;Directory "/var/www/html/public"&gt;
        Require all granted
        Options Indexes FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    &lt;/Directory&gt;
    ErrorLog /var/log/httpd/error.log
    CustomLog /var/log/httpd/access.log combined
&lt;/VirtualHost&gt;</code></pre>



<h2 id="install-php" >Install PHP</h2>



<p>Polr <em>requires</em><strong> PHP</strong> and a number of PHP modules. Install PHP and PHP modules required by Polr</p>



<pre class="wp-block-code"><code>dnf install php php-xml php-pdo php-mysqlnd php-mbstring php-tokenizer php-json php-curl -y</code></pre>



<h2 id="install-mysql-and-create-a-database" >Install MySQL and create a database</h2>



<p>Polr stores data in a SQL database. Install and enable MySQL server</p>



<pre class="wp-block-code"><code>dnf install mysql-server -y
systemctl enable mysqld.service
systemctl start mysqld.service</code></pre>



<p>Secure your MySQL installation by running the provided script</p>



<pre class="wp-block-code"><code>mysql_secure_installation</code></pre>



<p>When prompted for the root password, choose a secure password and proceed with the installation</p>



<pre class="wp-block-code"><code>Would you like to setup VALIDATE PASSWORD plugin? &#91;Y/N] N
New password: &lt;Your Password&gt;
Re-enter new password: &lt;Your Password&gt;
Remove anonymous users? &#91;Y/N] Y
Disallow root login remotely? &#91;Y/N] Y
Remove test database and access to it? &#91;Y/N] Y
Reload privilege tables now? &#91;Y/N] Y</code></pre>



<p>Log into the<strong> MySQL</strong> console</p>



<pre class="wp-block-code"><code>mysql -u root -p</code></pre>



<p>When prompted for a password, enter the root password you created earlier. After logging into the console, create a new database for <strong>Polr</strong></p>



<pre class="wp-block-code"><code>mysql&gt;CREATE DATABASE polr;</code></pre>



<p>Create a<strong> new database user</strong> and grant him privileges for the created database. You can replace username and password with any <strong>username</strong> and <strong>password</strong> of your choice</p>



<pre class="wp-block-code"><code>mysql&gt;CREATE USER 'username'@'localhost' identified by 'password';
mysql&gt;GRANT ALL PRIVILEGES on polr.* to 'username'@'localhost';
mysql&gt;FLUSH PRIVILEGES;</code></pre>



<p>Close the MySQL console</p>



<pre class="wp-block-code"><code>mysql&gt;exit</code></pre>



<h2 id="install-polr" >Install Polr</h2>



<p>Install <strong>git</strong> and clone the Polr repository from Github</p>



<pre class="wp-block-code"><code>dnf install git -y
cd /var/www/html
git clone https://github.com/cydrobolt/polr.git --depth=1</code></pre>



<p>Move the downloaded files to the root of the web server</p>



<pre class="wp-block-code"><code>mv ./polr/.&#91;!.]* . &amp;&amp; mv ./polr/* . &amp;&amp; rm -rf polr</code></pre>



<p>Download the Composr package. This is required to install dependencies.</p>



<pre class="wp-block-code"><code>curl -sS https://getcomposer.org/installer | php
</code></pre>



<p>Install dependencies using Composr</p>



<pre class="wp-block-code"><code>php composer.phar install --no-dev -o</code></pre>



<p>Copy the provided config file to enable the web installer</p>



<pre class="wp-block-code"><code>cp .env.setup .env</code></pre>



<p>Set the appropriate file permissions</p>



<pre class="wp-block-code"><code>chown -R apache:apache /var/www/html/
chmod -R 755 /var/www/html/
chcon -R -t httpd_sys_rw_content_t storage .env</code></pre>



<p>Start the Apache web server</p>



<pre class="wp-block-code"><code>systemctl start httpd.service</code></pre>



<p></p>
]]></content:encoded>
					
					<wfw:commentRss>https://help.hostry.com/knowledge-base/how-to-install-polr-on-centos-8/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>How To Install Polr on Ubuntu 18.04</title>
		<link>https://help.hostry.com/knowledge-base/how-to-install-polr-on-ubuntu-18-04/</link>
		
		<dc:creator><![CDATA[Alex]]></dc:creator>
		<pubDate>Wed, 30 Sep 2020 09:13:39 +0000</pubDate>
				<guid isPermaLink="false">https://help.hostry.com/?post_type=ht_kb&#038;p=2262</guid>

					<description><![CDATA[Polr is a free open source link shortening tool written in PHP and Lumen. This allows you to quickly host your own URL shortener. Its important features include dashboard, detailed link analytics and API. This guide will walk you through the process of installing Polr on CentOS 8. Install Apache [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>Polr is a free open source link shortening tool written in PHP and Lumen. This allows you to quickly host your own URL shortener. Its important features include dashboard, detailed link analytics and API. This guide will walk you through the process of installing Polr on CentOS 8.</p>



<h2 id="install-apache" id="install-apache" >Install Apache</h2>



<p>Polr requires a web server as well as PHP and a MySLQ database. This tutorial will use the Apache web server, but you can choose any one that suits you. </p>



<p>Update repositories:</p>



<pre class="wp-block-code"><code>apt-get update</code></pre>



<p>Install Apache web server:</p>



<pre class="wp-block-code"><code>apt-get install apache2 -y</code></pre>



<p>Disable the default Apache site configuration and then you need to remove the default Apache <strong>index.html </strong>file</p>



<pre class="wp-block-code"><code>a2dissite 000-default.conf
rm /var/www/html/index.html</code></pre>



<p>Next, you need to <strong>create a new Apache configuration file</strong> in order to subsequently install Polr</p>



<pre class="wp-block-code"><code>nano /etc/apache2/sites-available/polr.conf</code></pre>



<p>Paste the current snippet into the file you created. Replace <strong>domain_example </strong>with your own domain name</p>



<pre class="wp-block-code"><code>&lt;VirtualHost *:80&gt;
    ServerName domain_example
    ServerAlias domain_example
    DocumentRoot "/var/www/html/public"
    &lt;Directory "/var/www/html/public"&gt;
        Require all granted
        Options Indexes FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    &lt;/Directory&gt;
   ErrorLog ${APACHE_LOG_DIR}/error.log
   CustomLog ${APACHE_LOG_DIR}/access.log combined
&lt;/VirtualHost&gt;</code></pre>



<p>Turn this configuration</p>



<pre class="wp-block-code"><code>a2ensite polr.conf</code></pre>



<p>Polr requires Apache to have mod_rewrite enabled. Enable Apache rewrite module</p>



<pre class="wp-block-code"><code>a2enmod rewrite</code></pre>



<p>Restart the Apache service</p>



<pre class="wp-block-code"><code>systemctl restart apache2.service</code></pre>



<h2 id="install-php" >Install PHP</h2>



<p>Polr&nbsp;<em>requires</em><strong>&nbsp;PHP</strong>&nbsp;and a number of PHP modules. Install PHP and PHP modules required by Polr</p>



<pre class="wp-block-code"><code>dnf install php php-xml php-pdo php-mysqlnd php-mbstring php-tokenizer php-json php-curl -y</code></pre>



<h2 id="install-mysql-and-create-a-database" >Install MySQL and create a database</h2>



<p>Polr stores data in a SQL database. Install and enable MySQL server</p>



<pre class="wp-block-code"><code>apt-get install mysql-server -y</code></pre>



<p>Secure your MySQL installation by running the provided script</p>



<pre class="wp-block-code"><code>mysql_secure_installation</code></pre>



<p>When prompted for the root password, choose a secure password and proceed with the installation</p>



<pre class="wp-block-code"><code>Would you like to setup VALIDATE PASSWORD plugin? &#91;Y/N] N
New password: &lt;Your Password&gt;
Re-enter new password: &lt;Your Password&gt;
Remove anonymous users? &#91;Y/N] Y
Disallow root login remotely? &#91;Y/N] Y
Remove test database and access to it? &#91;Y/N] Y
Reload privilege tables now? &#91;Y/N] Y</code></pre>



<p>Log into the<strong>&nbsp;MySQL</strong>&nbsp;console</p>



<pre class="wp-block-code"><code>mysql -u root -p</code></pre>



<p>When prompted for a password, enter the root password you created earlier. After logging into the console, create a new database for&nbsp;<strong>Polr</strong></p>



<pre class="wp-block-code"><code>mysql&gt;CREATE DATABASE polr;</code></pre>



<p>Create a<strong>&nbsp;new database user</strong>&nbsp;and grant him privileges for the created database. You can replace username and password with any&nbsp;<strong>username</strong>&nbsp;and&nbsp;<strong>password</strong>&nbsp;of your choice</p>



<pre class="wp-block-code"><code>mysql&gt;GRANT ALL PRIVILEGES on polr.* to 'username'@'localhost' identified by 'password';
mysql&gt;FLUSH PRIVILEGES;</code></pre>



<p>Close the MySQL console</p>



<pre class="wp-block-code"><code>mysql&gt;exit</code></pre>



<h2 id="install-polr" >Install Polr</h2>



<p>Clone the Polr repository from Github</p>



<pre class="wp-block-code"><code>cd /var/www/html
git clone https://github.com/cydrobolt/polr.git --depth=1</code></pre>



<p>Move the downloaded files to the root of the web server</p>



<pre class="wp-block-code"><code>mv ./polr/.&#91;!.]* . &amp;&amp; mv ./polr/* . &amp;&amp; rm -rf polr</code></pre>



<p>Download the Composr package. This is required to install dependencies.</p>



<pre class="wp-block-code"><code>curl -sS https://getcomposer.org/installer | php
apt-get install unzip -y</code></pre>



<p>Install dependencies using Composr</p>



<pre class="wp-block-code"><code>php composer.phar install --no-dev -o</code></pre>



<p>Copy the provided config file to enable the web installer</p>



<pre class="wp-block-code"><code>cp .env.setup .env</code></pre>



<p>Set the appropriate file permissions</p>



<pre class="wp-block-code"><code>chown -R www-data:www-data /var/www/html/
chmod -R 755 /var/www/html/</code></pre>



<p>Start the Apache web server</p>



<pre class="wp-block-code"><code>systemctl start httpd.service</code></pre>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
