两台不加入域的主机,进行复制只能使用证书。
两天主机在一个工作组里。
复制makecert.exe到电脑,这个文件可以在安装了VS的电脑里找到。
在主服务器上
1 |
makecert -pe -n "CN=PrimaryTestRootCA" -ss root -sr LocalMachine -sky signature -r "PrimaryTestRootCA.cer" |
1 |
makecert -pe -n "CN=WIN-CM1" -ss My -sr LocalMachine -sky exchange -eku 1.3.6.1.5.5.7.3.1,1.3.6.1.5.5.7.3.2 -in "PrimaryTestRootCA" -is root -ir LocalMachine -sp "Microsoft RSA SChannel Cryptographic Provider" -sy 12 PrimaryTestCert.cer |
在副本服务器上
1 |
makecert -pe -n "CN=ReplicaTestRootCA" -ss root -sr LocalMachine -sky signature -r "ReplicaTestRootCA.cer" |
1 |
makecert -pe -n "CN=WIN-CM2" -ss my -sr LocalMachine -sky exchange -eku 1.3.6.1.5.5.7.3.1,1.3.6.1.5.5.7.3.2 -in "ReplicaTestRootCA" -is root -ir LocalMachine -sp "Microsoft RSA SChannel Cryptographic Provider" -sy 12 ReplicaTestCert.cer |
将文件 ReplicaTestRootCA.cer 从副本服务器复制到主服务器,然后使用以下命令将其导入:
1 |
certutil -addstore -f Root "ReplicaTestRootCA.cer" |
将文件 PrimaryTestRootCA.cer 从主服务器复制到副本服务器,然后使用以下命令将其导入:
1 |
certutil -addstore -f Root "PrimaryTestRootCA.cer" |
取消吊销检查
1 |
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization\FailoverReplication" /v DisableCertRevocationCheck /d 1 /t REG_DWORD /f |
1 |
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization\Replication" /v DisableCertRevocationCheck /d 1 /t REG_DWORD /f |
开启防火墙Hyber-V的有关端口
win+r 输入 mmc 设置后可以管理本地证书