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. I,

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.