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 mysqli */# $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