记录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 |
###
ocserv
1 | opkg update |
通用配置:1
2
3
4用户身份验证: plan
端口: 443
VPN IPv4–网络地址: 192.168.4.1
DNS 服务器: 223.5.5.5
用户设置中配置账户信息即可。
配置vpns+规则:1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16#https://grok.com/c/45ef9e72-4b86-4373-b5dd-c03a94345f86?rid=a9af3990-c617-426d-8173-1bfdef7ec61b
# 1. 把 vpns+ 加到 LAN zone(支持通配 vpns0、vpns1...)
uci -q del_list firewall.@zone[0].device='vpns+'
uci -q del_list firewall.@zone[0].device='vpns+'
# 2. 确保 WAN 到 VPN 端口已放行(你已经连上了,应该有,但保险起见)
# uci -q delete firewall.oc
# uci set firewall.oc=rule
# uci set firewall.oc.name='Allow-OpenConnect'
# uci set firewall.oc.src='wan'
# uci set firewall.oc.dest_port='14443' # 改成你的实际端口
# uci set firewall.oc.proto='tcp udp'
# uci set firewall.oc.target='ACCEPT'
uci commit firewall
service firewall restart
也可以在web里面操作:1
2
3
4
5
6
7#进入:网络->防火墙->常规设置:
#wan:
"入站数据 出站数据 区域内转发":都接受,勾选“IP 动态伪装“
#lan: 编辑:
高级设置:覆盖的设备:vpns+ 地址族限制:仅IPv4
#防火墙 - 通信规则:
名称:Allow-Ocserv,源区域: wan 目标端口: 14443 操作:接受
配置其他网段的route:1
2
3#VPN->OpenConect VPN->路由表:
192.168.101.0/24
192.168.80.0/24
也可以快速添加其他的网段:
vim /etc/config/ocserv1
2
3
4
5
6
7
8
9
config routes
option ip '192.168.65.0/24'
option netmask '255.255.255.0'
config routes
option ip '192.168.66.0/24'
option netmask '255.255.255.0'
......
或者手动脚本添加:1
2
3
4
5
6
7
8
9
10
11
12
13
14
15# 添加第一条:192.168.101.0/24 (已经通的)
uci add ocserv routes
uci set ocserv.@routes[-1].network='192.168.101.0/24'
# 添加第二条:192.168.80.0/24
uci add ocserv routes
uci set ocserv.@routes[-1].network='192.168.80.0/24'
# (可选)如果你还想推默认路由(全流量走 VPN),再加一条:
# uci add ocserv routes
# uci set ocserv.@routes[-1].network='0.0.0.0/0'
# 提交并重启 ocserv
uci commit ocserv
/etc/init.d/ocserv restart
ssl证书:1
2
3
4
5
6
7
8
9
10#VPN->OpenConect VPN->编辑模板:
server-cert = /data/ocserv/ssl/szvpn.zerofinance.net.pem
server-key = /data/ocserv/ssl/szvpn.zerofinance.net.key
#提交并重启
/etc/init.d/ocserv restart
#blog的备份文件:backup/vpn/ocserv.zip
手机openconnect后,dns无效时,把DNS从8.8.8.8改为223.5.5.5即可
建议都在openwrt web里面操作。
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
24vim /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
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
#重新加载:
apt install ifupdown2
ifreload -a
安装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/ |
Arch linux
1 | #http://download.proxmox.com |
Ubuntu arm64
1 | #https://github.com/jiangcuo/pxvirt/issues/174 |