树莓派安装Apache2遇到问题与解决方法

本文记录了在树莓派上配置LAMP环境的过程,包括更换系统源、安装Apache和PHP7.3。在安装过程中遇到Apache无法解析PHP7.3的问题,通过安装libapache2-mod-php7.3解决。同时,为满足项目需求,安装了redis并添加了php-redis扩展,经过测试确认扩展成功。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

因项目需求,在树莓派上折腾了LAMP环境,安装过程中遇到一些问题,慢慢折腾解决了。

1、更换系统源

sudo nano /etc/apt/sources.list

注释掉系统默认源,更换阿里云源。

# deb http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
# deb-src http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi
deb http://mirrors.aliyun.com/raspbian/raspbian/ jessie main non-free contrib rpi
deb-src http://mirrors.aliyun.com/raspbian/raspbian/ jessie main non-free contrib rpi

2、更新系统

sudo apt-get update -y

3、安装Apache与php7.3

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值