记录manjaro的安装过程。
安装操作系统
https://manjaro.org/products/download/x86
GNOME is a modern desktop, the layout is different from other options but easy and intuitive to learn.
优化apt
Recommend: Add/Remove Software & Preferences->Use mirrors from: Change to China, and Refresh Mirrors.
Upgrade:1
2
3
4
5
6
7sudo pacman -Syu
#如果报错执行:
pacman-key --init
pacman-key --populate archlinuxarm
pacman -Sy archlinux-keyring
pacman -Syu
安装基础包
1 | #pacman |
Yay命令
https://wiki.archlinuxcn.org/wiki/Yay
1 | 功能 命令 |
howdy
1 | #https://www.cnblogs.com/gardenialyx/p/19104354 |
扩展
1 | #go to https://extensions.gnome.org/ and search: |
toupad
三指拖放:https://github.com/ferstar/gestures.git
1 | #https://blog.ferstar.org/posts/linux-touchpad-gestures-drag/ |
ssh
1 | sudo pacman -S openssh |
Securecrt
1 | #https://www.cnblogs.com/amsilence/p/19151338 |
Remote Desktop
1 | #向日葵 |
NVM
1 | curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.4/install.sh | bash |
Python Venv
1 | #python -m venv /works/python_venv |
waydroid
https://geek-blogs.com/blog/best-android-emulator-for-linux/
1 | pip install dbus-python gbinder PyGObject |
Fix: This device isn’t Play Protect certified
1 | #获取 Waydroid 的 Android ID(GSF ID) |
在浏览器注册设备
1 | 打开任何浏览器(Manjaro 的 Firefox/Chrome 都行),访问: |
重启 Waydroid:1
2
3waydroid session stop
sudo systemctl restart waydroid-container
waydroid show-full-ui
安装apk
1 | waydroid session start |
Samba
1 | sudo pacman -Syu samba smbclient |
aria2
1 | yay -Syu aria2 |
openwrt
安装后,配置好网络。DHCP/DNS -> 过滤器 -> 勾掉”重绑定保护”
中文包
1 | OpenWRT -> System -> Software -> Filter |
theme-argon
参考以下文章安装主题:https://kwx.cc/post/3880
1 | #https://github.com/jerrykuku/luci-theme-argon |
救砖
1 | https://www.cnblogs.com/dingshaohua/p/18776622 |
ocserv
1 | opkg update |
通用配置:1
2
3
4用户身份验证: plan
端口: 443
VPN IPv4–网络地址: 192.168.4.1
DNS 服务器: 223.5.5.5
用户设置中配置账户信息即可。
配置vpns+规则:
1 | 进入:网络->防火墙->常规设置: |
配置其他网段的route:
1 | #vim /etc/config/ocserv |
ssl证书:1
2
3
4
5
6
7
8
9#VPN->OpenConect VPN->编辑模板:
server-cert = /data/ocserv/ssl/xxxx.net.pem
server-key = /data/ocserv/ssl/xxxx.net.key
#提交并重启
/etc/init.d/ocserv restart
#blog的备份文件:backup/vpn/ocserv.zip
手机openconnect后,dns无效时,把DNS从8.8.8.8改为223.5.5.5即可
Proxmox
安装debain 13
1 | #下载debain |
安装Proxmox 9
1 | #安装Proxmox 9 on debain 13,按照以下文档安装即可 |
创建网桥
Create a Linux Bridge called vmbr0, and add your first network interface to it.
The recommended default configuration can be adapted from the example given in the documentation.
See the default configuration using a bridge:
https://pve.proxmox.com/wiki/Network_Configuration#_default_configuration_using_a_bridge
编辑文件:1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39vim /etc/network/interfaces:
auto lo
iface lo inet loopback
iface enp1s0 inet manual
iface enp2s0 inet manual
iface wlo1 inet manual
auto vmbr0
iface vmbr0 inet static
address 192.168.3.10/24
#gateway 192.168.3.1
bridge-ports enp1s0
#dns-nameservers 223.5.5.5 8.8.8.8
bridge-stp off
bridge-fd 0
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up iptables -t nat -A POSTROUTING -s '192.168.3.0/24' -o vmbr0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '192.168.3.0/24' -o vmbr0 -j MASQUERADE
auto vmbr1
iface vmbr1 inet static
address 192.168.1.2/24
gateway 192.168.1.1
bridge-ports enp2s0
bridge-stp off
bridge-fd 0
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up iptables -t nat -A POSTROUTING -s '192.168.3.0/24' -o vmbr1 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '192.168.3.0/24' -o vmbr1 -j MASQUERADE
#重新加载:
apt install ifupdown2
ifreload -a
# 或
systemctl restart networking
安装CT
1 | #https://mirrors.ustc.edu.cn/help/proxmox.html |
宿主机进入容器:1
2
3
4
5
6
7
8
9#在web界面安装好后,宿主机进入容器
> pct enter <容器id>
nano /etc/ssh/sshd_config
# 找到 PermitRootLogin,修改为:
PermitRootLogin yes
# 重启服务
systemctl restart ssh
#配置文件位于宿主机:nano /etc/pve/lxc/<ct-id>.conf
Openwrt
1 | #https://downloads.openwrt.org/releases/25.12.0/targets/x86/64/ |
Proxmox 9.x由于ujail限制,homeporxy无法启动,需要修改宿主机的配置:
nano /etc/pve/lxc/104.conf1
2
3
4
5
6unprivileged: 0
lxc.cgroup2.devices.allow: c 10:200 rwm
lxc.mount.entry: /dev/net/tun dev/net/tun none bind,create=file
lxc.mount.auto: proc:rw sys:rw
lxc.cap.drop:
lxc.apparmor.profile: unconfined
重启CT容器后生效。
如果需要前移旧设备的信息的话,可以把以下的三个文件里面的内容复制过去:1
2
3
4
5
6#可以直接覆盖
/etc/config/homeproxy
#复制里面的静态ip部分
/etc/config/dhcp
#复制里面的防火墙部分
/etc/config/firewall
解决openwrt作为路由器时,ip能ping通,当域名不能的问题:1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16# 给 WAN 接口强制指定上游 DNS(如果接口名不是 wan,请改成实际名字)
uci set network.lan.peerdns='0'
uci delete network.lan.dns
uci add_list network.lan.dns='223.5.5.5'
uci add_list network.lan.dns='8.8.8.8'
# 同时让 dnsmasq 也使用这些 DNS
uci set dhcp.@dnsmasq[0].noresolv='0'
uci delete dhcp.@dnsmasq[0].server
uci add_list dhcp.@dnsmasq[0].server='223.5.5.5'
uci add_list dhcp.@dnsmasq[0].server='8.8.8.8'
uci commit network
uci commit dhcp
/etc/init.d/network restart
/etc/init.d/dnsmasq restart
ZeroTier
1 | #https://github.com/mwarning/zerotier-openwrt/wiki/Configure-ZeroTier-on-OpenWrt |
如果openwrt采取的是lan+wan的方式的话,从宿主机无法访问到openwrt的解决方式:1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21#openwrt添加路由(推荐)
# 让 OpenWRT 知道 192.168.195.0/24 要走宿主机
#ip route add 192.168.195.0/24 via 192.168.3.10
# 永久生效(写入配置)
uci add network route
uci set network.@route[-1].interface='lan'
uci set network.@route[-1].target='192.168.195.0/24'
uci set network.@route[-1].gateway='192.168.3.10'
uci commit network
/etc/init.d/network restart
#可选:或者在宿主机配置, vmbr0为内网口:
# 把从 ZeroTier 进来、去往 192.168.3.0/24 的流量伪装成主机自己的 IP
iptables -t nat -A POSTROUTING -s 192.168.195.0/24 -d 192.168.3.0/24 -o vmbr0 -j MASQUERADE
# 或者更宽一点:
#iptables -t nat -A POSTROUTING -o vmbr0 -j MASQUERADE
#持久化
apt install -y iptables-persistent
iptables-save > /etc/iptables/rules.v4
# 或
netfilter-persistent save
Arch linux
1 | #http://download.proxmox.com |
Ubuntu arm64
1 | #https://github.com/jiangcuo/pxvirt/issues/174 |