{"id":1864,"date":"2019-01-02T15:57:01","date_gmt":"2019-01-02T12:57:01","guid":{"rendered":"http:\/\/kifarunix.com\/?p=1864"},"modified":"2024-03-11T22:09:23","modified_gmt":"2024-03-11T19:09:23","slug":"install-phpmyadmin-with-nginx-on-freebsd-12","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/install-phpmyadmin-with-nginx-on-freebsd-12\/","title":{"rendered":"Install phpMyAdmin with Nginx on FreeBSD 12"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"834\" height=\"468\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/06\/phpmyadmin-femb.png\" alt=\"Install phpMyAdmin with Nginx on FreeBSD 12\" class=\"wp-image-17044\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/06\/phpmyadmin-femb.png?v=1685899208 834w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/06\/phpmyadmin-femb-768x431.png?v=1685899208 768w\" sizes=\"(max-width: 834px) 100vw, 834px\" \/><\/figure>\n\n\n\n<p>Follow through this tutorial to learn how to how to Install phpMyAdmin with Nginx on FreeBSD 12.<\/p>\n\n\n\n<div class=\"wp-block-rank-math-toc-block\" id=\"rank-math-toc\"><h2>Table of Contents<\/h2><nav><ul><li><a href=\"#installing-php-my-admin-with-nginx-on-free-bsd-12\">Installing phpMyAdmin with Nginx on FreeBSD 12<\/a><ul><li><a href=\"#prerequisites\">Prerequisites<\/a><\/li><li><a href=\"#install-php-my-admin-on-free-bsd-12\">Install phpMyAdmin on FreeBSD 12<\/a><\/li><li><a href=\"#configure-php-my-admin\">Configure phpMyAdmin<\/a><\/li><li><a href=\"#configure-nginx-to-serve-php-my-admin\">Configure Nginx to Serve phpMyAdmin<\/a><\/li><li><a href=\"#access-php-my-admin-web-interface\">Access phpMyAdmin Web Interface<\/a><\/li><li><a href=\"#running-database-queries-on-php-my-admin\">Running Database Queries on phpMyAdmin<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"installing-php-my-admin-with-nginx-on-free-bsd-12\">Installing phpMyAdmin with Nginx on FreeBSD 12<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"prerequisites\">Prerequisites<\/h3>\n\n\n\n<p>Ensure that FEMB stack is up and running on your FreeBSD 12 server. You can kindly follow our previous link on how <a href=\"https:\/\/kifarunix.com\/install-nginx-mysql-php-femp-stack-on-freebsd-12\/\">Install Nginx, MySQL, PHP (FEMP) Stack on FreeBSD 12<\/a>.<\/p>\n\n\n\n<p>Install the following required PHP extensions if not already installed in the above guide.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">pkg install php82-mysqli&nbsp;php82-json php82-mbstring&nbsp;php82-session php82-hash<\/pre>\n\n\n\n<p>Once the above prerequisites are met, please proceed as follows;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"install-php-my-admin-on-free-bsd-12\">Install phpMyAdmin on FreeBSD 12<\/h3>\n\n\n\n<p>phpMyAdmin is usually available on most systems&#8217; default repositories and hence can be easily installed using the respective system package manager. However, the package may not be up-to-date in terms of latest features support. In such a case, you can download latest version of phpMyAdmin from the <a href=\"https:\/\/www.phpmyadmin.net\/downloads\/\" target=\"_blank\" rel=\"noopener noreferrer\">downloads page<\/a> and move it to your Nginx web root directory for installation.<\/p>\n\n\n\n<p>Verify that the latest version of phpMyAdmin, version 5.2.1, with support for PHP 8.2 is available;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">pkg search phpmyadmin<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">phpMyAdmin-php80-4.9.11        Set of PHP-scripts to manage MySQL over the web\nphpMyAdmin-php81-4.9.11        Set of PHP-scripts to manage MySQL over the web\nphpMyAdmin-php82-4.9.11        Set of PHP-scripts to manage MySQL over the web\nphpMyAdmin5-php80-5.2.1        Set of PHP-scripts to manage MySQL over the web\nphpMyAdmin5-php81-5.2.1        Set of PHP-scripts to manage MySQL over the web\n<strong>phpMyAdmin5-php82-5.2.1        Set of PHP-scripts to manage MySQL over the web<\/strong><\/pre>\n\n\n\n<p>Well, since it seems we are good to do phpMyAdmin installation from the repos, run the command below;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">pkg install <strong>phpMyAdmin5-php82-5.2.1<\/strong><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"configure-php-my-admin\">Configure phpMyAdmin<\/h3>\n\n\n\n<p>phpMyAdmin is installed into the following directory<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/usr\/local\/www\/phpMyAdmin<\/pre>\n\n\n\n<p>Copy the sample phpMyAdmin configuration file as shown;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">cp \/usr\/local\/www\/phpMyAdmin\/config{.sample,}.inc.php<\/pre>\n\n\n\n<p>Create a blowfish secret required for cookie based authentication to encrypt password in cookie. You can generate the secret online and paste as follows;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">vi \/usr\/local\/www\/phpMyAdmin\/config.inc.php<\/pre>\n\n\n\n<p>Generate 32 bytes string;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>openssl rand -hex 16<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>e90cc4f83d22650e9c0688919cce8353<\/code><\/pre>\n\n\n\n<p>You will paste that string as a value of blowfish secret.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">...\n\/**\n * This is needed for cookie based authentication to encrypt the cookie.\n * Needs to be a 32-bytes long string of random bytes. See FAQ 2.10.\n *\/\n$cfg['blowfish_secret'] = '<strong>e90cc4f83d22650e9c0688919cce8353<\/strong>'; \/* YOU MUST FILL IN THIS FOR COOKIE AUTH! *\/\n\n\/**\n...<\/pre>\n\n\n\n<p>Save and exit the file.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"configure-nginx-to-serve-php-my-admin\">Configure Nginx to Serve phpMyAdmin<\/h3>\n\n\n\n<p>Edit Nginx configuration configuration;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vi \/usr\/local\/etc\/nginx\/nginx.conf<\/code><\/pre>\n\n\n\n<p>And add the following content under <code>server<\/code> block;<\/p>\n\n\n\n<pre class=\"scroll-box\">\n<code>\n        location \/phpmyadmin\/ {\n                alias \/usr\/local\/www\/phpMyAdmin\/;\n                location ~ \\.php$ {\n                        try_files $uri =404;\n                        fastcgi_split_path_info ^(.+\\.php)(\/.+)$;\n                        fastcgi_pass   unix:\/var\/run\/php-fpm\/php-fpm.sock;\n                        fastcgi_index  index.php;\n                        fastcgi_param  SCRIPT_FILENAME $request_filename;\n                        include        fastcgi_params;\n                }\n        }\n<\/code>\n<\/pre>\n\n\n\n<p>Save and exit the file.<\/p>\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-code\"><code>nginx -t<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>nginx: the configuration file \/usr\/local\/etc\/nginx\/nginx.conf syntax is ok\nnginx: configuration file \/usr\/local\/etc\/nginx\/nginx.conf test is successful<\/code><\/pre>\n\n\n\n<p>If there is no error<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">service nginx restart<\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>service php-fpm restart<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"access-php-my-admin-web-interface\">Access phpMyAdmin Web Interface<\/h3>\n\n\n\n<p>To access phpMyAdmin dashboard, navigate to the browser and enter the URL in the format,&nbsp;<code>http:\/\/server-IP\/phpmyadmin<\/code>. This will take you to phpMyAdmin login page.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"958\" height=\"471\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/06\/phpmyadmin-web-login-page.png\" alt=\"Install phpMyAdmin on FreeBSD\" class=\"wp-image-16982\" title=\"How to Install phpMyAdmin on FreeBSD 12 2\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/06\/phpmyadmin-web-login-page.png?v=1685870025 958w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/06\/phpmyadmin-web-login-page-768x378.png?v=1685870025 768w\" sizes=\"(max-width: 958px) 100vw, 958px\" \/><\/figure>\n\n\n\n<p>Login with MySQL database root credentials.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1892\" height=\"943\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/06\/phpmyadmin-dashboard.png\" alt=\"Install phpMyAdmin on FreeBSD\" class=\"wp-image-16983\" title=\"How to Install phpMyAdmin on FreeBSD 12 3\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/06\/phpmyadmin-dashboard.png?v=1685870813 1892w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/06\/phpmyadmin-dashboard-768x383.png?v=1685870813 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/06\/phpmyadmin-dashboard-1536x766.png?v=1685870813 1536w\" sizes=\"(max-width: 1892px) 100vw, 1892px\" \/><\/figure>\n\n\n\n<p>There you go. You have successfully gone through a guide on how to install phpMyAdmin on FreeBSD 12. Enjoy!<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"running-database-queries-on-php-my-admin\">Running Database Queries on phpMyAdmin<\/h3>\n\n\n\n<p>You can see a list of databases on the left side of the phpMyAdmin Dashboard;<\/p>\n\n\n\n<p>Select a database and you will see a list of all the tables it has. Take for example default mysql database.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1677\" height=\"921\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/06\/phpmyadmin-database-tables.png\" alt=\"Install phpMyAdmin on FreeBSD\" class=\"wp-image-16984\" title=\"How to Install phpMyAdmin on FreeBSD 12 4\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/06\/phpmyadmin-database-tables.png?v=1685871113 1677w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/06\/phpmyadmin-database-tables-768x422.png?v=1685871113 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/06\/phpmyadmin-database-tables-1536x844.png?v=1685871113 1536w\" sizes=\"(max-width: 1677px) 100vw, 1677px\" \/><\/figure>\n\n\n\n<p>To run Queries against database tables, click SQL tab at the top and enter your queries on the SQL query interface.<\/p>\n\n\n\n<p>For example;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT User, Host, Plugin FROM user WHERE User = 'root';<\/code><\/pre>\n\n\n\n<p>Once you have the query, click on the \u201cGo\u201d button to execute the query.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1905\" height=\"685\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/06\/run-mysql-queries-on-phpmyadmin.png\" alt=\"Install phpMyAdmin on FreeBSD 12\" class=\"wp-image-16985\" title=\"How to Install phpMyAdmin on FreeBSD 12 5\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/06\/run-mysql-queries-on-phpmyadmin.png?v=1685871348 1905w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/06\/run-mysql-queries-on-phpmyadmin-768x276.png?v=1685871348 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/06\/run-mysql-queries-on-phpmyadmin-1536x552.png?v=1685871348 1536w\" sizes=\"(max-width: 1905px) 100vw, 1905px\" \/><\/figure>\n\n\n\n<p>After execution, the results of your query will be displayed below the SQL query box.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1531\" height=\"675\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/06\/query-results-phpmyadmin.png\" alt=\"query results phpmyadmin\" class=\"wp-image-16986\" title=\"How to Install phpMyAdmin on FreeBSD 12 6\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/06\/query-results-phpmyadmin.png?v=1685871570 1531w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/06\/query-results-phpmyadmin-768x339.png?v=1685871570 768w\" sizes=\"(max-width: 1531px) 100vw, 1531px\" \/><\/figure>\n\n\n\n<p>You can continue executing more queries by writing them in the SQL query box and clicking \u201cGo\u201d each time.<\/p>\n\n\n\n<p>You can also check our previous articles on LAMP\/LEMP Stack using the following links;<\/p>\n\n\n\n<p><a title=\"How To Install LAMP (Linux, Apache, MySQL, PHP) Stack on Fedora 28\/29\" href=\"https:\/\/kifarunix.com\/how-to-install-lamp-linux-apache-mysql-php-stack-on-fedora-28-29\/\" rel=\"bookmark\">How To Install LAMP (Linux, Apache, MySQL, PHP) Stack on Fedora 28\/29<\/a><\/p>\n\n\n\n<p><a title=\"How to Install LAMP Stack (Apache,MariaDB, PHP 7.2) on Ubuntu 18.04 LTS\" href=\"https:\/\/kifarunix.com\/how-to-install-lamp-stack-apachemariadb-php-7-2-on-ubuntu-18-04-lts\/\" rel=\"bookmark\">How to Install LAMP Stack (Apache,MariaDB, PHP 7.2) on Ubuntu 18.04 LTS<\/a><\/p>\n\n\n\n<p><a title=\"How to Install LEMP (Nginx,MariaDB,PHP7.2) Stack on Fedora 28 \/ Fedora 29\" href=\"https:\/\/kifarunix.com\/how-to-install-lemp-nginxmariadbphp7-2-stack-on-fedora-28-fedora-29\/\" rel=\"bookmark\">How to Install LEMP (Nginx,MariaDB,PHP7.2) Stack on Fedora 28 \/ Fedora 29<\/a><\/p>\n\n\n\n<p><a title=\"How To Setup LEMP Stack (Nginx, MariaDB, PHP 7.2) on Ubuntu 18.04\" href=\"https:\/\/kifarunix.com\/how-to-setup-lemp-stack-nginx-mariadb-php-7-2-on-ubuntu-18-04\/\" rel=\"bookmark\">How To Setup LEMP Stack (Nginx, MariaDB, PHP 7.2) on Ubuntu 18.04<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Follow through this tutorial to learn how to how to Install phpMyAdmin with Nginx on FreeBSD 12. Installing phpMyAdmin with Nginx on FreeBSD 12 Prerequisites<\/p>\n","protected":false},"author":1,"featured_media":17044,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[121,299,280,304,342,938,253],"tags":[6840,6842,6841],"class_list":["post-1864","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howtos","category-database","category-freebsd","category-nginx","category-php","category-phpmyadmin","category-web-servers","tag-install-phpmyadmin-freebsd","tag-install-phpmyadmin-with-nginx-on-freebsd-12","tag-nginx-and-phpmyadmin-freebsd","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\/1864"}],"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=1864"}],"version-history":[{"count":10,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/1864\/revisions"}],"predecessor-version":[{"id":21103,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/1864\/revisions\/21103"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media\/17044"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=1864"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=1864"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=1864"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}