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