在 Linode 上安装 FreeBSD
Apr 17, 2021
Linode 作为全球知名到主机服务商,官方提供的服务器系统只有 Linux,想要尝试 FreeBSD 系统只能自己安装。 FreeBSD 13.0 可以在这里下载:https://www.freebsd.org/where/ …
iOS 7.0.4 evasi0n 越狱
Apr 09, 2021
因为 evasi0n.com 已经不提供服务了,在越狱的时候会提示无法获取包信息: 修改 hosts 同管理员权限打开命令行(cmd): 修改 host notepad %windir%\system32\drivers\etc\hosts : 127.0.0.1 evasi0n.com 127.0.0.1 cn2.evasi0n.com 创建本地 HTTP 服务器 用记事本创建一个名称为 apple-ipa-info.plist 的文件,内容如下: …
在虚拟机里安装 FreeBSD
Apr 08, 2021
环境是 macOS + Parallels Desktop 到 freebsd.org 下载目前最新的发行版本 FreeBSD-12.2-RELEASE-amd64-disc1.iso 创建一个虚拟机,类型指定为 FreeBSD: 点击完成,虚拟机就自动开机了,先手动停止虚拟机,在启动顺序里,添加引导标记参数 vm.bios.efi = 1: …
Ubuntu 设置系统时区
Mar 29, 2021
最简单直接的方法: timedatectl set-timezone Asia/Shanghai 传统方法: tzselect 按提示逐步操作: Please identify a location so that time zone rules can be set correctly. Please select a continent, ocean, "coord", or "TZ". 1) Africa 2) Americas 3) Antarctica 4) Asia 5) Atlantic Ocean 6) Australia 7) Europe 8) Indian Ocean 9) Pacific Ocean 10) coord - I want to use geographical coordinates. 11) TZ - I want to specify the timezone using the Posix TZ format. #? 4 Please select a country whose clocks agree with yours. 1) Afghanistan 18) Israel 35) Palestine 2) Armenia 19) Japan 36) Philippines 3) Azerbaijan 20) Jordan 37) Qatar 4) Bahrain 21) Kazakhstan 38) Russia 5) Bangladesh 22) Korea (North) 39) Saudi Arabia 6) Bhutan 23) Korea (South) 40) Singapore 7) Brunei 24) Kuwait 41) Sri Lanka 8) Cambodia 25) Kyrgyzstan 42) Syria 9) China 26) Laos 43) Taiwan 10) Cyprus 27) Lebanon 44) Tajikistan 11) East Timor 28) Macau 45) Thailand 12) Georgia 29) Malaysia 46) Turkmenistan 13) Hong Kong 30) Mongolia 47) United Arab Emirates 14) India 31) Myanmar (Burma) 48) Uzbekistan 15) Indonesia 32) Nepal 49) Vietnam 16) Iran 33) Oman 50) Yemen 17) Iraq 34) Pakistan #? 9 Please select one of the following timezones. 1) Beijing Time 2) Xinjiang Time #? 1 The following information has been given: China Beijing Time Therefore TZ='Asia/Shanghai' will be used. Selected time is now: Mon Mar 29 12:53:57 CST 2021. Universal Time is now: Mon Mar 29 04:53:57 UTC 2021. Is the above information OK? 1) Yes 2) No #? 1 You can make this change permanent for yourself by appending the line TZ='Asia/Shanghai'; export TZ to the file '.profile' in your home directory; then log out and log in again. Here is that TZ value again, this time on standard output so that you can use the /usr/bin/tzselect command in shell scripts: Asia/Shanghai 最后设置系统时区: …
备份和恢复 Docker 镜像
Mar 28, 2021
备份 Image docker save nginx | gzip > nginx.tar.gz 恢复 Image gunzip --stdout nginx.tar.gz | docker load 官方参考资料 https://docs.docker.com/engine/reference/commandline/load/ https://docs.docker.com/engine/reference/commandline/save/
macOS 上备份和还原树莓派系统
Mar 28, 2021
备份树莓派就是把 SD 卡数据备份,恢复就是还原数据到 SD 卡,类似于以前的 GHOST 备份。 使用 diskutil list 查找 SD 卡设备: ... /dev/disk5 (external, physical): #: TYPE NAME SIZE IDENTIFIER 0: FDisk_partition_scheme *32.0 GB disk5 1: Windows_FAT_32 system-boot 268.4 MB disk5s1 2: Linux 31.7 GB disk5s2 备份系统 sudo dd bs=4m if=/dev/disk5 | gzip > RaspiOS.img.gz 备份完成后,输出结果: …
Docker buildx 编译多架构镜像
Mar 27, 2021
编译多架构镜像类似于源码编译里面的跨平台交叉编译,在一台宿主机器上编译出多个不同架构的镜像, 在不同架构上使用的时候直接 docker pull 就可以拉取到与本机架构相符的镜像。 …
Docker 设置代理的方式
Mar 27, 2021
docker pull & push 执行 docker pull ... 和 docker push ... 命令时,是由守护进程 dockerd 执行任务,所以代理需要设置给 dockerd sudo mkdir -p /etc/systemd/system/docker.service.d sudo vim /etc/systemd/system/docker.service.d/proxy.conf proxy.conf 可以是任意名称,后缀不能改。 [Service] Environment="HTTP_PROXY=http://10.211.55.2:7890" Environment="HTTPS_PROXY=http://10.211.55.2:7890" Environment="NO_PROXY=localhost,127.0.0.1,docker-registry.example.com,.corp" 修改后需要重启服务: …
在树莓派上开启 WIFI 连接
Mar 25, 2021
先查看一下目前的网络设备接口: ls /sys/class/net eth0 lo wlan0 编辑 /etc/netplan/50-cloud-init.yaml,添加你的 WIFI 名称和密码: # This file is generated from information provided by the datasource. Changes # to it will not persist across an instance reboot. To disable cloud-init's # network configuration capabilities, write a file # /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following: # network: {config: disabled} network: ethernets: eth0: dhcp4: true optional: true version: 2 wifis: wlan0: optional: true dhcp4: true dhcp6: true access-points: "YOUR-WIFI-NAME": password: "YOUR-WIFI-PASSWD" 保存后,依次执行以下命令: …
在 Ubuntu 上安装 Docker 的方法
Mar 24, 2021
Docker 的客户端和容器的运行时现在分开为不同的包里,要安装 Docker 需要同时安装这三个包: sudo apt-get install docker-ce docker-ce-cli containerd.io 卸载旧版本 docker、 docker.io 和 docker-engine 是旧版本的 Docker,如果之前安装过,则需要先卸载掉: …