Files
chill_notes/Linux/阿里云_Php.md
2026-04-21 17:40:59 +08:00

16 lines
1.2 KiB
Markdown
Executable File
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
## 首先安装mysql
$ sudo apt-get install mysql-server$ sudo apt-get install mysql-client安装时输出root用户的密码
## 在安装phpmyadmin
$ sudo apt-get install phpmyadmin$ sudo apt-get install php-mbstring$ sudo apt-get install php-gettext安装时选择自动配置数据库输入数据库root账号的密码如果不安装以上两个php软件包则会报错或者白屏提示找不到/usr/share/php/php-gettext/gettext.inc之类的错误
## 建立**==/var/www/html** ==下的软连接
$ sudo ln -s /usr/share/phpmyadmin /var/www/html/phpmyadmin
## 修改php配置文件
$ sudo vim /etc/php/7.0/apache2/php.inidisplay_errors = On(显示错误日志,出现两次,都要改,不然无效)extension=php_mbstring.dll (开启mbstring)
## 重启apache
$ sudo /etc/init.d/apache2 restart
## 1
## 2
## 访问端口localhost/phpmyadmin,输入账号密码即可
## 重点提要因为默认安装phpmyadmin时会安装apahce和php等依赖包由于是16.04系统会默认安装php7.0php7.0又没有默认自带php-mbstringphp-gettext这两个包所以会报错。
> 来自 <[http://blog.csdn.net/l6807718/article/details/51374915](http://blog.csdn.net/l6807718/article/details/51374915)>