Install and configure phpmyadmin in linux/centos

Source: Internet
Author: User

It took me two nights to install and configure phpmyadmin in centos. If it was depressing, I couldn't do it. It was easy to configure phpmyadmin. I Just configured it when I was working. It went quite well. Five years later, it took me two nights and I felt like there were many traps under centos. It seemed like I could go through, but it was a dead end after I went in.

First, let's talk about how installation fails.

1. php In centos is installed with yum. I tried it. I used yum install phpmyadmin. I really didn't think that phpmyadmin can be used as a source, because phpmyadmin is a Web mysql management tool written in php, it is not normal. In this case, phpmyadmin is installed. It is installed under/usr/share/phpmyadmin by default.

2. the user of the/usr/share/phpmyadmin folder is root: apache, and my working directory is/home/zhangy/www, so I copied/usr/share/phpmyadmin to/home/zhangy/www, httpd. change the user and group of conf to zhangy when httpd is started. The default value of zhangy is apache: apache. When I access phpmyadmin, session data cannot be written, the session is stored in/var/lib/php/session/. I use chowm to change the/var/lib/php/session/permission. After the modification, another problem occurs, existing configuration file (. /config. inc. php) is not readable ., I know it is caused by permissions. Setting it to 777 does not work. Later, I restored the httpd startup user to apache:. Pache, the above problem disappears. At this time, a more strange problem occurs. The configuration file now requires a top secret phrase password (blowfish_secret ). There is a good solution to this problem on the Internet, but I have tried it and it is useless. Later, I directly removed phpmyadmin from yum. I don't need yum to install phpmyadmin.

3. After you delete phpmyadmin installed in yum, I can copy it to phpmyadmin IN THE/home/zhangy/www directory. Two nights have been wasted.

II. The correct installation method is as follows:

1. Download phpmyadmin

Download URL: http://www.phpmyadmin.net/home_page/downloads.php

If you do not have a package available or desire to install your own phpMyAdmin, you can download one of following source packages. please note that 3.x versions require at least PHP 5.2 and MySQL 5 to use them. if you are using older versions, please choose the 2.x branch, which is still supported for security fixes.

Note that phpmyadmin 3.x must be php5.2 or later, and MySQL or later. If you choose the wrong one, the problem will be difficult to solve.

2. Install phpmyadmin

To enable phpmyadmin to work, you need to have two modules, mcrypt. so, mbstring. so, if you are prompted that the two modules are incorrect, recompile php again, or find the folder corresponding to the two modules and use phpize, to install the two modules separately, and then modify the php. ini, restart apache, and then OK.

3. Configure phpmyadmin

When I modified the above error, I found some solutions on the Internet. I found that the configuration files were messy. Config. ini. php and config. default. php. I have always modified phpmyadmin/libraries/config. default. php. I personally think that if you do not have high security requirements, you can skip step 1. The configuration is as follows:

$ Cfg [Servers] [$ I] [auth_type] = 'cookies'; // The default value is config, which can be entered without a password. For cookie, users and passwords must be entered.


$ Cfg [blowfish_secret] = '000000'; // encryption of this cookie. Enter the key and content, but do not leave it blank.
 

Related Article

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.