{"id":1816,"date":"2017-02-24T07:12:01","date_gmt":"2017-02-24T07:12:01","guid":{"rendered":"http:\/\/www.fastwebhost.in\/blog\/?p=1816"},"modified":"2019-01-31T07:45:58","modified_gmt":"2019-01-31T07:45:58","slug":"install-phpmyadmin-on-centos-6","status":"publish","type":"post","link":"https:\/\/www.fastwebhost.in\/blog\/install-phpmyadmin-on-centos-6\/","title":{"rendered":"How to Install PHPMyAdmin on CentOS 6?"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p>PHPMyAdmin is an open source tool used in place of MySQL command with&nbsp;graphical and more intuitive way of performing administration tasks like creating,editing, or deleting databases, and managing users with permissions. In the below article lets see how to install PHPMyAdmin on CentOS server.<\/p>\n<h2>Prerequisites<\/h2>\n<ul>\n<li>I will be working on a Fastwebhost managed CentOS 6.6 server.<\/li>\n<li>Initially for your CentOS 6.6 server to run PHPMyAdmin it needs LAMP (Linux, Apache, MySQL, PHP) stack installed.<\/li>\n<\/ul>\n<p>Now our server is ready for PHPMyAdmin installation. So, all you need to do is follow the below steps.<\/p>\n<h3>Step 1 : Get EPEL Repository<\/h3>\n<p>First, we&#8217;ll install the EPEL repository. The EPEL repo (Extra Packages for Enterprise Linux) contains many additional packages, including the phpMyAdmin package we are looking for.<\/p>\n<p>rpm -iUvh http:\/\/dl.fedoraproject.org\/pub\/epel\/6\/x86_64\/epel-release-6-8.noarch.rpm<\/p>\n<h3>Step 2 : InstallingPHPMyAdmin on CentOS<\/h3>\n<p>Before doing anything, the best practice is to ensure all the packages in the server are up to date.<\/p>\n<p>yum -y update<\/p>\n<p>Now our installation is one command away.<\/p>\n<p>yum -y install phpmyadmin<\/p>\n<h3>Step 3 :&nbsp;Know your IP address<\/h3>\n<p>To access your PHPMyAdmin we need to know the IP address of our Machine. Refer to sources like&nbsp;<\/p>\n<blockquote><p>Whatismyip.com<\/p><\/blockquote>\n<h3>Step 4 :&nbsp;Open PHPMyAdmin configuration file<\/h3>\n<p>Check for PHPMyAdmin configuration file with any of the text editor. You can find that at&nbsp;<\/p>\n<p>nano \/etc\/httpd\/conf.d\/phpMyAdmin.conf<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.fastwebhost.in\/blog\/wp-content\/uploads\/2017\/02\/4p.png\" alt=\"\" height=\"1\" width=\"1\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.fastwebhost.in\/blog\/wp-content\/uploads\/2017\/02\/1k.png\" alt=\"\" height=\"1\" width=\"1\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.fastwebhost.in\/blog\/wp-content\/uploads\/2017\/02\/1k.png\" alt=\"\" height=\"1\" width=\"1\">This present setup is configured to deny access to any connection not being made from the server itself.<\/p>\n<p>Since we are working on our server remotely, we need to modify some lines to specify the IP address of your home connection.<\/p>\n<p>Change any lines that read Requireip 127.0.0.1 or Allow from 127.0.0.1 to refer to your home connection&#8217;s IP address.<\/p>\n<ul>\n<li>Requireip <strong>Machine IP<\/strong><\/li>\n<\/ul>\n<ul>\n<li>Allow from<strong> Machine IP<\/strong><\/li>\n<\/ul>\n<ul>\n<li>Requireip <strong>Machine IP<\/strong><\/li>\n<\/ul>\n<ul>\n<li>Allow from<strong> Machine IP<\/strong><\/li>\n<\/ul>\n<p>Now restart Apache<\/p>\n<p>service httpd restart<\/p>\n<p>With&nbsp;this our <strong>PHPMyAdmin <\/strong>is in operational mode.<\/p>\n<p>We can access our interface with the domain name or public IP address followed by \/<strong>phpMyAdmin<\/strong>, in your web browser and it should look like below image.<\/p>\n<p>http:\/\/server_domain_or_IP\/<strong>phpMyAdmin<\/strong><\/p>\n<p><span><a href=\"http:\/\/www.fastwebhost.in\/blog\/wp-content\/uploads\/2017\/02\/6p.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.fastwebhost.in\/blog\/wp-content\/uploads\/2017\/02\/6p.png\" alt=\"PHPMyAdmin Interface\" style=\"width: 258px;\" height=\"271\" width=\"258\"><\/a><\/span><\/p>\n<p>You can login to it with your any MySQL user or MySQL root logins which you gave when installing LAMP.<\/p>\n<h3>Step 5 : Securing PHPMyAdmin<\/h3>\n<p>This step is optional unless you want to really secure it.<\/p>\n<p>Go to the PHPMyAdmin configuration file again.<\/p>\n<p>vim \/etc\/httpd\/conf.d\/phpMyAdmin.conf<\/p>\n<p>Toward the top of the file, you will see two lines that look like the below line, there will be a case sensitive. As both the lines looks similar, one with \/PHPMyAdmin and other is \/phpmyadmin.<\/p>\n<p><strong>Alias \/phpmyadmin \/usr\/share\/phpMyAdmin<\/strong><\/p>\n<p>These are&nbsp;alias, means we access our site&#8217;s domain name or IP address, followed by either \/<strong>phpMyAdmin<\/strong> or \/phpmyadmin.<\/p>\n<p>We need to disable these specific aliases and put our custom examples -securelink in that place by removing or commenting out the existing lines.<\/p>\n<ul>\n<li><strong>#Alias \/phpmyadmin \/usr\/share\/phpMyAdmin<\/strong><\/li>\n<\/ul>\n<ul>\n<li><strong>Alias \/securelink \/usr\/share\/phpMyAdmin<\/strong><\/li>\n<\/ul>\n<p>Now restart Apache.<\/p>\n<p>service httpd restart<\/p>\n<p>Accessing with the previous link will give you a (404) file not found&nbsp;error.<\/p>\n<p>So, now we need to access it with the belowURl<\/p>\n<p><a href=\"https:\/\/server_domain_or_ip\/securelink\" target=\"_blank\">http:\/\/server_domain_or_IP\/securelink<\/a><\/p>\n<h3>Conclusion<\/h3>\n<p>I really hope this article helped you install PHPMyAdmin on CentOS 6 &amp; 7 and as well as securing it and I really appreciate a review on this.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction PHPMyAdmin is an open source tool used in place of MySQL command with&nbsp;graphical and more intuitive way of performing administration tasks like creating,editing, or deleting databases, and managing users with permissions. In the below article lets see how to install PHPMyAdmin on CentOS server. Prerequisites I will be working on a Fastwebhost managed CentOS [&hellip;]<\/p>\n","protected":false},"author":11,"featured_media":1840,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[74],"tags":[26],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.fastwebhost.in\/blog\/wp-json\/wp\/v2\/posts\/1816"}],"collection":[{"href":"https:\/\/www.fastwebhost.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.fastwebhost.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.fastwebhost.in\/blog\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/www.fastwebhost.in\/blog\/wp-json\/wp\/v2\/comments?post=1816"}],"version-history":[{"count":4,"href":"https:\/\/www.fastwebhost.in\/blog\/wp-json\/wp\/v2\/posts\/1816\/revisions"}],"predecessor-version":[{"id":4817,"href":"https:\/\/www.fastwebhost.in\/blog\/wp-json\/wp\/v2\/posts\/1816\/revisions\/4817"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.fastwebhost.in\/blog\/wp-json\/wp\/v2\/media\/1840"}],"wp:attachment":[{"href":"https:\/\/www.fastwebhost.in\/blog\/wp-json\/wp\/v2\/media?parent=1816"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.fastwebhost.in\/blog\/wp-json\/wp\/v2\/categories?post=1816"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.fastwebhost.in\/blog\/wp-json\/wp\/v2\/tags?post=1816"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}