phpMyAdmin is a database management tool on the Web. It provides a beautiful GUI interface to help manage the MySQL database. phpMyAdmin supports multiple MySQL servers. Compared to the MySQL command line, phpMyAdmin is a powerful and simple alternative tool.
1 Make sure that you have set up Linode's hostname according to the Linode Getting Started and Server Security guidelines.
To view the host name, you can run the following command:
hostname #Show your short hostname
hostname -f #Display your fully qualified domain name (FQDN)
2 Update system:
sudo yum update
3 To configure the LAMP environment, refer to LAMP Environment on CentOS 6.
Note If you have installed the php-suhosin
package, there will be some known issues when using phpMyAdmin. For more information about these issues, please refer to Suhosin phpMyAdmin Compatibility Issue Page.
4 Enable EPEL source:
cd ~ wget http://download.fedoraproject.org/pub/epel/6/x86\_64/epel-release-6-8.noarch.rpm sudo rpm -ivh epel-release\*
5 Configure and install the SSL certificate under Apache to implement HTTPS, so that the password will not be sent in plain text. Refer to Apache+SSL Certificate on CentOS.
6 Install the mycrypt
PHP module:
sudo yum install php-mcrypt
7 Restart Apache:
sudo service httpd restart
1 Install phpMyAdmin: sudo yum install phpmyadmin
2 Actual needs may require many virtual hosts to access this phpMyAdmin, so for each virtual host here, a symbolic link (/usr/share/phpmyadmin) should be created from Apache DocumentRoot (Apache document root directory) to the installation location of phpMyAdmin
):
cd /var/www/html/example.org/public\\\_html sudo ln -s /usr/share/phpmyadmin
# Create a file named under Apache DocumentRoot (Apache document root directory)`phpmyadmin`Symbolic link
By default, phpMyAdmin only allows access from localhost (127.0.0.1). So we need to add the IP address of the remote computer to access it remotely.
Write down the external IP address used by the remote computer. It can be found by visiting the whatismyip website:
Edit the configuration file located in /etc/httpd/conf.d/phpMyAdmin.conf
and replace 127.0.0.1
with your IP address.
Because you need to enter the MySQL account and password when using phpMyAdmin, it is recommended to use SSL to protect the security of phpMyAdmin. For more information about using SSL, refer to SSL certificate.
1 Add the following statement to the Server(s) configuration
section in the phpMyAdmin configuration file /etc/phpmyadmin/config.inc.php
to force phpMyAdmin to use SSL.
$cfg'ForceSSL'='true';
2 Restart Apache:
sudo service httpd restart
To test phpMyAdmin, open https://example.com/phpmyadmin
in a browser. The system will prompt for the MySQL username and password. If you can log in normally, congratulations, the installation of phpMyAdmin has been completed!
For additional information on this topic, refer to the following resources.
Recommended Posts