<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Samuel John</title>
    <description>The latest articles on DEV Community by Samuel John (@opeoniye).</description>
    <link>https://dev.to/opeoniye</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F837522%2F12d2ebf8-c5a4-46d5-8e26-1df3fb0b0c2e.jpg</url>
      <title>DEV Community: Samuel John</title>
      <link>https://dev.to/opeoniye</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/opeoniye"/>
    <language>en</language>
    <item>
      <title>How to setup PHPMyAdmin with Nginx on Ubuntu</title>
      <dc:creator>Samuel John</dc:creator>
      <pubDate>Thu, 22 Jun 2023 23:33:54 +0000</pubDate>
      <link>https://dev.to/opeoniye/how-to-setup-phpmyadmin-with-nginx-on-ubuntu-1p54</link>
      <guid>https://dev.to/opeoniye/how-to-setup-phpmyadmin-with-nginx-on-ubuntu-1p54</guid>
      <description>&lt;p&gt;What is PHPMyAdmin? It is an open source tool written in the &lt;a href="https://www.php.net/"&gt;PHP&lt;/a&gt; programming language and it is useful for handling the administration of MySQL/MariaDB database servers over the Web. It possess a simple interface that is easy to navigate and learn quickly.&lt;/p&gt;

&lt;p&gt;What is Nginx? &lt;a href="https://nginx.org/"&gt;Nginx&lt;/a&gt; is an open source software that is used mainly as a web server, reverse proxy, cache server. It is also used as a load balancer, for media streaming, etc.&lt;/p&gt;

&lt;p&gt;Now to the topic of discussion for today...&lt;br&gt;
How do I setup PHPMyAdmin with nginx on my ubuntu server?&lt;/p&gt;
&lt;h3&gt;
  
  
  Step 1: Install needed tools
&lt;/h3&gt;

&lt;p&gt;Before installing PHPMyAdmin, make sure you have installed and configured mysql/mariadb and nginx&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt update &amp;amp;&amp;amp; sudo apt upgrade
sudo apt install zip
mkdir -p /var/www/phpmyadmin
cd /var/www/phpmyadmin
wget https://www.phpmyadmin.net/downloads/phpMyAdmin-latest-all-languages.zip
unzip phpMyAdmin-latest-all-languages.zip
cp -a phpMyAdmin-5.2.1-all-languages/. .
rm -rf phpMyAdmin-5.2.1-all-languages
rm -rf phpMyAdmin-5.2.1-all-languages.zip
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 2: Configure Nginx virtualhost
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo vim /etc/nginx/conf.d/vhost.conf
server {
    listen         80 default_server;
    listen         [::]:80 default_server;
    server_name    _;
    root           /var/www/phpmyadmin;
    index          index.php;

    location / {
      #try_files $uri $uri/ =404;
      try_files $uri $uri/ /index.php?$args;        
    }

    location ~ \.php$ {
      include snippets/fastcgi-php.conf;
      fastcgi_pass unix:/run/php/php7.2-fpm.sock;
    }

    location ~ /\.ht {
      deny all;
    }

    location /phpmyadmin {
      alias /var/www/phpmyadmin;
      #try_files $uri $uri/;

      location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/run/php/php7.2-fpm.sock;
        include fastcgi_params;                       
        fastcgi_param SCRIPT_FILENAME $request_filename;
        #fastcgi_intercept_errors on;
      }
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 3: Test your PHPMyAdmin installation
&lt;/h3&gt;

&lt;p&gt;Go to this url to test: http{s}://your-url/phpmyadmin&lt;/p&gt;

&lt;p&gt;Thank you so much for your time. Make sure to check back on my blog for other amazing technical contents.&lt;/p&gt;

</description>
      <category>phpmyadmin</category>
      <category>nginx</category>
      <category>devops</category>
    </item>
    <item>
      <title>My favourite rsync commands</title>
      <dc:creator>Samuel John</dc:creator>
      <pubDate>Tue, 12 Apr 2022 22:12:45 +0000</pubDate>
      <link>https://dev.to/opeoniye/my-favourite-rsync-commands-eo0</link>
      <guid>https://dev.to/opeoniye/my-favourite-rsync-commands-eo0</guid>
      <description>&lt;p&gt;Below, i have collated some &lt;code&gt;rsync&lt;/code&gt; commands that I use in my day-to-day system administration tasks.&lt;br&gt;
I found &lt;strong&gt;&lt;a href="https://rsync.samba.org/"&gt;rsync&lt;/a&gt;&lt;/strong&gt; a better tool compared with other FTP/SFTP tools that I have used in the past. (FileZilla was my goto tool in the past).&lt;/p&gt;

&lt;p&gt;Another thing that fascinated me and attracted me to using rsync was the need to carry out all my sysadmin/development tasks inside one gui using an IDE (I fell in love with &lt;a href="https://code.visualstudio.com/"&gt;VSCode&lt;/a&gt; as my favourite).&lt;/p&gt;

&lt;p&gt;Now, let's begin:&lt;/p&gt;

&lt;h4&gt;
  
  
  Rsync command to copy a file/folder from local pc to a remote server
&lt;/h4&gt;

&lt;h6&gt;
  
  
  With key/certificate
&lt;/h6&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ rsync -iav /path/to/keyfile/key.pem /local/directory/path/ user@example.com:/remote/directory/path/

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h6&gt;
  
  
  Without key/certificate
&lt;/h6&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ rsync -iv /local/directory/path/ user@example.com:/remote/directory/path/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Rsync command to copy a file/folder from remote pc/server to a local pc/server
&lt;/h4&gt;

&lt;h6&gt;
  
  
  With key/certificate
&lt;/h6&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ rsync -avzP --rsh=ssh user@example.com:/remote/directory/path/ /local/directory/path/

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h6&gt;
  
  
  Without key/certificate
&lt;/h6&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ rsync -avzP --rsh=ssh user@example.com:/remote/directory/path/ /local/directory/path/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Rsync command to copy a file/folder from remote pc/server to another remote pc/server
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ rsync -i /path/to/keyfile/key.pem user@example.com:/path/to/file.txt user@example.org:/path/to/file

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>linux</category>
      <category>ubuntu</category>
      <category>devops</category>
      <category>sysadmin</category>
    </item>
  </channel>
</rss>
