实现一键开关机的树莓派伴侣配置程序

这是树莓派官方操作系统Raspberry Pi OS (64-bit)的配置程序

请下载对应自己操作系统的压缩文件,这里以64位树莓派官方操作系统为例

下载文件后解压

unzip pimateone64.zip

解压后在解压文件所在目录以su用户运行

sudo ./pimateone64

配置程序执行完毕后系统会自动重启,等待树莓派启动后即可使用mateone按钮实现树莓派的正常开关机。

注意:树莓派关机需要一定时间,关机过程中不要按下mateone的按键(按下了也不起作用😊)

附:查看自己的系统类型

getconf LONG_BIT

返回64,即为64位系统,对应本文的例子。返回32,即为32位系统,需下载pimateone32

c程序

通过ip获取归属地

import requests
def get_ip():
   response = requests.get('https://api64.ipify.org?format=json').json()
   return response["ip"]
def get_location():
   ip_address = get_ip()
   response = requests.get(f'https://ipapi.co/{ip_address}/json/').json()
   location_data = {
   "ip": ip_address,
   "city": response.get("city"),
   "region": response.get("region"),
   "country": response.get("country_name")
   }
   return location_data
print(get_location())

orangepi_r1_openwrt 固件并升级内核

https://archive.openwrt.org/releases/22.03.4/targets/sunxi/cortexa8/packages/

opkg update
opkg install luci-i18n-base-zh-cn
wget http://www.mixdiy.com/wp-content/uploads/2023/05/kernel_5.10.176-1-e45ce9e19f75a9fbea47c1ca2190d2a3_arm_cortex-a8_vfpv3.ipk
opkg install kernel_5.10.176-1-e45ce9e19f75a9fbea47c1ca2190d2a3_arm_cortex-a8_vfpv3.ipk

另一个版本:

https://archive.openwrt.org/releases/22.03.4/targets/sunxi/cortexa7/packages/

回到soft界面,安装所有v2ray

wordpress”发布失败,您可能已掉线”

环境:

亚马逊aws-ubuntu22安装了wordpress,出现以上错误,一路寻找,把站点健康里面所有未安装的模块全部安装了一遍,比如php8.1-curl、php8.1-xml、php-gd等等,原来只要修改站点地址为https即可,如图