Installing phpMyAdmin under CentOS nginx

Source: Internet
Author: User
Tags phpmyadmin

Install phpMyAdmin under Nginx:

Because I am in the online search installation phpMyAdmin Most of the use of Apache installation, and the online machine do not want to use Apache, finally found the Nginx under the installation is also more complex, so I write an article forget it.

Install LNMP:


In Nginx configuration:

[Email protected] vhost]# cat/etc/nginx/nginx.conf******** include vhost/*.conf;


[[email protected] vhost]# cd /etc/nginx/vhost/[[email protected] vhost]#  cat phpmyadmin.confserver{        server_name www.test.com;         index index.html index.htm index.php;         root /home/wwwroot/phpmyadmin;         location ~ .*\. (PHP|PHP5)?$ {                 fastcgi_pass  unix:/tmp/php-cgi.sock;                 fastcgi_index index.php;                 fastcgi_param SCRIPT_FILENAME  $document _ Root$fastcgi_script_name;                include fastcgi_params;                 include fastcgi.conf;         }}
[Email protected] ~]# vim/etc/hosts122.123.13.13 www.test.com


SOURCE Package Download

Download phpMyAdmin Source Package Phpmyadmin-4.0.10.20-all-languages.tar on official website http://www.phpmyadmin.net/

[[Email protected] vhost]# tar -xvf phpmyadmin-4.0.8-all-languages.tar.bz2 -c  /home/wwwroot[[email protected] vhost]# cd /home/wwwroot[[email protected]  vhost]# mv phpmyadmin-4.0.8-all-languages/ phpmyadmin[[email protected] vhost]#  cd phpmyadmin[[email protected] vhost]# cp config.sample.inc.php  config.inc.php[[email protected] vhost]# vim config.inc.php (Modify the place) $i  = 0;/*  * first server */$i ++;/* authentication type */$cfg [' Servers '] [$i] [' Auth_ Type '] =  ' cookie ';/* server parameters */$cfg [' Servers '] [$i] [' Host '] =  ' 127.0.0.1 ';     # #假如mysql使用其他地址登录的话就修改成其他地址 $cfg [' Servers '] [$i] [' Connect_type '] =  ' TCP '; $cfg [' Servers '] [$i] [' Compress '] = false;/* select mysql if your  server does not have&nbspmysqli */# $cfg [' Servers '] [$i] [' extension '] =  ' mysqli '; $cfg [' Servers '] [$i] [' Allownopassword ']  = false;


[Email protected] vhost]#/usr/local/nginx/sbin/nginx-t[[email protected] vhost]#/usr/local/nginx/sbin/nginx-s Reload

If MySQL does not have a password, I suggest that you add the password:

Mysql> GRANT All privileges on * * to ' root ' @ '% ' identified by PASSWORD ' ****** '


Visit: http://www.test.com


Installing phpMyAdmin under CentOS nginx

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.