Centos6.4 install phpMyAdmin

Source: Internet
Author: User

First download the phpMyAdmin installation package from the official website.

I seem to be unable to enter the official website, here: http://sourceforge.net/projects/phpmyadmin/

1. Decompress phpMyAdmin to the root directory.

[root@localhost ~]# tarz zxvf phpMyAdmin-3.5.4-all-languages.tar.gz /var/www/html/phpmyadmin


2. Configuration

[root@localhost ~]# cd /var/www/html/phpmyadmin/[root@localhost phpmyadmin]# cp libraries/config.default.php .[root@localhost phpmyadmin]# mv config.default.php config.inc.php[root@localhost phpmyadmin]# vim config.inc.php


Modify the following content:

$cfg['PmaAbsoluteUri'] = 'http://192.168.159.4/phpmyadmin/';$cfg['Servers'][$i]['host'] = '127.0.0.1';$cfg['Servers'][$i]['auth_type'] = 'cookie';


The following two steps solve the problem of phpMyAdmin login failure
3. Modify PHP. ini

[root@localhost ~]# vim /etc/php.inisession.save_path = "/var/lib/php/session"


4. modify the permissions and owner of the session directory:

[root@localhost ~]# chown -R nobody:nobody /var/lib/php/session[root@localhost ~]# chmod 777 /var/lib/php/session


5. Restart the apache service.

Enter http: // 127.0.0.1/PHPmyAdmin/in the browser/

In this case, phpMyAdmin appears on my computer.
403 error: phpMyAdmin 403 you don't have permission to access/PHPmyAdmin/on this server. The solution is as follows:

The information on the internet is said to be a problem with SELinux, So I disabled it but it still didn't work. There is also a saying that the permissions assigned by SELinux to httpd are related to permissions.

Perform the following operations:

1. Modify permissions

2. modify the permissions of phpMyAdmin to obtain the permissions that SELinux assigns to httpd. However, the preceding operations are useless.

3. Add the following content to the HTTP. conf file (my file is in/etc/httpd/CONF:
<Directory “/usr/share/phpmyadmin/”>AllowOverride None  Order allow,deny  Allow from all  </Directory>


Then:

sudo service httpd restart

Then the problem is solved.

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.