设置静态ip
/etc/dhcpcd.conf
把注释去掉
# Example static IP configuration:
interface eth0
static ip_address=10.7.88.46/24
#/24表示子网掩码255.255.255.0
#static ip6_address=fd51:42f8:caae:d92e::ff/64
static routers=10.7.88.1
#静态路由
static domain_name_servers=223.5.5.5
#静态dns
安装各种程序
xrdp用于Windows远程桌面连接
sudo apt update ;
sudo apt upgrade -y ;
sudo apt install apache2 -y ;
sudo apt install php -y ;
sudo apt install mysql -y ;
sudo apt install xrdp -y
安装完成后重启
设置apache2
apache2 默认网页目录:
/var/www/html
修改/etc/apache2/ports.conf
设置端口
Listen 80
Listen 81
修改/etc/apache2/sites-available/000-default.conf
<VirtualHost *:80>
ServerAdmin webmaster@localhost
#文件目录,原来是/var/www/html
DocumentRoot /var/www/root
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<VirtualHost *:80>
DocumentRoot /var/www/pi-dashboard-master
</VirtualHost>
树莓派性能监控面板源码
https://github.com/spoonysonny/pi-dashboard
配置mysql
/etc/mysql/mariadb.conf.d/50-server.cnf
注释掉绑定地址
#bind-address = 127.0.0.1
之后进入mysql创建一个用户,远程连接用这个用户
本文详细介绍如何在树莓派上设置静态IP地址,并安装多种软件如xrdp、Apache2、PHP等。同时,提供了配置Apache2的具体步骤及树莓派性能监控面板的源码获取链接。

859

被折叠的 条评论
为什么被折叠?



