1.Cài đặt phpmyadmin
- Các bạn xem lại bài cài đặt phpmyadmin lab4.2 http://svuit.com/showthread.php?387-Lab-4-2-Cài-đặt-phpmyadmin-trên-Centos-6-5-Minimal
cấu hình phpmyadmin, vào thư mục chứa phpMyAdmin copy file cấu hình
- Chỉnh sửa dòng màu đỏ trong file cấu hình của phpmyadmin
[root@svuit html]# vi /usr/share/phpMyAdmin/config.inc.php
28 /* Authentication type */
29 $cfg['Servers'][$i]['auth_type'] = 'http';
30 /* Server parameters */
31 $cfg['Servers'][$i]['host'] = 'any';
32 $cfg['Servers'][$i]['connect_type'] = 'tcp';
33 $cfg['Servers'][$i]['compress'] = true;
34 /* Select mysql if your server does not have mysqli */
35 $cfg['Servers'][$i]['extension'] = 'mysqli';
36 $cfg['Servers'][$i]['AllowNoPassword'] = true;
- Tạo user để đăng nhập
2. Tạo 1 Alias cho phpmyadmin
- Thêm đoạn code sau vào file cấu hình default.conf của nginx
- Khởi động lại dịch vụ nginx
- Bây giờ bạn thử login vào trang phpmyadmin thành công với đường dẫn
- Các bạn xem lại bài cài đặt phpmyadmin lab4.2 http://svuit.com/showthread.php?387-Lab-4-2-Cài-đặt-phpmyadmin-trên-Centos-6-5-Minimal
[root@svuit html]# wget ftp://rpmfind.net/linux/epel/6/x86_6...6-8.noarch.rpm [root@svuit html]# rpm -ivh epel-release-6-8.noarch.rpm [root@svuit html]# rpm -Uvh http://rpms.famillecollet.com/enterp...-release-6.rpm [root@svuit html]# yum --enablerepo=remi install phpMyAdmin |
[root@svuit html]#cd /usr/share/phpMyAdmin/ [root@svuit phpMyAdmin]#cp config.sample.inc.php config.inc.php |
- Chỉnh sửa dòng màu đỏ trong file cấu hình của phpmyadmin
[root@svuit html]# vi /usr/share/phpMyAdmin/config.inc.php
28 /* Authentication type */
29 $cfg['Servers'][$i]['auth_type'] = 'http';
30 /* Server parameters */
31 $cfg['Servers'][$i]['host'] = 'any';
32 $cfg['Servers'][$i]['connect_type'] = 'tcp';
33 $cfg['Servers'][$i]['compress'] = true;
34 /* Select mysql if your server does not have mysqli */
35 $cfg['Servers'][$i]['extension'] = 'mysqli';
36 $cfg['Servers'][$i]['AllowNoPassword'] = true;
- Tạo user để đăng nhập
[root@svuit conf.d]# mysqladmin -u root password 123 |
- Thêm đoạn code sau vào file cấu hình default.conf của nginx
[root@svuit conf.d]# vi /etc/nginx/conf.d/default.conf
########################################### php Myadmin #############
location /phpmyadmin{
alias /usr/share/phpMyAdmin/;
try_files $uri $uri/ /index.php;
}
location ~ ^/phpmyadmin(.+\.php)$ {
alias /usr/share/phpMyAdmin$1;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /usr/share/phpMyAdmin$1;
include fastcgi_params;
}
#############################################################################
[root@svuit conf.d]# service nginx restart |