{"id":4723,"date":"2019-12-01T21:20:03","date_gmt":"2019-12-01T18:20:03","guid":{"rendered":"https:\/\/kifarunix.com\/?p=4723"},"modified":"2024-03-12T23:40:27","modified_gmt":"2024-03-12T20:40:27","slug":"install-latest-phpmyadmin-on-centos-8","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/install-latest-phpmyadmin-on-centos-8\/","title":{"rendered":"Install latest phpMyAdmin on CentOS 8"},"content":{"rendered":"\n<p>Follow through this guide to learn how to install latest phpMyAdmin on CentOS 8. In our previous guide, we learnt how to <a aria-label=\"install WordPress 5 with MySQL 8 on CentOS 8 (opens in a new tab)\" href=\"https:\/\/kifarunix.com\/install-wordpress-with-nginx-and-mysql-8-on-centos-8\/\" target=\"_blank\" rel=\"noreferrer noopener\">install WordPress 5 with MySQL 8 on CentOS 8<\/a>. How about you manage your MySQL database directly from web? phpMyAdmin is what you need.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Installing latest phpMyAdmin on CentOS 8<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Prerequisites<\/h3>\n\n\n\n<p class=\"has-drop-cap has-small-font-size\"><strong>Note<\/strong>: In this guide, we are going to install <strong>phpMyAdmin v4.9.2,<\/strong> which the current stable release version as of this writing. This version supports <strong>PHP 5.5 to 7.3 and MySQL 5.5 and newer<\/strong>. Note this while installing your LAMP\/LEMP stack. You can check more requirements including the required PHP modules <a rel=\"noreferrer noopener\" href=\"https:\/\/docs.phpmyadmin.net\/en\/release_4_9_1\/require.html\" target=\"_blank\">on PHP requirements page<\/a>.<\/p>\n\n\n\n<p>Update your system packages.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>dnf update<\/code><\/pre>\n\n\n\n<p>Install LEMP\/LAMP Stack on CentOS 8 by following the links provided below;<\/p>\n\n\n\n<p><a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/kifarunix.com\/install-lamp-stack-on-centos-8\/\" target=\"_blank\">Install LAMP Stack on CentOS 8<\/a><\/p>\n\n\n\n<p><a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/kifarunix.com\/install-lemp-stack-on-centos-8\/\" target=\"_blank\">Install LEMP Stack on CentOS 8<\/a><\/p>\n\n\n\n<p>In this guide,<strong> PHP 7.2, MySQL 8<\/strong> and <strong>Nginx<\/strong> are used.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Install Required PHP Modules<\/h3>\n\n\n\n<p>If not already installed, run the command below to install other required PHP extensions for phpMyAdmin.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>dnf install php-{spl,hash,ctype,json,mbstring,zip,gd,curl,xml,common}<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Install phpMyAdmin on CentOS 8<\/h3>\n\n\n\n<p>Once you have setup your LAMP\/LEMP stack, databases, your WordPress or whatever your web application is, proceed to install phpMyAdmin.<\/p>\n\n\n\n<p>As of this writing, phpMyAdmin is not available on the default CentOS 8 repos.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>dnf whatprovides phpmyadmin<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>Error: No Matches found<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Download phpMyAdmin<\/h4>\n\n\n\n<p>Therefore, we are going to install phpMyAdmin by downloading the source tarball from <a rel=\"noreferrer noopener\" aria-label=\"phpMyAdmin downloads page (opens in a new tab)\" href=\"https:\/\/www.phpmyadmin.net\/downloads\/\" target=\"_blank\">phpMyAdmin downloads page<\/a>.<\/p>\n\n\n\n<p>You can download phpMyAdmin kits for English or All languages. This guide is using phpMyAdmin English version only. Make the download easy by using wget command.<\/p>\n\n\n\n<p>To download the latest stable release version, check the versions on the downloads page and simply create a variable to hold the latest version number.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>VER=4.9.2<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>wget https:\/\/files.phpmyadmin.net\/phpMyAdmin\/<strong>$VER<\/strong>\/phpMyAdmin-<strong>$VER<\/strong>-english.tar.gz<\/code><\/pre>\n\n\n\n<p>Well, you can as well download phpMyAdmin that supports all the languages to enable you run a version of phpMyAdmin with language of your preference;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>https:\/\/files.phpmyadmin.net\/phpMyAdmin\/<strong>$VER<\/strong>\/phpMyAdmin-<strong>$VER<\/strong>-all-languages.tar.gz<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Verify phpMyAdmin Tarball<\/h4>\n\n\n\n<p>To ensure that you are installing a genuine version of phpMyAdmin, you  need to verify the integrity of the downloaded archive.<\/p>\n\n\n\n<p>Download and import phpMyAdmin PGP fingerprint key from the key servers.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>gpg --keyserver hkp:\/\/pgp.mit.edu --recv-keys 3D06A59ECE730EB71B511C17CE752F178259BD92<\/code><\/pre>\n\n\n\n<p>Download the PGP signature for your specific version of phpMyAdmin from <a rel=\"noreferrer noopener\" href=\"https:\/\/www.phpmyadmin.net\/downloads\/\" target=\"_blank\">phpMyAdmin downloads page<\/a>. For example, to download the PGP signature for phpMyAdmin v4.9.2 (English version);<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>wget https:\/\/files.phpmyadmin.net\/phpMyAdmin\/$VER\/phpMyAdmin-$VER-english.tar.gz.asc<\/code><\/pre>\n\n\n\n<p>Run the signature verification.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>gpg --verify phpMyAdmin-$VER-english.tar.gz.asc<\/code><\/pre>\n\n\n\n<p>Keyword in the output; <strong>Good signature<\/strong>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>gpg: assuming signed data in 'phpMyAdmin-4.9.2-english.tar.gz'\ngpg: Signature made Fri 22 Nov 2019 03:05:59 AM EST\ngpg:                using RSA key 3D06A59ECE730EB71B511C17CE752F178259BD92\ngpg: Good signature from \"Isaac Bennetch &lt;bennetch@gmail.com&gt;\" &#91;unknown]\ngpg:                 aka \"Isaac Bennetch &lt;isaac@bennetch.org&gt;\" &#91;unknown]\ngpg: WARNING: This key is not certified with a trusted signature!\ngpg:          There is no indication that the signature belongs to the owner.\nPrimary key fingerprint: 3D06 A59E CE73 0EB7 1B51  1C17 CE75 2F17 8259 BD92<\/code><\/pre>\n\n\n\n<p>You can as well verify the checksum of the downloaded archive. Download the SHA256 hash for <strong><code>phpMyAdmin-4.9.2-english.tar.gz<\/code><\/strong>.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>wget https:\/\/files.phpmyadmin.net\/phpMyAdmin\/<strong>$VER<\/strong>\/phpMyAdmin-$VER-english.tar.gz.sha256<\/code><\/pre>\n\n\n\n<p>Calculate the SHA256 hash for downloaded file.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>sha256sum phpMyAdmin-$VER-english.tar.gz<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>b1a4edca4e5229fe84a221f4aaa4e98a83bace5776ab3a3127395d8a989dfd3c  phpMyAdmin-4.9.2-english.tar.gz<\/code><\/pre>\n\n\n\n<p>Compare the calculated hash with the downloaded hash.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>cat phpMyAdmin-$VER-english.tar.gz.sha256<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>b1a4edca4e5229fe84a221f4aaa4e98a83bace5776ab3a3127395d8a989dfd3c  phpMyAdmin-4.9.2-english.tar.gz<\/code><\/pre>\n\n\n\n<p>If all is well, you are good to proceed.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Install phpMyAdmin<\/h3>\n\n\n\n<p>Since phpMyAdmin comes as a standalone application ready for installation, simply extract it to your Web root directory. In this guide, we are using Nginx as the web server.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Extract phpMyAdmin Tarball<\/h4>\n\n\n\n<p>Create your phpMyAdmin web root directory. You can choose to use a different directory instead of the one created below;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>mkdir \/usr\/share\/nginx\/phpmyadmin<\/code><\/pre>\n\n\n\n<p>Next, extract the phpMyAdmin to the directory created above.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>tar xzf phpMyAdmin-$VER-english.tar.gz -C \/usr\/share\/nginx\/phpmyadmin --strip-components=1<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Create phpMyAdmin Nginx Server Block<\/h4>\n\n\n\n<p>You can now create a basic Nginx Server block for phpMyAdmin as shown below. Be sure to replace the directories accordingly.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>vi \/etc\/nginx\/conf.d\/phpmyadmin.conf<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>server {\n    listen       80;\n    server_name  pma.kifarunix-demo.com;\n    root         \/usr\/share\/nginx\/phpmyadmin;\n    \n    access_log \/var\/log\/nginx\/pma.kifarunix-demo.com_access.log;\n    error_log \/var\/log\/nginx\/pma.kifarunix-demo.com_error.log;\n\n    index   index.php;\n\n    location \/ {\n        try_files    $uri $uri\/ \/index.php?$args;\n    }\n    location ~ \\.php$ {\n         try_files $uri =404;\n         fastcgi_intercept_errors on;\n         include        fastcgi_params;\n         fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;\n         fastcgi_pass unix:\/run\/php-fpm\/www.sock;\n     }\n}<\/code><\/pre>\n\n\n\n<p>Save the configuration file and run Nginx syntax verification.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>nginx -t<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>nginx: the configuration file \/etc\/nginx\/nginx.conf syntax is ok\nnginx: configuration file \/etc\/nginx\/nginx.conf test is successful<\/code><\/pre>\n\n\n\n<p>Restart Nginx<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>systemctl restart nginx<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Configure phpMyAdmin<\/h3>\n\n\n\n<p>Rename the sample phpMyAdmin configuration file;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>cp \/usr\/share\/nginx\/phpmyadmin\/config{.sample,}.inc.php<\/code><\/pre>\n\n\n\n<p>Create a blowfish secret required for cookie based authentication to encrypt password in cookie. You can generate the <a rel=\"noreferrer noopener\" aria-label=\"blowfish secret online (opens in a new tab)\" href=\"https:\/\/phpsolved.com\/phpmyadmin-blowfish-secret-generator\/?g=[insert_php]echo%20$code;[\/insert_php]\" target=\"_blank\">blowfish secret online<\/a> and paste as follows;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>vi \/usr\/share\/nginx\/phpmyadmin\/config.inc.php<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>\/** $cfg['blowfish_secret'] = ''; \/* YOU MUST FILL IN THIS FOR COOKIE AUTH! *\/\n<strong>$cfg['blowfish_secret'] = '{yqiCcF\/-1G8WE9LE,dD{3mQDBnv[]bN';<\/strong><\/code><\/pre>\n\n\n\n<p>Restart Nginx and PHP-FPM for the changes to take effect.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>systemctl restart nginx php-fpm<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Accessing phpMyAdmin<\/h3>\n\n\n\n<p>You can now access your phpMyAdmin from the browser by navigating to browser and using the the address, <code><strong>http:\/\/server-host-name<\/strong><\/code>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"801\" height=\"399\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/12\/phpmyadmin-login.png\" alt=\"\" class=\"wp-image-4725\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/12\/phpmyadmin-login.png?v=1575224275 801w, https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/12\/phpmyadmin-login-768x383.png?v=1575224275 768w\" sizes=\"(max-width: 801px) 100vw, 801px\" \/><\/figure>\n\n\n\n<p>Login as database root user. Upon successful authentication, you will land on the phpMyAdmin dashboard.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1348\" height=\"654\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/12\/phpmyadmin-dashboard.png\" alt=\"\" class=\"wp-image-4726\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/12\/phpmyadmin-dashboard.png?v=1575224295 1348w, https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/12\/phpmyadmin-dashboard-768x373.png?v=1575224295 768w\" sizes=\"(max-width: 1348px) 100vw, 1348px\" \/><\/figure>\n\n\n\n<p>There you go. You have successfully setup phpMyAdmin. That marks the end of our guide.<\/p>\n\n\n\n<p>Read more on <a href=\"https:\/\/docs.phpmyadmin.net\/en\/latest\/user.html\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"phpMyAdmin user guide (opens in a new tab)\">phpMyAdmin user guide<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Related Tutorials<\/h3>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-phpmyadmin-with-nginx-on-debian-10-buster\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">Install phpMyAdmin with Nginx on Debian 10 Buster<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-phpmyadmin-on-debian-10-buster\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">Install phpMyAdmin on Debian 10 Buster<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-phpmyadmin-with-nginx-on-fedora-30\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">Install phpMyAdmin with Nginx on Fedora 30<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-phpmyadmin-with-apache-on-fedora-30\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">Install phpMyAdmin with Apache on Fedora 30<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-phpmyadmin-with-nginx-on-freebsd-12\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">Install phpMyAdmin with Nginx on FreeBSD 12<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/how-to-install-phpmyadmin-on-freebsd-12\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">How to Install phpMyAdmin on FreeBSD 12<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-php-7-4-on-freebsd-12\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">Install PHP 7.4 on FreeBSD 12<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Follow through this guide to learn how to install latest phpMyAdmin on CentOS 8. In our previous guide, we learnt how to install WordPress 5<\/p>\n","protected":false},"author":1,"featured_media":9188,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[299,121,342,938],"tags":[1142,3706,281],"class_list":["post-4723","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-database","category-howtos","category-php","category-phpmyadmin","tag-centos-8","tag-install-phpmyadmin-centos-8","tag-phpmyadmin","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50","resize-featured-image"],"_links":{"self":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/4723"}],"collection":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=4723"}],"version-history":[{"count":6,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/4723\/revisions"}],"predecessor-version":[{"id":21292,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/4723\/revisions\/21292"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media\/9188"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=4723"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=4723"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=4723"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}