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!"
相关推荐
ComputerInBook16 小时前
Linux内核之概观
linux·linux内核代码结构·linux内核结构
jyOverQ16 小时前
LangGraph:子图动态路由与 Agent 工作流设计
python·langchain
晴天1616 小时前
Gradio 与 Streamlit:Python 快速构建 Web 应用的双子星-Day28
开发语言·前端·python
苏灿烤鱼16 小时前
把求职写成工作流,公开 fork 为什么会把简历写进仓库?
python·typescript·claude
whcyhhh16 小时前
头歌实践教学平台:数据科学与大数据技术导论(十)
大数据·开发语言·python
是枚小菜鸡儿吖19 小时前
把视频教程变成可复习的笔记:Docker 部署 BiliNote,自动转写与总结
笔记·docker·容器
华研前沿标杆游学20 小时前
华为松山湖高阶研学|企业数字化转型游学攻略
python
ICollection20 小时前
4060笔记本用Docker部署ComfyUI绘图
docker·comfyui
Data_Journal1 天前
用于网页抓取的 Node-unblocker
大数据·开发语言·数据库·python·scrapy
豆角焖肉1 天前
SSM 聚合项目搭建:多 Maven 模块项目
开发语言·python·pycharm