Ubuntu 16.04 安装 Apache, MySQL, PHP7

Ubuntu 16.04 安装 Apache, MySQL, PHP7

1.安装之前先更新系统

  1. sudo apt update

2.安装Apache2

  1. sudo apt install apache2

3.安装PHP

  1. sudo apt install php
  2. sudo apt-get install libapache2-mod-php

4.安装MySQL

  1. sudo apt install mysql-server php7.0-mysql
  2. sudo apt-get install mysql-client
  3. mysql_secure_installation