sudo apt-get update
`</pre>
## Step 1\. Install Apache2
<pre>`sudo apt-get install apache2
sudo ufw app list
//Sample output:
Available applications:
Apache
Apache Full
Apache Secure
OpenSSH
sudo ufw allow in "Apache Full"
//Allow incoming traffic for this profile
`</pre>
## Step 2\. Install MySQL
<pre>`sudo apt-get install mysql-server
sudo mysql_secure_installation
`</pre>
## Step 3\. Install PHP
<pre>`sudo apt-get install php7
`</pre>
## Step 4\. Install PHP Modules
<pre>`apt-cache search php- | less
apt-cache show package_name
sudo apt-get install php7-*
遇到的问题:
- 重新设置 Mysql user/pwd.(解决方法见链接2)
参考文章:
How To Install Linux, Apache, MySQL, PHP (LAMP) stack on Ubuntu 16.04
MySQL ERROR 1698 (28000) 错误