docker 安装LAMP环境
LAMP:Linux、Apache、MySQL、PHP
docker hub 上会有配好的LAMP环境docker,部署到本地并运行起来
sudo docker pull linode/lamp
然后 sudo docker run -it linode/lamp bash
启动/重启apache:service apache2 start/restart
apache的默认目录为/var/www/example.com/public_html文件夹下
启动mysql :service mysql start
netstat -pant 查看80和3306是否正常listen
mysql :use mysql,-u root -p Admin2015
配置远程登录:mysql>update user set host = '%' where user = 'root' and host='127.0.0.1';