The following tutorial column will introduce you to the installation and configuration method of phpMyAdmin in Linux CentOS7 system. I hope it will be helpful to friends in need! Today we introduce how to configure phpMyAdmin in Linux CentOS7 system.
DirectoryEnvironment preparationInstallation package
Basic settings
Website preview
Environment preparationlinux centos7 systemssh software
php language environment
mysql database
Installation packagephpMyAdmin official website downloadBefore installation, please use xshell to connect to the remote server.
This time I use wget to download and install.
First, go to the download folder.
This is where you store the download package.
cd /home/downloads
Secondly, download the phpMyAdmin package.
wget https://files.phpmyadmin.net/phpMyAdmin/4.8.5/phpMyAdmin-4.8.5-all-languages.zip
Finally, unzip the installation package.
unzip phpMyAdmin-4.8.5-all-languages.zip
Basic settings
First, move the decompressed installation package to the specified folder.
mv phpMyAdmin-4.8.5-all-languages /usr/share/nginx/html/myadm cd /usr/share/nginx/html/myadm
Secondly, modify the configuration file.
cp wp-config-sample.php wp-config.php vi wp-config.php
The following is the content of wp-config.php.
// ** MySQL 设置 - 具体信息来自您正在使用的主机 ** // /** WordPress数据库的名称 */ define('DB_NAME', 'test'); /** MySQL数据库用户名 */ define('DB_USER', 'phpuser'); /** MySQL数据库密码 */ define('DB_PASSWORD', 'phpuser123.'); /** MySQL主机 */ define('DB_HOST', 'localhost');
Finally, configure the nginx site.
vi /etc/nginx/vhost/pam.conf server { listen 80; server_name phpmyadmin.eg.org; access_log /var/log/nginx/phpmyadmin-access.log main; error_log /var/log/nginx/phpmyadmin-error.log; location / { root /usr/share/nginx/html/myadm; index index.php; } location ~ \.php$ { root /usr/share/nginx/html/myadm; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /usr/share/nginx/html/myadm/$fastcgi_script_name; include fastcgi_params; } location ~ /\.ht { deny all; } }
Website preview
Add a dns record to the local hosts file.
192.168.1.101 phpmyadmin.eg.org;
Next, enter phpmyadmin.eg.org in the browser to access it.
The above is the detailed content of phpMyAdmin installation and configuration in Linux CentOS7 system. For more information, please follow other related articles on the PHP Chinese website!