树莓派4B折腾笔记

禁用无线网卡

# vim /boot/config

添加下面内容后重启生效

dtoverlay=pi3-disable-wifi

关联ll命令

用习惯了ll来替换ls命令,raspbian中居然不能直接用,只好手动关联一下:

# vim ~/.bashrc

末尾行后面增加一行

alias ll="ls -la --color=auto"

即时生效需要执行下面命令:

# source ~/.bashrc

使用cockpit远程管理

# apt install -y cockpit
// 设置允许http访问(默认只允许https)
# vim /etc/cockpit/cockpit.conf
// 这个文件默认是不存在的,直接创建后修改内容如下:
[WebService]

#允许http协议访问
AllowUnencrypted=true

#设置默认网页Title
LoginTitle=我的树莓派

配置开机自动启动:

# systemctl enable cockpit.socket
# systemctl start cockpit.socket

然后就可以使用浏览器访问http://树莓派IP:9090打开cockpit了

安装docker-ce

切换raspbian阿里镜像源

# vim /etc/apt/source.list

修改内容如下:

deb https://mirrors.aliyun.com/raspbian/raspbian/ buster main non-free contrib
deb-src https://mirrors.aliyun.com/raspbian/raspbian/ buster main non-free contrib

添加docker-ce阿里镜像源

先删除掉/etc/apt/source.list.d/里面默认的.list文件,然后创建新的

# vim /etc/apt/source.list.d/docker-ce.list

deb https://mirrors.aliyun.com/docker-ce/linux/raspbian buster stable

安装docker-ce

# apt update -y
// 安装必要包
# apt-get -y install apt-transport-https ca-certificates curl software-properties-common
// 安装GPG证书
# curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
// 再更新一下
# apt update -y
// 安装docker-ce
# apt install -y docker-ce
// 设置开机自动启动
# systemctl enable docker
// 启动docker
# systemctl start docker

配置cockpit支持docker管理

# apt install cockpit-docker

避坑记录:
之前安装运行了openvpn状态下docker会启动失败,原因是openvpn占用的ip地址和docker冲突了,先关掉openvpn然后再运行docker就ok了

发布了202 篇原创文章 · 获赞 92 · 访问量 44万+

猜你喜欢

转载自blog.csdn.net/lpwmm/article/details/104380801