Phpmyadmin is a free tool used to administrate MySQL . it supports all major operation with MySQL in GUI mode.
In the previous post we saw about installing and configuring nginx on centos 6.5 . Here we can see about installing phpmyadmin on nginx server.
Before starting please make sure you have installed LEMP stack ( Nginx , mysql and php )
Refer this post (Install LEMP on centos 6)
Install phpmyadmin on nginx on centos 6.5
Step 1 » Enable EPEL repository for installing dependencies . Find the latest release file from EPEL 6 repository and install using rpm command.
[root@krizna ~]# rpm -ivh http://epel.mirror.net.in/epel/6/i386/epel-release-6-8.noarch.rpm
Step 2 » Install dependencies by the below command.
[root@krizna ~]# yum install php php-cli php-gd php-mbstring php-mcrypt php-php-gettext apr-util-ldap mailcap
Step 3 » Download latest phpmyadmin from official site ( Phpmyadmin Download ) to /usr/share/ directory. choose .tar.bz2 for less size and easy extraction with default tar command.
[root@krizna ~]# cd /usr/share/
[root@krizna share]# wget http://downloads.sourceforge.net/project/phpmyadmin/phpMyAdmin/4.1.7/phpMyAdmin-4.1.7-all-languages.tar.bz2
Step 4 » Extract the files using the below command.
[root@krizna share]# tar -xvf phpMyAdmin-4.1.7-all-languages.tar.bz2
Step 5 » Rename the folder .
[root@krizna share]# mv phpMyAdmin-4.1.7-all-languages phpmyadmin
Step 6 » Create a config file inside phpmyadmin folder. just copy config.sample.inc.php into config.inc.php file .
[root@krizna phpmyadmin]# cp config.sample.inc.php config.inc.php
Step 7 » Create a virtual site to access phpmyadmin in 8080 port . Create a file /etc/nginx/conf.d/phpmyadmin.conf and add the below lines .
server { listen 8080; # listen port server_name localhost; # Server name (www.krizna.com) location / { root /usr/share/phpmyadmin; # Document root index index.php index.html index.htm; } location ~ .php$ { root /usr/share/phpmyadmin; # Document root fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } }
Step 8 » Restart nginx service.
[root@krizna ~]# service nginx restart
Open /etc/sysconfig/iptables file and add the following line to open port 8080 in iptables.
-A INPUT -m state --state NEW -p tcp --dport 8080 -j ACCEPT
Step 9 » Now open http://serverip:8080 in your browser . you could see phpmyadmin login page . use mysql root username and password to login . after logged in, you can see the page below.
All the best.
I followed your instructions but it failed, it shows me the following error when I type localhost:8080 on my browser:Cannot start session without errors, please check errors given in your
PHP and/or webserver log file and configure your PHP installation
properly. Also ensure that cookies are enabled in your browser.
Same thing here 🙁 On Stack Overflow they sayd that you have to flush your browser cache/cookies, but no luck. Also something with “session.save_path” in the /etc/php.ini file. Does anyone know how to fix this?
try this
chmod 0777 /var/lib/php/session
type in terminal:
service iptables stop
and try agen
I followed your instructions but it failed, it shows me the following error when I type localhost:8080 on my browser:Cannot start session without errors, please check errors given in your
PHP and/or webserver log file and configure your PHP installation
properly. Also ensure that cookies are enabled in your browser.
Same thing here 🙁 On Stack Overflow they sayd that you have to flush your browser cache/cookies, but no luck. Also something with “session.save_path” in the /etc/php.ini file. Does anyone know how to fix this?
try this
chmod 0777 /var/lib/php/session
type in terminal:
service iptables stop
and try agen
how can i do to redirect login to a https?
how can i do to redirect login to a https?
Hey,
Not working for me, blank (white) page ;/
Fixed by command “service php-fpm restart” 🙂
Hey,
Not working for me, blank (white) page ;/
Fixed by command “service php-fpm restart” 🙂
Pls help me
it show The connection has timed out