ubuntu安装配置ApachePhpMysql

1.安装之前先sudo源
sudo apt update
2.安装Apache2
sudo apt install apache2

3.更改默认目录:
vi /etc/apache2/apache2.conf
改为:
<Directory /sowayai/hetao/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>

3.安装PHP
sudo apt install php
sudo apt-get install libapache2-mod-php

重启Apach:
sudo /etc/init.d/apache2 restart

4.安装MySQL
sudo apt install mysql-server php7.0-mysql
sudo apt-get install mysql-client
mysql_secure_installation
5.启动mysql
/etc/init.d/mysql restart
6.进入mysql
mysql -u root -p
7.退出
exit

posted @ 2017-10-05 15:29  开始战斗  阅读(229)  评论(0编辑  收藏  举报