admin 管理员组文章数量: 887021
刷机
盒子就从U盘启动
系统默认的用户名和密码是root 1234
固件烧写到内置存储emmc
执行指令:
armbian-install
根据盒子不同,输入参数不同如:305
选择文件系统的类型,为2 然后回车。经过实际测试btrfs占用的磁盘空间少!输入关机指令poweroff或者直接拔电源。
换源
备份源
cp /etc/apt/sources.list /etc/apt/sources.list.backage
打开源文件文本
nano /etc/apt/sources.list
jammy 源
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu/ubuntu-ports/ jammy main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu/ubuntu-ports/ jammy main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu/ubuntu-ports/ jammy-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu/ubuntu-ports/ jammy-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu/ubuntu-ports/ jammy-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu/ubuntu-ports/ jammy-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu/ubuntu-ports/ jammy-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu/ubuntu-ports/ jammy-security main restricted universe multiverse
# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu/ubuntu-ports/ jammy-proposed main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu/ubuntu-ports/ jammy-proposed main
restricted universe multiverse
* https://mirrors.aliyun/ubuntu-ports/
* http://mirrors.aliyun/ubuntu-ports/
* http://mirrors.ustc.edu/ubuntu-ports/
* https://mirrors.tuna.tsinghua.edu
国内源选择一个
163镜像站
deb http://mirrors.163/debian/ buster main non-free contrib
deb http://mirrors.163/debian/ buster-updates main non-free contrib
deb http://mirrors.163/debian/ buster-backports main non-free contrib
deb http://mirrors.163/debian-security/ buster/updates main non-free contrib
deb-src http://mirrors.163/debian/ buster main non-free contrib
deb-src http://mirrors.163/debian/ buster-updates main non-free contrib
deb-src http://mirrors.163/debian/ buster-backports main non-free contrib
deb-src http://mirrors.163/debian-security/ buster/updates main non-free contrib
华为云镜像站
deb https://mirrors.huaweicloud/debian/ buster main contrib non-free
deb https://mirrors.huaweicloud/debian/ buster-updates main contrib non-free
deb https://mirrors.huaweicloud/debian/ buster-backports main contrib non-free
deb https://mirrors.huaweicloud/debian-security/ buster/updates main contrib non-free
deb-src https://mirrors.huaweicloud/debian/ buster main contrib non-free
deb-src https://mirrors.huaweicloud/debian/ buster-updates main contrib non-free
deb-src https://mirrors.huaweicloud/debian/ buster-backports main contrib non-free
腾讯云镜像站
deb http://mirrors.cloud.tencent/debian/ buster main non-free contrib
deb http://mirrors.cloud.tencent/debian-security buster/updates main
deb http://mirrors.cloud.tencent/debian/ buster-updates main non-free contrib
deb http://mirrors.cloud.tencent/debian/ buster-backports main non-free contrib
deb-src http://mirrors.cloud.tencent/debian-security buster/updates main
deb-src http://mirrors.cloud.tencent/debian/ buster main non-free contrib
deb-src http://mirrors.cloud.tencent/debian/ buster-updates main non-free contrib
deb-src http://mirrors.cloud.tencent/debian/ buster-backports main non-free contrib
中科大镜像站
deb https://mirrors.ustc.edu/debian/ buster main contrib non-free
deb https://mirrors.ustc.edu/debian/ buster-updates main contrib non-free
deb https://mirrors.ustc.edu/debian/ buster-backports main contrib non-free
deb https://mirrors.ustc.edu/debian-security/ buster/updates main contrib non-free
deb-src https://mirrors.ustc.edu/debian/ buster main contrib non-free
deb-src https://mirrors.ustc.edu/debian/ buster-updates main contrib non-free
deb-src https://mirrors.ustc.edu/debian/ buster-backports main contrib non-free
deb-src https://mirrors.ustc.edu/debian-security/ buster/updates main contrib non-free
阿里云镜像站
deb http://mirrors.aliyun/debian/ buster main non-free contrib
deb http://mirrors.aliyun/debian-security buster/updates main
deb http://mirrors.aliyun/debian/ buster-updates main non-free contrib
deb http://mirrors.aliyun/debian/ buster-backports main non-free contrib
deb-src http://mirrors.aliyun/debian-security buster/updates main
deb-src http://mirrors.aliyun/debian/ buster main non-free contrib
deb-src http://mirrors.aliyun/debian/ buster-updates main non-free contrib
deb-src http://mirrors.aliyun/debian/ buster-backports main non-free contrib
清华大学镜像站
deb https://mirrors.tuna.tsinghua.edu/debian/ buster main contrib non-free
deb https://mirrors.tuna.tsinghua.edu/debian/ buster-updates main contrib non-free
deb https://mirrors.tuna.tsinghua.edu/debian/ buster-backports main contrib non-free
deb https://mirrors.tuna.tsinghua.edu/debian-security/ buster/updates main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu/debian/ buster main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu/debian/ buster-updates main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu/debian/ buster-backports main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu/debian-security/ buster/updates main contrib non-free
兰州大学镜像站
deb http://mirror.lzu.edu/debian stable main contrib non-free
deb http://mirror.lzu.edu/debian stable-updates main contrib non-free
deb http://mirror.lzu.edu/debian/ buster-backports main contrib non-free
deb http://mirror.lzu.edu/debian-security/ buster/updates main contrib non-free
deb-src http://mirror.lzu.edu/debian stable main contrib non-free
deb-src http://mirror.lzu.edu/debian stable-updates main contrib non-free
deb-src http://mirror.lzu.edu/debian/ buster-backports main contrib non-free
deb-src http://mirror.lzu.edu/debian-security/ buster/updates main contrib non-free
上海交大镜像站
deb https://mirror.sjtu.edu/debian/ buster main contrib non-free
deb https://mirror.sjtu.edu/debian/ buster-updates main contrib non-free
deb https://mirror.sjtu.edu/debian/ buster-backports main contrib non-free
deb https://mirror.sjtu.edu/debian-security/ buster/updates main contrib non-free
deb-src https://mirror.sjtu.edu/debian/ buster-updates main contrib non-free
deb-src https://mirror.sjtu.edu/debian/ buster-backports main contrib non-free
deb-src https://mirror.sjtu.edu/debian/ buster main contrib non-free
deb-src https://mirror.sjtu.edu/debian-security/ buster/updates main contrib non-free
恢复官方源时只需执行(前提是你备份了,或者直接百度armbian官方源进行替换就行了)
rm /etc/apt/sources.list&&mv /etc/apt/sources.list.backage /etc/apt/sources.list
更新软件包列表,然后升级所有已安装的软件包。
apt-get update && apt-get upgrade
armbian-software安装桌面
Casaos
安装
curl -fsSL https://get.casaos.io | sudo bash
armbian基本的操作命令
Armbian基本的操作命令有:
armbian-config:调出窗口配置。
passwd:修改密码。
apt install:安装软件。
apt list --installed:列出安装的所有包。
apt list --installed | grep docker:列出安装的和docker相关的包。
apt-get remove docker-ce:删除已安装的软件包(保留配置文件)。
apt-get purge:删除已安装的软件包(不保留配置文件)。
umount:卸载文件卷。
mkfs.vfat:格式化文件卷。
reboot:重启系统。
lsblk:用于列出所有可用块设备的信息,例如磁盘、分区和挂载点
uptime:系统运行了多长时间
安装postgresql12
sudo sh -c 'echo "deb https://apt.postgresql/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
wget --quiet -O - https://www.postgresql/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get install postgresql-12
源码编译安装postgresql12
【postgreSQL】源码安装postgresql-14.0 - 巫安生 - 博客园 (cnblogs)
#下载地址和选定的源码包
https://www.postgresql/download/
创建postgres的系统用户和用户组
useradd -r postgres |
解压软件到指定的目录下
tar -zxvf postgresql-14.0.tar.gz -C /data |
配置数据库安装目录
cd /data/postgresql-14.0/
编译出错,换兰州大学的镜像源,安装依赖
./configure --prefix=/data/postgreSQL
不行就换
./configure --without-readline --prefix=/data/postgreSQL
构建
make
安装文件
make install
创建数据目录
mkdir -p /data/postgreSQL/pgsqlData | |
chown postgres:postgres /data/postgreSQL/pgsqlData |
su postgres
# 初始化数据库
/data/postgreSQL/bin/initdb -D /data/postgreSQL/pgsqlData
cd /data/postgreSQL/pgsqlData
# 启动实例
/data/postgreSQL/bin/pg_ctl -D /data/postgreSQL/pgsqlData -l logfile start
armbian如何把/data/postgreSQL/bin加入到环境变量中
/etc/profile
export PATH=$PATH:/data/postgreSQL/bin
配置postgreSQL开机启动服务
vi /usr/lib/systemd/system/postgresql.service
[Unit]
Description=postgreSQL Server
[Service]
User=postgres
Group=postgres
Type=forking
TimeoutSec=0
PermissionsStartOnly=true
ExecStart=/data/postgreSQL/bin/pg_ctl -D /data/postgreSQL/pgsqlData start
LimitNOFILE = 65535
Restart=on-failure
RestartSec=3
RestartPreventExitStatus=1
PrivateTmp=false
[Install]
WantedBy=multi-user.target
加载配置和启动
systemctl daemon-reload | |
systemctl start postgresql | |
systemctl enable postgresql |
armbian安装SMB做文件共享
N1刷armbian安装SMB做文件共享_armbian samba-CSDN博客
安装SMB
apt install samba
配置SMB
配置文件/etc/samba/smb.conf
,直接覆盖原内容,实现匿名直接连接。
[global]
## fruit settings
min protocol = SMB2
ea support = yes
## vfs objects = fruit streams_xattr
fruit:metadata = stream
fruit:model = Macmini
fruit:veto_appledouble = no
fruit:posix_rename = yes
fruit:zero_file_id = yes
fruit:wipe_intentionally_left_blank_rfork = yes
fruit:delete_empty_adfiles = yes
map to guest = bad user
include=/etc/samba/smb.casa.conf
配置文件/etc/samba/smb.casa.conf
[bak]
comment = CasaOS share bak
public = Yes
path = /home/public
browseable = Yes
read only = No
guest ok = Yes
create mask = 0777
directory mask = 0777
force user = root
[bak]
comment = CasaOS share bak
public = Yes
path = /home/public
browseable = Yes
read only = No
guest ok = Yes
create mask = 0777
directory mask = 0777
force user = root
[bak]
comment = CasaOS share bak
public = Yes
path = /home/public
browseable = Yes
read only = No
guest ok = Yes
create mask = 0777
directory mask = 0777
force user = root
mkdir /home/public
修改目录权限
chmod -R 777 /home/public
开机启动SMB
systemctl enable samba
重启SMBsystemctl restart samba
查看SD卡
lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
mmcblk1 179:0 0 29.1G 0 disk
├─mmcblk1p1 179:1 0 255M 0 part /boot
└─mmcblk1p2 179:2 0 28.9G 0 part /
mmcblk1boot0 179:32 0 4M 1 disk
mmcblk1boot1 179:64 0 4M 1 disk
mmcblk0 179:96 0 7.4G 0 disk
└─mmcblk0p1 179:97 0 7.4G 0 part
zram0 254:0 0 1.9G 0 disk [SWAP]
zram1 254:1 0 50M 0 disk /var/log
挂载到刚才的共享目录/home/public
mount /dev/mmcblk0p1 /home/public
命令blkid
查看UUID并记下
blkid /dev/mmcblk0p1
/dev/mmcblk0p1: UUID="D7E8-5547" BLOCK_SIZE="512" TYPE="exfat" PARTUUID="5452574f-01"
开机挂载,nano /etc/fstab
,加上以下内容
UUID=D7E8-5547 /home/public exfat defaults 0 0
启动挂载(好像不用这步也可以)mount -a
本文标签: Armbian
版权声明:本文标题:armbian 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.freenas.com.cn/jishu/1725888837h887822.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论