其实方法非常简单,直接写代码: <div style="background-image: url(http://your-image.jpg);"> <img src="http://your-image.jpg" style="visibility: hidden;" />…
October 4, 2018
手动升级phpMyAdmin, How to Manually Upgrade phpMyAdmin
首先要去下载最新版本: phpMyAdmin download page
1. Backup phpMyAdmin 备份当前phpmyadmin
# 备份 sudo mv /usr/share/phpmyadmin/ /usr/share/phpmyadmin.bak # 创建新的文件夹 sudo mkdir /usr/share/phpmyadmin/ # 进入这个文件夹 cd /usr/share/phpmyadmin/
2. Download and Extract phpMyAdmin 下载并解压
下载需要的版本: phpMyAdmin download page
# 我们用4.8.3版本测试 sudo wget https://files.phpmyadmin.net/phpMyAdmin/4.8.3/phpMyAdmin-4.8.3-all-languages.tar.gz # 解压 sudo tar xzf phpMyAdmin-4.8.3-all-languages.tar.gz # 列出当前文件夹 ls # 如果可以找到加压后的文件夹,那么把它移动到上面以创建的文件夹中: sudo mv phpMyAdmin-4.8.3-all-languages/* /usr/share/phpmyadmin
打开phpmyadmin,会发现有两个报错点:
3. Edit vendor_config.php 编辑 vendor_config.php
如果你发现一个报错: The $cfg[‘TempDir’] (./tmp/) is not accessible. phpMyAdmin is not able to cache templates and will be slow because of this.
那么编辑文件:
# 编辑文件 sudo vi /usr/share/phpmyadmin/libraries/vendor_config.php # 搜索 TEMP_DIR,修改或者下面一行 define('TEMP_DIR', '/var/lib/phpmyadmin/tmp/');
如果你看到The configuration file now needs a secret passphrase (blowfish_secret).
The blowfish secret is used by phpMyAdmin for cookie authentication.
# 编辑文件 sudo vi /usr/share/phpmyadmin/libraries/vendor_config.php # 搜索 CONFIG_DIR,修改或者下面一行 define('CONFIG_DIR', '/etc/phpmyadmin/');
最后保存即可!
4. Cleanup 清理
sudo rm /usr/share/phpmyadmin/phpMyAdmin-4.8.3-all-languages.tar.gz sudo rm -rf /usr/share/phpmyadmin/phpMyAdmin-4.8.3-all-languages sudo rm -rf /usr/share/phpmyadmin.bak
更多参考:
Linux: url打开phpmyadmin, how to access phpmyadmin in lamp
本文:手动升级phpMyAdmin, How to Manually Upgrade phpMyAdmin