Home > Database > phpMyAdmin > phpMyAdmin installation and configuration in Linux CentOS7 system

phpMyAdmin installation and configuration in Linux CentOS7 system

藏色散人
Release: 2020-03-02 17:41:05
forward
3514 people have browsed it

phpMyAdmin installation and configuration in Linux CentOS7 system

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.

Directory

Environment preparationInstallation package

Basic settings

Website preview

Environment preparation

linux centos7 systemssh software

php language environment

mysql database

Installation package

phpMyAdmin 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
Copy after login

Secondly, download the phpMyAdmin package.

wget https://files.phpmyadmin.net/phpMyAdmin/4.8.5/phpMyAdmin-4.8.5-all-languages.zip
Copy after login

Finally, unzip the installation package.

unzip phpMyAdmin-4.8.5-all-languages.zip
Copy after login

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
Copy after login

Secondly, modify the configuration file.

cp wp-config-sample.php wp-config.php
vi wp-config.php
Copy after login

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');
Copy after login

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;
  }
}
Copy after login

Website preview

Add a dns record to the local hosts file.

192.168.1.101  phpmyadmin.eg.org;
Copy after login

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!

Related labels:
source:segmentfault.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template