Home > English > Tutorials > How to install PHPMyAdmin on CentOS 6 (for LEMP)

How to install PHPMyAdmin on CentOS 6 (for LEMP)

 

PhpMyAdmin is an open source used to manage MySQL through a web browser. You can easily install phpMyAdmin on Ubuntu, CentOS and Windows.

If you're not used to using command lines,  phpMyAdmin is a perfect choice. However, even when you can use command lines competently, you should also use phpMyAdmin.

Here's the instruction to install PHPMyAdmin for LEMP

I.Preparation

Insatll Remi repository, get reference link here Click here

Make sure NGINX, PHP-FPM and MARIADB have been installed in your server 

Get reference link here  Click here

II.Procceeding 

Step 1:Install phpMyAdmin

Use yum command

# yum install phpMyAdmin -y

Step 2: Creat a link from a folder containing phpMyAdmin to the other folder containing web content

ln -s /usr/share/phpMyAdmin /usr/share/nginx/html/

Step 3: After 2 steps above you can visit you VPS address http://ip-vps/phpMyAdmin. If your web is a blank page, you copy phpMyAdmin into the folder containing web content

cp -r /usr/share/phpMyAdmin /usr/share/nginx/html/

The result comes out like this

Step 4: If you still see this error when testing the web, correct it as folows

Edit the file /etc/php.ini 

# nano /etc/php.ini

In the file php.ini you search for this line

;session.save_path = "/tmp"

Change it into 

session.save_path = "/var/lib/php/session/"

Change ownership of the folder /var/lib/php/session/ 

# chown -R nginx:nginx /var/lib/php/session/

Rastart php-fpm service

# service php-fpm restart

Now you can access the link http://ip-vps/phpMyAdmin and check whether that error disappears