作者归档:caspian

Proxmox VE 安装macOS

Proxmox VE 6.2安装macOS 10.15及GPU穿通方案

https://zhuanlan.zhihu.com/p/240710958

 

Proxmox 6.2 安装黑苹果macOS 10.15.5(clover、opencore双引导)

Proxmox 6.2 安装黑苹果macOS 10.15.5(clover、opencore双引导)

Proxmox 6安装macOS Catalina 10.15速成教程

https://post.smzdm.com/p/a4wm2mdk/

 

https://pan.baidu.com/s/1irs8PsEdWAACZdYwxl1-dQ#list/path=%2F&parentPath=%2Fsharelink1216756133-966050132709506

链接:https://pan.baidu.com/s/1f9lppZUr_Jq6qgiCXyoJ6A  密码:cvzw

配置hosts快速访问GitHub

host

140.82.112.3 github.com
140.82.114.4 gist.github.com
185.199.108.153 assets-cdn.github.com
199.232.68.133 raw.githubusercontent.com
199.232.68.133 gist.githubusercontent.com
199.232.68.133 cloud.githubusercontent.com
199.232.68.133 camo.githubusercontent.com
199.232.68.133 avatars0.githubusercontent.com
199.232.68.133 avatars1.githubusercontent.com
199.232.68.133 avatars2.githubusercontent.com
199.232.68.133 avatars3.githubusercontent.com
199.232.68.133 avatars4.githubusercontent.com
199.232.68.133 avatars5.githubusercontent.com
199.232.68.133 avatars6.githubusercontent.com
199.232.68.133 avatars7.githubusercontent.com
199.232.68.133 avatars8.githubusercontent.com

https://github.com.ipaddress.com

pve增加ipv6管理

127.0.0.1 localhost.localdomain localhost
::1:10.0.0.230 pve.5gll.com pve

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

 

 

systemctl restart pveproxy

npm 中国源

华为镜像

npm config set registry https://mirrors.huaweicloud.com/repository/npm/
  1. npm –registry https://registry.npm.taobao.org install express
    2、持久使用
  2. npm config set registry https://registry.npm.taobao.org
  3. // 配置后可通过下面方式来验证是否成功
  4. npm config get registry
  5. // 或
  6. npm info express
  7. 3、通过cnpm使用
  8. npm install -g cnpm –registry=https://registry.npm.taobao.org
  9. // 使用
  10. cnpm install express

 

挂载硬盘,提示 mount: unknown filesystem type ‘LVM2_member’的解决方案

问题现象:由于重装linux,并且加了固态硬盘,直接将系统装在固态硬盘中。启动服务器的时候,

便看不到原来机械硬盘的挂载目录了,不知如何访问机械硬盘了。直接用命令 mount /dev/sda3 /store 挂载,

提示 mount: unknown filesystem type ‘LVM2_member’

解决方案:2个

方案一:直接挂载。但是是用逻辑卷的名称挂载。硬盘上的数据还在。

方案二:格式化再挂载。硬盘上的数据清除了。

操作:

方案一:

1、用以下命令,查看服务器物理分区,逻辑卷的信息

# fdisk -l

(前面是物理分区,后面是逻辑卷信息)

2、用以下命令查看逻辑卷的具体信息

# lvdisplay

3、用以下命令将逻辑卷(如:逻辑卷的名称为:/dev/VolGroup/lv_home ,即在第2步中看到的LV Name)挂载在目录(如:/store)下。

# mount /dev/VolGroup/lv_home /store

———————————–方案一 结束————————————

方案二:

1、直接格式化分区

# mkfs -t ext4 -c /dev/sda3

2、挂载硬盘

# mount /dev/sda3 /store

———————————–方案二 结束————————————

v2ray新版本

安装和更新 V2Ray

// 安装可执行文件和 .dat 数据文件
bash <(curl -L https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh)

bash <(curl -L https://ghproxy.com/https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh)

安装最新发行的 geoip.dat 和 geosite.dat

// 只更新 .dat 数据文件
bash <(curl -L https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-dat-release.sh)

移除 V2Ray

bash <(curl -L https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh) --remove
chown -R nobody /var/log/v2ray

https://github.com/v2fly/fhs-install-v2ray/blob/master/README.zh-Hans-CN.md

https://github.com/v2ray/v2ray-core/issues/2022

1、编辑v2ray的服务配置文件

vi /etc/systemd/system/v2ray.service

2、对文件内容做如下修改:

将:

CapabilityBoundingSet=CAP_NET_ADMIN
CAP_NET_BIND_SERVICEAmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE

改为:

#CapabilityBoundingSet=CAP_NET_ADMIN
#CAP_NET_BIND_SERVICEAmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
CapabilityBoundingSet=~
AmbientCapabilities=

3、检查v2ray的端口号,必须设定为大于 1024的端口号才行。

做好以上修改后,执行:service v2ray restart 即可启动成功。

树莓派固件更新(rpi-update)的那些坑

1 简介

rpi-update是一个用于更新树莓派固件的工具,可以通过apt get install rpi-update来安装

一般来说直接执行下面的命令就可以更新固件(扯淡,基本不可能好吗):

sudo rpi-update

2 跳过自更新

rpi-update启动时会更新自己,如果报以下错误:

!!! Failed to download update for rpi-update!
!!! Make sure you have ca-certificates installed and that the time is set correctly

可以尝试一下他说的方法来解决:

#安装CA证书
sudo apt-get install ca-certifacates

#同步时间
sudo apt-get install ntpdate
sudo ntpdate -u ntp.ubuntu.com

如果都不行,直接跳过算了,反正也可以用apt来更新这个工具,没必要让他更新自己。

跳过自更新,直接更新固件的方法:

sudo UPDATE_SELF=0 rpi-update

3 【究极方法】本地更新

即使跳过自更新,下载速度也太慢,还经常断流。可以考虑本地更新:

先在PC上下载固件(可以用一下魔法上网):

curl -L https://github.com/Hexxeh/rpi-firmware/archive/master.tar.gz -o master.tar.gz

然后用scp传到树莓派上的/root目录下,之后ssh连上树莓派:

# 切换到root用户(第一次切到root记得用sudo passwd root激活)
su

# 进入.rpi-firmware目录并解压(如果没有该目录,就创建一个)
mkdir /root/.rpi-firmware
cd /root/.rpi-firmware && tar -xvzf /root/master.tar.gz

# 【注】这一步是我自己加的,可能是遇到了特殊情况。
# 检查一下当前目录中是否有*.elf文件,如果没有,就说明那些文件
# 在当前目录下的一个叫rpi-firmware-master的子目录下
# 把里面的文件全拷贝到当前目录中(/root/.rpi-firmware)
cp ./rpi-firmware-master/* ./

# 执行本地更新
UPDATE_SELF=0 SKIP_DOWNLOAD=1 rpi-update

# 重启
reboot

4 检查

对于树莓派4的一个检查方法:

ls -la /opt/vc/lib

看该目录下是否有libEGL.solibGLESv2.so这两个库,更新前这两个库都是没有的。

如果这两个库出现了,并且是真正的库而不是软链接,就说明更新大概可能也许成功了吧。

5 参考

https://github.com/Hexxeh/rpi-update/issues/253

https://hant.kutu66.com/GitHub/article_82399

识别与 Cloudflare 的代理兼容的网络端口

概述

Cloudflare 默认代理发往下列 HTTP/HTTPS 端口的流量。

Cloudflare 支持的 HTTP 端口:

  • 80
  • 8080
  • 8880
  • 2052
  • 2082
  • 2086
  • 2095

Cloudflare 支持的 HTTPS 端口:

  • 443
  • 2053
  • 2083
  • 2087
  • 2096
  • 8443

如果您的域的流量要发送到上面列出的端口以外的其他端口,则可以:

通过 WAF 规则 ID 100015 针对 Pro、Business 和 Enterprise 域阻止除 80 和 443 以外的其他端口上的流量:”Block requests to all ports except 80 and 443″.

只有端口 80 和 443 可兼容以下服务:

Cloudflare Access 不支持 URL 中的端口号。  系统会从通过 Cloudflare Access 保护的 URL 请求中剥离端口号。


相关资源

https://support.cloudflare.com/hc/zh-cn/articles/200169156-%E8%AF%86%E5%88%AB%E4%B8%8E-Cloudflare-%E7%9A%84%E4%BB%A3%E7%90%86%E5%85%BC%E5%AE%B9%E7%9A%84%E7%BD%91%E7%BB%9C%E7%AB%AF%E5%8F%A3