Ubuntu 16.04安装Apache,MySQL,PHP7
1.安装之前先更新系统使用官方源最好!!!
sudo apt update
2.安装Apache2
sudo apt install apache2
3.安装PHP
sudo apt install php
sudo apt-get install libapache2-mod-php
4.安装MySQL
sudo apt install mysql-server php7.0-mysql
sudo apt-get install mysql-client mysql_secure_installation
5.安装phpmyadmin
sudo apt-get install phpmyadmin
sudo apt-get install php-mbstring
sudo apt-get install php-gettext
sudo ln -s /usr/share/phpmyadmin /var/www/html/phpmyadmin
一些拓展:
curl:sudo apt-get install php7.0-curlphp
配置文件:/etc/php/7.0/apache2/php.ini
网站默认目录/var/www/html
apache配置文件:/etc/apache2
参考1:http://justcode.ikeepstudying.com/2016/04/ubuntu-16-04-%E5%AE%89%E8%A3%85-lamp-install-apache-mysql-php-lamp-stack-ubuntu-16-04/
参考2:http://www.linuxdiyf.com/linux/20557.html