部署 SQLAdmin(以 phpMyAdmin 为例)
- 安装与配置:
- 安装 EPEL 与 Web/PHP 组件(yum install -y epel-release httpd php php-mysqlnd …)。
- 部署 phpMyAdmin,编辑配置文件(如 config.inc.php)设置 $cfg[‘blowfish_secret’] 与连接白名单。
- 示例 Nginx 片段(/etc/nginx/conf.d/sqladmin.conf):
- server { listen 80; server_name sqladmin.example.com; location / { root /usr/share/phpMyAdmin; index index.php; } location ~ .php$ { include fastcgi_params; fastcgi_pass unix:/var/run/php-fpm/www.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; } }
- 启动服务:systemctl enable --now httpd php-fpm。