AMD 黑苹果 Catalina 简单记录

AMD 黑苹果 Catalina

本文主要是记录下在使用 Vanilla 折腾黑苹果过程中的各种问题。

操作主要是根据这里操作的:https://vanilla.amd-osx.com

除非特殊的硬件可能需要旧版外,所有 kext 都尽可能安装新版,旧版存在都问题新版都可能已经修复了,所以遇到问题不妨试试更新。

USB 驱动不完美导致的 USB 蓝牙不工作

描述

板载 USB 母口都能正常工作,但是板载针脚 USB 都不能驱动。

解决方案

先安装 USBInjectAll.kext 然后 打2个补丁

1
2
3
4
5
6
7
Name: com.apple.iokit.IOUSBHostFamily
Find: 83FB0F0F
Replace: 83FB3F0F

Name com.apple.driver.usb.AppleUSBXHCI
Find: 83F90F0F
Replace: 83F93F0F

Rx580 DP 口无法显示

描述

在安装系统时可以使用 DP 口输出内容,而安装完开机进入苹果系统后黑屏。

解决方案

先使用 HDMI 输出,随后使用使用 Clover Configurator 来更新到新版 Lilu.kext、WhateverGreen.kext 即可解决问题。

开机瞬间出现紫色横条

描述

Rx580 在苹果系统开机时出现瞬间的紫色线条,虽然马上就消失,但是很不舒服。

解决方案

还是需要打两个补丁,来源:https://github.com/athlonreg/Common-patches-for-hackintosh/commit/a333627981b83d2a6344391f0cc760dc94ba6b1f

1
2
3
4
5
6
7
Name: AMDSupport
Find: 553B0C90
Replace: 5539C990

Name: AMDSupport
Find: C704B1AA 55AA55
Replace: 90909090 909090

总是卡在 Report this panic

描述

安装过程中总是会提示 Report this panic,其中向上能看到 AppleMCEReporter 或 !A!IMCEReporter 字样

解决方案

安装 AppleMCEReporterDisabler.kext,地址:https://files.amd-osx.com/AppleMCEReporterDisabler.kext.zip

来源:https://amd-osx.com/2019/10/10/macos-catalina-is-on-amd/

添加或移除内存后不能开机

描述

在我给电脑加了两条内存后出现无法开机的状况,找了几个教程都文不对题。

错误提示:

1
2
3
OsxAptioFixDrv: Starting override for System\Library\CoreServices\boot.efi
Using rebloc block:yes,hibernate wake:no
++++++++++++++++++++++++++++++++++++++++

解决方案

进入Windows系统,使用 CPU-Z 生成一份报告,找到 Memory SPD 部分,然后逐个写进去,或者拔掉内存启动电脑用 Clover configure 写好在插上。

1
2
3
4
5
6
7
8
9
DIMM #				1            ==============>>>> 这个是内存插槽编号,写在 config.plist 时记得减 1,写在 Slot
SMBus address 0x50
Memory type DDR4 ==============>>>> 这个是内存类型,直接写在 Type 里就好
Module format UDIMM
Module Manufacturer(ID) CUSO (7F7F7F7F7F7F7F7FBC0000) ==============>>>> 这个是内存厂商,写在 Vendor 里
SDRAM Manufacturer (ID) Micron Technology (2C00000000000000000000)
Size 16384 MBytes ==============>>>> 这个是内存大小,写在 Size 里
Max bandwidth DDR4-2400 (1200 MHz) ==============>>>> 这个是内存频率,写在 Frequency 里
Part number CS4U2400D17161C ==============>>>> 这不知道怎么翻译,写在 Part 里

写下面的东西到,<key>Memory</key> 部分。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
<dict>
<key>Frequency</key>
<integer>内存频率</integer>
<key>Part</key>
<string>F4-3200C16-8GTZR</string>
<key>Size</key>
<integer>内存大小单位是MB</integer>
<key>Slot</key>
<integer>插槽编号</integer>
<key>Type</key>
<string>DDR4</string>
<key>Vendor</key>
<string>厂商</string>
</dict>

下面是我的 内存部分

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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<key>Memory</key>
<dict>
<key>Channels</key>
<integer>2</integer>
<key>Modules</key>
<array>
<dict>
<key>Frequency</key>
<integer>2400</integer>
<key>Part</key>
<string>CS4U2400D17161C</string>
<key>Size</key>
<integer>16384</integer>
<key>Slot</key>
<integer>0</integer>
<key>Type</key>
<string>DDR4</string>
<key>Vendor</key>
<string>CUSO</string>
</dict>
<dict>
<key>Frequency</key>
<integer>2400</integer>
<key>Part</key>
<string>F4-3200C16-8GTZR</string>
<key>Size</key>
<integer>8192</integer>
<key>Slot</key>
<integer>1</integer>
<key>Type</key>
<string>DDR4</string>
<key>Vendor</key>
<string>G.Skill</string>
</dict>
<dict>
<key>Frequency</key>
<integer>2400</integer>
<key>Part</key>
<string>CS4U2400D17161C</string>
<key>Size</key>
<integer>16384</integer>
<key>Slot</key>
<integer>2</integer>
<key>Type</key>
<string>DDR4</string>
<key>Vendor</key>
<string>CUSO</string>
</dict>
<dict>
<key>Frequency</key>
<integer>2400</integer>
<key>Part</key>
<string>F4-3200C16-8GTZR</string>
<key>Size</key>
<integer>8192</integer>
<key>Slot</key>
<integer>3</integer>
<key>Type</key>
<string>DDR4</string>
<key>Vendor</key>
<string>G.Skill</string>
</dict>
</array>
<key>SlotCount</key>
<integer>3</integer>
</dict>

常用 kext 官方主页

不是说从第三方下载不好或者不安全什么的,而是第三方更新可能不及时,很多时候更新能解决你现有的问题。

其他的我用不到或者找不到官方主页就不放了。

使用 overture DNS

使用 overture DNS

  1. 下载 overture 并解压

    https://github.com/shawn1m/overture/releases/ 下载并解压

  2. 编辑配置文件 config.json ,如果使用下面的配置记得删掉所有注释

    下载 gfwlist 和 china_ip_list

    1
    2
    wget https://cokebar.github.io/gfwlist2dnsmasq/gfwlist_domain.txt -O gfwlist_domain.txt
    wget https://raw.githubusercontent.com/17mon/china_ip_list/master/china_ip_list.txt -O china_ip_list.txt
    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
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    {
    "BindAddress": ":53", // 绑定的端口
    "DebugHTTPAddress": "127.0.0.1:5555", // 可以通过 curl 127.0.0.1:5555/cache 查看缓存情况
    "PrimaryDNS": [ // 主DNS
    {
    "Name": "DNSPod",
    "Address": "119.29.29.29:53",
    "Protocol": "udp",
    "SOCKS5Address": "",
    "Timeout": 2,
    "EDNSClientSubnet": {
    "Policy": "disable",
    "ExternalIP": "",
    "NoCookie": true
    }
    },
    {
    "Name": "AliDNS",
    "Address": "223.5.5.5:53",
    "Protocol": "udp",
    "SOCKS5Address": "",
    "Timeout": 2,
    "EDNSClientSubnet": {
    "Policy": "disable",
    "ExternalIP": "",
    "NoCookie": true
    }
    }
    ],
    "AlternativeDNS": [ // 副 DNS
    {
    "Name": "OpenDNS",
    "Address": "208.67.222.222:443",
    "Protocol": "tcp",
    "SOCKS5Address": "",
    "Timeout": 4,
    "EDNSClientSubnet": {
    "Policy": "disable",
    "ExternalIP": "",
    "NoCookie": true
    }
    },
    {
    "Name": "CloudFlareDNS",
    "Address": "one.one.one.one:853@1.1.1.1",
    "Protocol": "tcp-tls",
    "SOCKS5Address": "",
    "Timeout": 4,
    "EDNSClientSubnet": {
    "Policy": "disable",
    "ExternalIP": "",
    "NoCookie": true
    }
    },
    {
    "Name": "GeekDNS",
    "Address": "ndns.233py.com:853",
    "Protocol": "tcp-tls",
    "SOCKS5Address": "",
    "Timeout": 2,
    "EDNSClientSubnet": {
    "Policy": "disable",
    "ExternalIP": "",
    "NoCookie": true
    }
    },
    {
    "Name": "RubyFish",
    "Address": "dns.rubyfish.cn:853",
    "Protocol": "tcp-tls",
    "SOCKS5Address": "",
    "Timeout": 2,
    "EDNSClientSubnet": {
    "Policy": "disable",
    "ExternalIP": "",
    "NoCookie": true
    }
    },
    {
    "Name": "BlahDNS",
    "Address": "dot-jp.blahdns.com:853",
    "Protocol": "tcp-tls",
    "SOCKS5Address": "",
    "Timeout": 2,
    "EDNSClientSubnet": {
    "Policy": "disable",
    "ExternalIP": "",
    "NoCookie": true
    }
    }
    ],
    "OnlyPrimaryDNS": false, // 是否仅使用 主DNS
    "IPv6UseAlternativeDNS": false, // IPv6 使用副 DNS
    "WhenPrimaryDNSAnswerNoneUse": "PrimaryDNS",
    "IPNetworkFile": {
    "Primary": "./china_ip_list.txt",
    "Alternative": ""
    },
    "DomainFile": {
    "Primary": "", // 强制使用主dns解析的域名列表
    "Alternative": "./gfwlist_domain.txt", // 强制使用副dns解析的列表
    "Matcher": "regex-list" // 使用 正则匹配
    },
    "HostsFile": "./hosts", // 自定义 hosts 绑定
    "MinimumTTL": 1200, // 最小缓存存留时间,0 关闭
    "DomainTTLFile": "./domain_ttl_sample", // 域名缓存时间列表
    "CacheSize": 1024, // 缓存大小,0关闭,建议开启
    "RejectQType": [
    255
    ]
    }
  3. 加执行权限

    1
    chmod +x /etc/overture-dns/overture-linux-amd64
  1. 执行

    1
    ./overture-linux-amd64

从 nextcloud URI 中移除 index.php

从 nextcloud URI 中移除 index.php

仅限 Apache

  1. 编辑 nextcloud 配置文件,增加'htaccess.RewriteBase' => '/',

    1
    nano /var/www/nextcloud/config/config.php
  2. 使用 occ 命令更新.htaccess文件

    1
    2
    occ maintenance:update:htaccess
    # .htaccess has been updated
  3. 完成,刷新网页看效果

apt 禁止使用IPv6

apt 禁止使用IPv6

虽然IP v6很好,也开始普及了,但是也仅仅是能够获得IP v6地址和访问部分IP v6网站,路由基本一塌糊涂,apt 更新时经常会在IP v6上卡住,而又不想彻底抛弃IP v6,所以需要禁止 apt 使用IP v6。

1
echo 'Acquire::ForceIPv4 "true";' | tee /etc/apt/apt.conf.d/99force-ipv4

tar 解压遇到的小问题

tar 解压遇到的小问题解决

  1. 报错tar: Ignoring unknown extended header keyword时需要安装bsdtar例如Ubuntuapt install bsdtar,使用bsdtar即可轻松解决问题,参数不需要变,如tar xvf xxx.tar.gz变为bsdtar xvf xxx.tar.gz

  2. 报错Pathname can't be converted from UTF-8 to current locale.时只需要增加--warning=no-unknown-keyword参数即可,如tar xvf xxx.tar.gz变为tar xvf xxx.tar.gz --warning=no-unknown-keyword。解压出来的东西是没问题的,就是可能文件名显示有问题,不过这就是另一回事了。

Ubuntu Server 迁移 Mongodb 数据到 XFS 文件系统

Ubuntu Server 迁移 Mongodb 数据到 XFS 文件系统

XFS 很强,具体有多强需要自己去查资料了,总之Mongodb使用是有好处的。

添加硬盘并格式化

  1. 首先添加一块硬盘,我这里的硬盘为/dev/sdb,并且格式化为 XFS,命令为 mkfs.xfs /dev/sdb
  2. 然后查看是否格式化成功df -Th,这里没有挂载的地址。
  3. 接下来准备修改fstab 文件,使用blkid /dev/sdb获取UUID(UUID比设备名稳定)。
  4. 然后创建一个文件夹用于挂载硬盘,我这里使用的/data
  5. 然后在/etc/fstab添加一行UUID=你的UUID /data xfs defaults,noatime,nobarrier 0 0
  6. 最后执行mount -a如无报错则使用df -Th就能看到已经成功挂载了。

修改配置

  1. 执行service mongodb stop停止服务。
  2. 创建文件夹mkdir /data/db
  3. 编辑/etc/mongodb.conf里的dbpath,修改为dbpath=/data/db

迁移数据

  1. 执行/var/lib/mongodb/* /data/db移动数据。
  2. 然后执行chown mongodb:mongodb -R /data/db恢复权限。

启动

  1. 执行service mongodb start恢复服务。
  2. 执行service mongodb status查看服务运行状态,显示active (running)则启动成功。
  3. 执行mongo查看是否还有XFS的提醒,如果没有则一切OK。

如何转移 MySQL 的数据到 MongoDB

如何转移 MySQL 的数据到 MongoDB

我的系统是 Ubuntu

  1. 安装 ruby

    1
    apt install ruby
  2. 安装 mongoify

    1
    gem install mongoify
  3. 配置数据库

    1. 新建一个database.config

    2. 填写数据库配置

      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      sql_connection do
      adapter "mysql2"
      host "localhost"
      username "root"
      password "passw0rd"
      database "my_database"
      end

      mongodb_connection do
      host "localhost"
      database "my_database"
      end
  4. 检查数据库配置

    1
    2
    3
    4
    5
    mongify check database.config
    # 如果提示 Specified 'mysql' for database adapter, but the gem is not loaded. Add `gem 'mysql'` to your Gemfile 则需要安装 mysql
    # gem install mysql2
    # 如果安装 mysql2 提示:mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h 则需要安装 libmysqlclient-dev
    apt install libmysqlclient-dev

    提示这个即可下一步

    1
    2
    SQL connection works
    NoSQL connection works
  5. 配置转移配置

    1. 先自动生成一个

      1
      mongify translation database.config > translation.rb
    2. 随后开始根据文档修改,或者如果没有需要动的结构直接迁移即可,这是文档地址)。

  6. 开始转移

    1
    mongify process database.config translation.rb

附录

  1. 转移过程中 清理/修改 数据

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    table "sgk" do
    # 修改列名
    column "name1", :string, :rename_to => 'username'
    # 保持原样,未作修改
    column "email", :string
    # 忽略这个列
    column "id", :key, :ignore => true

    # 保存之前操作
    before_save do |row|
    # 清理空格
    if row.username
    row.username = row.username.strip
    end
    end
    end

解决 Ubuntu MySQL 导出文件无法写入

解决 Ubuntu MySQL 导出文件无法写入

错误提示ERROR 1 (HY000): Can't create/write to file '' (Errcode: 13 - Permission denied)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# 查看是否有限制
aa-status | grep mysqld
# 如果有输出则表示有限制

# -----------------------------------

# 编辑配置,给指定的目录增加权限
nano /etc/apparmor.d/usr.sbin.mysqld
# 添加以下内容到/usr/sbin/mysqld {}
/to/path/ r,
/to/path/** rwk,
# 保存

# -----------------------------------
# 重新加载
/etc/init.d/apparmor reload
# 完毕

如何在 Ubuntu 18.04 中修改 DNS

如何在 Ubuntu 18.04 中修改 DNS

  1. 先安装 resolvconf

    1
    sudo apt install resolvconf
  2. 然后编辑配置文件

    编辑/etc/resolvconf/resolv.conf.d/head修改nameserver配置项,内容类似:

    1
    2
    nameserver 8.8.4.4
    nameserver 8.8.8.8
  3. 重启 reslovconf

    1
    sudo service resolvconf restart

解锁网易云音乐

解锁网易云音乐

网易云、QQ音乐等内容全都有版权问题,即使有VIP也不能全听,换APP很烦

搭建

我的环境比较特殊,不一定大家能参考,仅做记录。

我在路由器上把 music.163.cominterface.music.163.com都解析到了我的内网已经搭建了这个服务的主机上,这样整个内网的机器就不需要设置代理了,不然那么多设备设置的要累死了。

  1. 安装 nodejs、git、supervisor

    1
    2
    curl -sL https://deb.nodesource.com/setup_10.x | bash -
    apt install -y nodejs git supervisor
  2. 克隆代码

    1
    2
    3
    git clone https://github.com/nondanee/UnblockNeteaseMusic.git
    # 记录路径
    pwd
  3. 配置 supervisor,替换下面的 /home/pi 为刚才的路径

    1
    2
    3
    4
    5
    6
    7
    8
    9
    [program:unblock]
    command=/usr/bin/node /home/pi/UnblockNeteaseMusic/app.js -p 80
    stdout_logfile=/tmp/UnblockNeteaseMusic.log
    autostart=true
    autorestart=true
    startsecs=5
    priority=1
    stopasgroup=true
    killasgroup=true
  4. 启动

    1
    2
    3
    4
    sudo supervisorctl reload
    # 查看是否运行
    sudo supervisorctl status
    # unblock RUNNING pid 774, uptime 0:10:36
  5. 配置路由器DNS,这个支持的路由器配置起来很简单,如果不支持的路由器也没办法配置

  6. 整个网络的网易云都可以听了

修复黑苹果时间错误

修复黑苹果时间错误

最近在玩黑苹果,但是因为我的 CPU 是动态睿频的,导致 CPU 时间总会出错,每秒钟都会快击败毫秒,并且在使用 safari 浏览器播放视频时声画不同步。在 Clover 中的 CPU 里修改了频率也无效,去掉 NTP 服务器后面的点.也没用,所以想了歪点子,就是加快与 NTP 服务器同步的频率,默认是3600秒,修改为60秒,这样有时间差也不会太夸张,但这个办法不能修复声画不同步。

命令方式

系统版本 >= High Sierra

100%有效, 缺点是不知道为什么每次同步时间,窗口都会失去焦点。 之前的每次都会失去焦点是因为Dynamic dark mode应用导致的,非常完美。

1
2
# 这条命令是每分钟与时间服务器同步一次
while true; do sudo sntp -sS time.asia.apple.com; sleep 60; done

如果报错 kod_init_kod_db(): Cannot open KoD db file /var/db/ntp-kod: No such file or directory 执行下面的命令即可

1
2
sudo touch /var/db/ntp-kod
sudo chmod 666 /var/db/ntp-kod

或者使用crontab

1
2
3
crontab -e
# 每分钟同步一次时间
* * * * * sntp -sS time.asia.apple.com >> /tmp/time_sync.log

修改 plist

打开/System/Library/LaunchDaemons/com.apple.timed.plist,找到StartInterval项,修改360060,重启即可。

附修改好的 plist

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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>GroupName</key>
<string>_timed</string>
<key>JetsamProperties</key>
<dict>
<key>JetsamMemoryLimit</key>
<integer>2500</integer>
<key>JetsamPriority</key>
<integer>-49</integer>
</dict>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>com.apple.timed</string>
<key>LaunchEvents</key>
<dict>
<key>com.apple.systemconfiguration</key>
<dict>
<key>airplane mode changed</key>
<dict>
<key>Identifier</key>
<string>com.apple.radios.plist</string>
<key>KeyPath</key>
<string>AirplaneMode</string>
<key>Value</key>
<false/>
</dict>
</dict>
</dict>
<key>MachServices</key>
<dict>
<key>com.apple.timed.xpc</key>
<true/>
</dict>
<key>POSIXSpawnType</key>
<string>Interactive</string>
<key>ProgramArguments</key>
<array>
<string>/usr/libexec/timed</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>StartInterval</key>
<integer>60</integer>
<key>ThrottleInterval</key>
<integer>3</integer>
<key>UserName</key>
<string>_timed</string>
</dict>
</plist>

参考资料

  1. stackexchange

通过 brew cask 安装 Mac 应用

Mac

通过 brew cask 安装 Mac 应用

1
2
3
4
5
brew cask install dynamic-dark-mode typora mounty ezip balenaetcher visual-studio-code iina mos brooklyn clipy proxyman switchhosts fork google-chrome qlmarkdown v2rayu

# 几乎所有的特殊字体都有了
brew tap caskroom/fonts
brew cask install font-hack-nerd-font

列表

  • dynamic-dark-mode 根据时间自动切换到夜间模式

  • typora 实时 markdown 编辑器,对大纲支持的更好,比 mark-text 更出色

  • mounty 挂载 NTFS 的工具

  • ezip 压缩解压缩的神器

  • balenaetcher 烧录镜像到 U 盘的神器

  • visual-studio-code 强大的代码编辑器 VSCode

  • iina 视频播放器,支持多格式

  • Mos 第三方鼠标滚动顺滑方案,免费且远超收费的 smoothscroll

  • clipy 剪切板增强,历史记录等

  • brooklyn 苹果风格的屏保

  • proxyman HTTP/HTTPS 抓包工具,免费,漂亮,好用

  • switchhosts hosts 文件快速切换编辑

  • fork git 客户端,漂亮,高性能

  • google-chrome 谷歌浏览器

  • qlmarkdown Markdown 快捷预览工具

  • v2rayu V2ray Mac 客户端,支持订阅

设置 sudo 命令不需要密码

设置 sudo 命令不需要密码

1
2
3
4
5
6
# 编辑 sudo 命令权限文件
sudo visudo
# 在最后一行增加
# 要免密码的用户名 ALL=(ALL) NOPASSWD: ALL
# 例如
zhangsan ALL=(ALL) NOPASSWD: ALL

安装 Cloudreve

NAS

安装 Cloudreve

ubuntu 18.04

docker 那个版本总是有问题就算了 (2019/04/16)

之所以要安装是因为长得好看

安装

1
2
# 安装必备内容
apt install mysql-server apache2 php php-curl php-gd php-dom php-mbstring php-zip php-mysql php-mysqli -y

mysql 创建数据库

1
CREATE DATABASE cloudreve CHARACTER SET utf8 COLLATE utf8_general_ci;

安装 composer

1
2
curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer

安装 cloudreve

1
2
cd 你要安装的目录
composer create-project hfo4/cloudreve:dev-master

交互环节

1
2
3
4
5
6
7
8
Do you want to remove the existing VCS (.git, .svn..) history? [Y,n]? # Y
Input the hostname of your MySQL server (Default:127.0.0.1): //数据库连接地址,本的话默认回车
The database name:pan //数据库名称
The username of your MySQL server (Default:root):root //数据库用户名
The password of your MySQL server:mf8.biz //数据库用户密码
The hostport of your MySQL server (Default:3306): //数据库端口,默认回车

The full-url to access to your Cloudreve (e.g. https://pan.aoaoao.me/ , 'http' must be included in the front and '/' must be included at the end): //网站域名, 必须 http:// 或者 https:// 开头, / 结尾

安装完毕

1
2
3
4
5
6
# Congratulations! Cloudreve has been installed successfully.
# Here's some informatioin about yor Cloudreve:
# Homepage: 刚才输入的地址/ //首页地址
# Admin Panel: 刚才输入的地址/Admin //后台地址
# Default username: admin@cloudreve.org //管理员账号
# Default password: admin //管理员密码

备注

  • 如果可以打开首页但是其他页面都无法访问,记得开启 apache2 伪静态

    1
    2
    3
    4
    sudo a2enmod rewrite
    sudo service apache2 restart
    # 替换 AllowOverride None -> AllowOverride All
    sudo nano /etc/apache2/apache2.conf

PVE 安装配置

PVE 安装配置

常见的 PVE 安装配置我就不说了

移除 PVE 企业源

1
2
# 还是不要删除了
mv /etc/apt/sources.list.d/pve-enterprise.list /etc/apt/sources.list.d/pve-enterprise.list.bak

去除订阅提示 6.X

1
sed -i "s/checked_command: function(orig_cmd) {/checked_command: function(orig_cmd) {return;/g" /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js

硬盘直通

1
2
3
4
# 获取硬件ID,找到 硬盘,一般以 ata- 开头
ls -l /dev/disk/by-id/
# qm set 虚拟机ID --硬盘类型和编号 硬件ID
qm set 1000 --sata0 /dev/disk/by-id/ata-WDC_WD3200AAJS-00L7A0_WD-WMAV2C195655

Windows 链接匿名 SMB

Windows 链接匿名 SMB 共享

Windows 10 1709 后默认不允许匿名链接 SMB

解决办法是:

  1. 启用或关闭 Windows 功能

  2. 勾选 “SMB 1.0/CIFS 文件共享支持”

  3. 保存并重启电脑即可

修复 SpaceVim 在 Mac 系统上的乱码

Mac

修复 SpaceVim 在 Mac 系统上的乱码

在 Mac iTerm 上,可能会出现 文字乱码的问题,即使你安装了 Powerlines 系列字体也一样,其原因是缺少 Hack Nerd 字体。

修复办法

首先需要安装字体

1
2
brew tap caskroom/fonts
brew cask install font-hack-nerd-font

然后设置 iTerm

Profile – Text – 勾选 Use different font for non-ASCII text – 在出现的 non-ASCII 中选择 Hack Nerd 字体

重启 iTerm

保存 Git 认证信息

保存 Git 认证信息

如果经常 git pull 而且总是要输入密码信息一定很麻烦

代码

1
2
3
4
5
cd codedir # 跳转到代码目录,确保其中有 .git 文件夹
git config credential.helper store # 开启密码保存功能
git pull # 输入认证信息
git pull # 验证是否需要输入认证信息
# 结束

修复 the following signatures couldn’t be verified because the public key is not available 错误

修复 public key is not available

the following signatures couldn’t be verified because the public key is not available

错误提示:

例如:

1
2
3
Err:6 https://dl.yarnpkg.com/debian stable InRelease

The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 23E7166788B63E1E

解决办法:

1
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 23E7166788B63E1E

PUBKEY 要一致,例如上文中的:23E7166788B63E1E

安装官方版 LEDE 到 virtualbox

安装官方版 LEDE 到 virtualbox

已放弃 Deprecated,已放弃 Deprecated,已放弃 Deprecated, 已改回我最老的 r8000 merlin 性能虽然差,但免折腾

不知为何我在虚拟机中的 koolshare 版本 lede 有奇怪的问题, 例如当开启 v2ray 时, 每隔 8 小时(怀疑与 DHCP 有关) v2ray 必然短链, 且重启插件无效, 日志中都是疯狂的自动重启, 必须要重启系统(koolshare 版 lede)才可以重新连接上 v2ray, 或者是使用 PC Chrome 登陆不上去 Web 配置界面, 必须开启隐私浏览才能登陆或者换其他浏览器(应该是 Chrome 的锅, 但也不爽), 所以有了安装官方版 LEDE 到 virtualbox 的想法, 这肯定是个大坑.

梅林开机自动执行脚本

梅林开机自动执行脚本

  1. 编辑文件
1
vi /jffs/scripts/init-start
  1. 写入要执行的内容
1
2
3
4
#!/bin/sh
# 这里是执行超频到 1400Mhz
nvram set clkfreq=1400,900
nvram commit
  1. 设置权限
1
2
chmod a+rx /jffs/scripts/init-start
# chmod a+rx /jffs/scripts/*