sunos system with ipfs
English | 简体中文
- 🌈 专为 Web3 应用程序设计的企业级 UI
- 📦 一组开箱即用的高质量代码
- 🛡 用 Python 编写
- ⚙️ 整套设计资源和开发工具
- 🌍 数十种语言的国际化支持
- 🎨 每个细节的强大主题定制
- Linux
- ChromeOS & Chromium OS
2022/07/28 Kubo v0.14 Latest
wget https://github.com/ipfs/kubo/releases/download/v0.14.0/kubo_v0.14.0_linux-amd64.tar.gz
tar xvfz kubo_v0.14.0_linux-amd64.tar.gz
cd kubo
sudo ./install.sh
ipfs init
Changes directory into the folder
cd ~/.ipfs
ipfs daemon --enable-pubsub-experiment --enable-namesys-pubsub
Changes directory into the folder
sudo apt-get install nano
nano config
Using Nano to modify the configuration ctrl + x + y
Changes directory into the folder
"StorageMax": "10GB", to "StorageMax": "xxxGB",
Find
"/ip4/0.0.0.0/tcp/4001",
"/ip6/::/tcp/4001"
Replace with
"/ip4/0.0.0.0/tcp/44444",
"/ip6/::/tcp/44444"
Or with the ports you desire.
From
"Strategy": "all"
To
"Strategy": "pinned"
export IPFS_PATH=/edit/this/path/to/ipfsrepo
After Exporting, re-run the init command.
ipfs init
curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash -
sudo apt-get install -y nodejs
sudo npm install pm2@latest -g
pm2 start "ipfs daemon --enable-gc"
Starts IPFS daemon with garbage collection enabled.
pm2 start "ipfs daemon --enable-gc" --max-memory-restart 3G
Restarts IPFS daemon if memory usage surpasses 3GB.
pm2 status
Gets the process ID.
pm2 restart 0
Use the process ID found with pm2 status that is running IPFS Daemon. (normally 0 if you have no other processes)
pm2 stop 0
Use the process ID found with pm2 status that is running IPFS Daemon. (normally 0 if you have no other processes)
pm2 startup
Copy and input the command given.
pm2 save
Saves the current process list enabling each process to run when the computer starts.
This program generates swarm.key file for IPFS Private Network feature.
go get -u github.com/Kubuxu/go-ipfs-swarm-key-gen/ipfs-swarm-key-gen
Usage
go/bin/ipfs-swarm-key-gen > ~/.ipfs/swarm.key
Change ~/.ipfs/ to different directory if you use custom IPFS_PATH.
使用Ctrl+Alt+t可以打开打开crosh启动Termina虚拟机进入shell
vmc start termina
(termina) chronos@localhost ~ $
lxc list
列出已经安装的容器:
/tmp $ lxc exec penguin -- bash
sudo lspci
进入编译好的磁盘镜像
(inside) ./mount_gpt_image.sh --board=${BOARD} --safe --most_recent
退出编译好的磁盘镜像(重要)
(inside) ./mount_gpt_image.sh --board=${BOARD} -u
可以单独挂载磁盘镜像编译或者分区解压缩为单独的文件并直接挂载它们 (inside)
cd ~/chromiumos/src/build/images/${BOARD}/latest
./unpack_partitions.sh chromiumos_image.bin
mkdir -p rootfs
sudo mount -o loop,ro part_3 rootfs
这会将 rootfs 从映像环回挂载到 ~/chromiumos/src/build/images/${BOARD}/latest/rootfs 中的chroot位置。 如果您使用构建,"--no-enable-rootfs-verification" 则可以省略 "ro" 选项以将其安装为读写。 如果您构建了 x86 ChromiumOS 映像,您甚至可以尝试 chroot 到该映像中:
(inside) sudo chroot ~/chromiumos/src/build/images/${BOARD}/latest/rootfs
这有点像破解(ChromiumOS rootfs 并不是真正修改服务器主机的 chroot)。完成后不要忘记 exit 这个 chroot。卸载根文件系统:
(inside) sudo umount ~/chromiumos/src/build/images/${BOARD}/latest/rootfs
如何修补 Ebuild :https://chromium.googlesource.com/chromiumos/docs/+/main/portage/how_to_patch_an_ebuild.md 它来自 portage 位置在 src/third_party/chromiumos-overlay 需要从当前 ebuild 使用的包的确切版本创建一个补丁文件,如果其他补丁已经在 ebuild 中,在文件最后添加新的补丁,并从已经应用了现有补丁的源构建补丁(要么手动完成,要么设置 FEATURES=noclean 并构建你的补丁临时源)。请注意,补丁顺序很重要,因为 ebuild 期望每个补丁行号在应用前一个补丁后都是准确的。 将您的补丁放在包含 ebuild 文件(例如 third_party/chromiumos-overlay/dev-libs/mypackage/files/mypackage-1.0.0-my-little-patch.patch )的目录的“files”子目录中。 然后,在 prepare()ebuild 部分(如果不存在则创建一个),添加一个 epatch 行:
epatch "${FILESDIR}"/${P}-my-little-patch.patch