nano pi m1配置脚本(全志H3)

为nanopi m1写一个自动配置脚本,简化自己的操作

配置:H3芯片,1G内存,64G卡

系统:friendlycore focal 4.14版本

一、系统安装

烧录系统后,插入机器,但是使用df -ih发现只有900K的nodes,不够。解决方法:重新插入windows电脑,删除该部分卷,重新插入机器后就有3.6M的nodes,才可以进行后面的docker安装操作。

管理员账号为pi,密码为fa。

二、系统更新

使用sudo apt-get update && sudo apt-get upgrade -y进行更新

三、配置脚本

保存如下配置脚本,nano setup_sys.sh。随后使用chmod +x setup_sys.sh进行配置,以及bash ./setup_sys.sh进行运行。

会出现python-pip无法安装的问题,这是因为python2已经不推荐使用了。

bash 复制代码
#!/bin/bash

# 1. Update the system
sudo apt-get update && sudo apt-get upgrade -y

# 2. Install pip2 and pip3
sudo apt-get install python-pip python3-pip -y

# 3. Install Docker
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common -y
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=armhf] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get install docker-ce -y

# Set Docker to start on boot
sudo systemctl enable docker
sudo systemctl start docker

# 4. Install Portainer
docker volume create portainer_data
docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce

# 5. Install other common tools
sudo apt-get install -y git vim htop net-tools

echo "Setup complete!"
相关推荐
kebidaixu1 小时前
BCU 平台 RS485 驱动适配:从 THVD1406 到 ISO3082
linux
大貔貅喝啤酒1 小时前
Python Requests库教程
自动化测试·python·requests库
杨浦老苏1 小时前
家庭实验室监控仪表盘HomeLab-Monitor
运维·docker·监控·群晖
copyer_xyf2 小时前
LangChain 调用 LLM
后端·python·agent
copyer_xyf2 小时前
Prompt 组织管理
后端·python·agent
shimly1234563 小时前
python3 uvicorn 是啥?
python
CTA量化套保4 小时前
期货量化程序 time.sleep 卡死:天勤单线程与 deadline 替代
python·区块链
谢平康4 小时前
解决用 rm 报bash: /usr/bin/rm: Argument list too long错
linux·运维·运维开发
GIS数据转换器4 小时前
城市排水生命线安全运行监测平台深度解析
java·运维·人工智能·python·安全·数据挖掘·无人机
贤哥哥yyds4 小时前
GBK转UTF\-8编码自动转换工具 使用文档
python