ubuntu18.04下安装apache+php7

1.配置apache2

(1)安装apache2

 

sudo apt install apache2

 

(2)查看apache2的状态

systemctl status apache2

2.PHP 脚本语言的安装:

(1)执行以下安装

 

sudo apt install libapache2-mod-php php-mysql php-curl php-gd

 

(2)进入vim /var/www/html/phpinfo.php

编写phpinfo

 

<?php

  echo phpinfo();

?>

 

3.使用浏览器测试

http://localhost/phpinfo.php

 

 

posted @ 2018-11-18 21:35  WangShuBo  阅读(2351)  评论(0编辑  收藏  举报