Ubuntu 16.04 配置 LAMP 环境(PHP7)

浏览: 80 发布日期: 2016-08-17 分类: ubuntu
sudo apt-get update

Step 1. Install Apache2

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

Step 2. Install MySQL

sudo apt-get install mysql-server
sudo mysql_secure_installation

Step 3. Install PHP

sudo apt-get install php7

Step 4. Install PHP Modules

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) 错误

返回顶部