<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>极客记录 &#8211; Simon</title>
	<atom:link href="https://www.luisimon.com/category/%E6%9E%81%E5%AE%A2%E8%AE%B0%E5%BD%95/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.luisimon.com</link>
	<description>blog</description>
	<lastBuildDate>Tue, 10 Dec 2024 01:43:44 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.2</generator>

<image>
	<url>https://www.luisimon.com/wp-content/uploads/2019/09/cbrks-x5t4i-001.ico</url>
	<title>极客记录 &#8211; Simon</title>
	<link>https://www.luisimon.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>TrueNAS Scale系统开启Wake On Lan（网络唤醒）功能（教程）</title>
		<link>https://www.luisimon.com/2023/07/16/727/</link>
		
		<dc:creator><![CDATA[Simon]]></dc:creator>
		<pubDate>Sat, 15 Jul 2023 18:04:42 +0000</pubDate>
				<category><![CDATA[Linux日记]]></category>
		<category><![CDATA[极客记录]]></category>
		<category><![CDATA[FreeNAS]]></category>
		<category><![CDATA[TrueNAS]]></category>
		<category><![CDATA[WOL]]></category>
		<guid isPermaLink="false">https://www.luisimon.com/?p=727</guid>

					<description><![CDATA[Wake-on-LAN简称WOL或WoL，中文多译为“网路唤醒”、“远端唤醒”技术。WOL是一种技术，同时也是 ... <a title="TrueNAS Scale系统开启Wake On Lan（网络唤醒）功能（教程）" class="read-more" href="https://www.luisimon.com/2023/07/16/727/" aria-label="继续阅读TrueNAS Scale系统开启Wake On Lan（网络唤醒）功能（教程）">阅读更多</a>]]></description>
										<content:encoded><![CDATA[
<p><strong>Wake-on-LAN</strong>简称<strong>WOL</strong>或<strong>WoL</strong>，中文多译为“<strong>网路唤醒</strong>”、“<strong>远端唤醒</strong>”技术。WOL是一种技术，同时也是该技术的规范标准，它的功效在于让<a href="https://www.luisimon.com/goto/57h5" rel="nofollow">休眠</a>状态或<a href="https://www.luisimon.com/goto/csi9" rel="nofollow">关机</a>状态的电脑，透过<a href="https://www.luisimon.com/goto/jzy1" rel="nofollow">区域网路</a>的另一台电脑对其发令，使其唤醒、恢复成运作状态，或从关机状态转成<a href="https://www.luisimon.com/goto/gi4s" rel="nofollow">开机</a>状态。该消息通常由在连接到同一局域网的设备上执行的程序发送到目标计算机。也可以使用子网定向广播或 WoL 网关服务从另一个网络发起消息。<strong>——<em>维基百科</em></strong></p>



<p>我使用昂达的一款<strong>昂达B365CD4</strong>主板安装了TrueNAS Scale系统，出于节能减碳的需要，设置了晚上自动关机。清晨使用WOL唤醒机器。</p>



<p>开启WOL共功能</p>



<p>开机，在屏幕出现主板logo或者其他信息的时候按Del进入BIOS</p>



<p><strong>开启PXE功能</strong>，如下图，将<strong>Network Stack</strong>配置下的<strong>Ipv4 PXE Support</strong>设置为<strong>Enable</strong></p>



<figure class="wp-block-image size-large"><img decoding="async" src="https://www.pomato.eu.org/img/20230715_102309-16893922115971.jpg" alt=""/></figure>



<p>开启网卡的WOL功能</p>



<pre class="wp-block-code"><code># 用以下命令查看网卡名称
ifconfig</code></pre>



<pre class="wp-block-code"><code># 添加WOL配置文件
# 这里的eth0需要跟wol唤醒网卡的名称
vim /etc/network/interfaces.d/eth0</code></pre>



<pre class="wp-block-code"><code># 配置文件内容
auto enp8s0
iface enp8s0 inet dhcp
    ethernet-wol g</code></pre>



<p><strong>重新系统后测试是否成功</strong></p>



<p><strong><em>注：如果网络唤醒失效，尝试重新保存eth0文件（猜测是重新保存才能令设置生效，从而系统会按当前设置去修改BIOS）。by Alan</em></strong></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>搭建自己的KMS服务器（教程）</title>
		<link>https://www.luisimon.com/2021/01/31/431/</link>
		
		<dc:creator><![CDATA[Simon]]></dc:creator>
		<pubDate>Sun, 31 Jan 2021 14:37:08 +0000</pubDate>
				<category><![CDATA[极客记录]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[微软]]></category>
		<category><![CDATA[激活]]></category>
		<guid isPermaLink="false">https://www.luisimon.xyz/?p=431</guid>

					<description><![CDATA[今天来介绍一下如何搭建自己的KMS服务器 KMS 是什么 ? KMS的全称是 Key Management S ... <a title="搭建自己的KMS服务器（教程）" class="read-more" href="https://www.luisimon.com/2021/01/31/431/" aria-label="继续阅读搭建自己的KMS服务器（教程）">阅读更多</a>]]></description>
										<content:encoded><![CDATA[
<p>今天来介绍一下如何搭建自己的KMS服务器</p>



<p>KMS 是什么 ?</p>



<p>KMS的全称是 Key Management Service , 即密钥管理服务</p>



<p>KMS是微软认可的一种产品激活方式 , 主要用于企业公司的内部批量激活设备</p>



<p>所以当你想要使用KMS激活时,你安装的Windows或者Office版本 , 一般镜像名中含有VL或Vol字样的即属于批量激活版本</p>



<p class="has-medium-font-size"><strong>KMS搭建</strong></p>



<p>首先我们可以在<a href="https://www.luisimon.com/goto/xsp7" rel="nofollow">https://github.com/Wind4/vlmcsd/releases</a>中下载KMS服务, 下载 binaries.tar.gz</p>


<pre class="EnlighterJSRAW" data-enlighter-language="shell">#解压binaries.tar.gz文件 
tar -xvf binaries.tar.gz 
#进入binaries目录 
cd binaries</pre>
<p></p>


<p>下面你可以根据实际情况选择对应的操作系统，多数服务器选择&nbsp;<code>Linux</code>&nbsp;-&gt;&nbsp;<code>intel</code>&nbsp;-&gt;&nbsp;<code>static</code>&nbsp;-&gt;&nbsp;<code>vlmcsd-x64-musl-static</code>&nbsp;复制到&nbsp;<code>/usr/bin/</code>&nbsp;。 </p>


<pre class="EnlighterJSRAW" data-enlighter-language="shell">#将需要运行的程序复制到/usr/bin/目录并命名为kms(便于记忆)
cp Linux/intel/static/vlmcsd-x64-musl-static /usr/bin/kms
#给kms文件赋予执行权限
chmod 755 /usr/bin/kms
#将需要运行的程序复制到/usr/bin/目录并命名为kms(便于记忆)
cp Linux/intel/static/vlmcsd-x64-musl-static /usr/bin/kms
#给kms文件赋予执行权限
chmod 755 /usr/bin/kms</pre>
<p></p>


<p> 在系统服务中新建&nbsp;<code>kms.service</code>&nbsp;文档 </p>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-1 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:100%">
<pre class="EnlighterJSRAW" data-enlighter-language="shell">vi /lib/systemd/system/kms.service</pre>
<p></p>
</div>
</div>



<p>我们在kms.service添加以下内容 , 其中 <strong>-l /var/log/kms.log</strong> 是指定kms程序的日志文件</p>


<pre class="EnlighterJSRAW" data-enlighter-language="shell">[Unit]
Description=KMS Server By vlmcsd
After=network.target
 
[Service]
Type=forking
PIDFile=/var/run/kms.pid
ExecStart=/usr/bin/kms -p /var/run/kms.pid -l /var/log/kms.log
ExecStop=/bin/kill -HUP $MAINPID
PrivateTmp=true
 
[Install]
WantedBy=multi-user.target</pre>
<p></p>


<p> 重新加载服务，然后启动KMS，启动后查看服务状态，如果成功了将服务设为开机启动。 </p>


<pre class="EnlighterJSRAW" data-enlighter-language="shell">systemctl daemon-reload		# 重载服务
systemctl start kms             # 启动KMS
systemctl status kms		# 查看服务状态
systemctl enable kms		# 设为开机启动</pre>


<p>以上服务安装运行成功后我们需要在防火墙开放其1688端口</p>


<pre class="EnlighterJSRAW" data-enlighter-language="shell">#加添防火墙开放端口1688
firewall-cmd --zone=public --add-port=1688/tcp --permanent
#重新加载防火墙
firewall-cmd --reload
#查看所有防火墙规则
firewall-cmd --list-all</pre>


<p class="has-medium-font-size"><strong>激活Windows</strong></p>



<p>使用管理员权限打开windows的powershell准备激活你的Windows</p>



<p>微软的<a rel="noreferrer noopener" href="https://www.luisimon.com/goto/7em8" rel="nofollow" target="_blank">KMS密钥</a>，请按照你的Windows版本选择适合的密钥（需要安装商业版本）</p>


<pre class="EnlighterJSRAW" data-enlighter-language="shell">#设置刚才搭建的kms服务器
slmgr /skms [你的服务器地址]
#卸载当前的密钥Key(非必要)
slmgr /upk
#安装新的密钥Key,请在网上找到可用的密钥
slmgr /ipk YC7N8-G7WR6-9WR4H-6Y2W4-KBT6X
#激活Windows
slmgr /ato</pre>
<p></p>


<p>这里是微软提供的各个版本软件的<a href="https://www.luisimon.com/goto/4bpq" target="_blank" rel="nofollow noreferrer noopener">KMS激活密钥</a></p>



<p>执行<strong> slmgr /ato</strong> 后系统正在做激活认证处理 ,  稍等片刻后会弹出激活结果 , 通常一分钟内即可完成</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>FreeNAS以QNAP作为UPS主服务器（Master）的坑（威联通NAS配置UPS）</title>
		<link>https://www.luisimon.com/2020/12/19/389/</link>
		
		<dc:creator><![CDATA[Alan]]></dc:creator>
		<pubDate>Fri, 18 Dec 2020 16:09:56 +0000</pubDate>
				<category><![CDATA[极客记录]]></category>
		<category><![CDATA[nas]]></category>
		<category><![CDATA[QNAP]]></category>
		<category><![CDATA[UPS]]></category>
		<category><![CDATA[不间断电源]]></category>
		<category><![CDATA[威联通]]></category>
		<guid isPermaLink="false">https://www.luisimon.xyz/?p=389</guid>

					<description><![CDATA[参考引用：https://post.smzdm.com/p/av7o5r9n/ 服务器端 登录NAS，打开控制 ... <a title="FreeNAS以QNAP作为UPS主服务器（Master）的坑（威联通NAS配置UPS）" class="read-more" href="https://www.luisimon.com/2020/12/19/389/" aria-label="继续阅读FreeNAS以QNAP作为UPS主服务器（Master）的坑（威联通NAS配置UPS）">阅读更多</a>]]></description>
										<content:encoded><![CDATA[
<p>参考引用：<a href="https://www.luisimon.com/goto/hfdq" rel="nofollow">https://post.smzdm.com/p/av7o5r9n/</a></p>



<p><strong>服务器端</strong></p>



<p class="has-text-align-left">登录NAS，打开<strong>控制台</strong>点击<strong>Telnet/SSH</strong>，允许SSH登录。使用XShell登录ssh，或者打开Windows PowerShell直接输入命令登录。</p>



<pre class="wp-block-code"><code>ssh &#91;用户名]@&#91;NAS的IP地址] -p &#91;NAS的SSH端口号]</code></pre>



<p>键入以上命令后，按提示输入“yes”（首次登录，要求验证证书才需要输入，只会不会再提示），再输入密码即可。</p>



<p>UPS相关配置文件位置：/etc/config/ups/</p>



<p class="has-text-align-left">UPS Master配置文件为upsd.conf，其(QNAP)里面主要包含了允许连接的IP列表，默认不允许所有IP连接。</p>



<p><strong>客户端</strong></p>



<p>注意：QNAP的UPS标识符为“qnapups”，而非一般的ups，账号密码请查阅upsd.users。</p>



<p>坑：具体是否允许要以upsd.conf内的允许列表为准，在<strong><mark style="background-color:rgba(0, 0, 0, 0);color:#045a0b" class="has-inline-color">QNAP的web端删除IP重新添加</mark></strong>就出现在了QNAP的upsd.conf中。</p>



<pre class="wp-block-code"><code>#测试连接目录格式
#upsc &#91;标志]@&#91;ip] 
#例如：
upsc qnapups@192.168.1.1
#当连接成功，命令下面会打印对应的UPS电池信息</code></pre>



<figure class="wp-block-image size-large"><img fetchpriority="high" decoding="async" width="1024" height="696" src="https://www.luisimon.com/wp-content/uploads/2020/12/微信截图_20201218235022-1024x696.jpg" alt="" class="wp-image-391" srcset="https://www.luisimon.com/wp-content/uploads/2020/12/微信截图_20201218235022-1024x696.jpg 1024w, https://www.luisimon.com/wp-content/uploads/2020/12/微信截图_20201218235022-300x204.jpg 300w, https://www.luisimon.com/wp-content/uploads/2020/12/微信截图_20201218235022-768x522.jpg 768w, https://www.luisimon.com/wp-content/uploads/2020/12/微信截图_20201218235022.jpg 1090w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<figure class="wp-block-image size-large"><img decoding="async" width="973" height="513" src="https://www.luisimon.com/wp-content/uploads/2020/12/微信截图_20201218234931-1.jpg" alt="" class="wp-image-393" srcset="https://www.luisimon.com/wp-content/uploads/2020/12/微信截图_20201218234931-1.jpg 973w, https://www.luisimon.com/wp-content/uploads/2020/12/微信截图_20201218234931-1-300x158.jpg 300w, https://www.luisimon.com/wp-content/uploads/2020/12/微信截图_20201218234931-1-768x405.jpg 768w" sizes="(max-width: 973px) 100vw, 973px" /></figure>



<p>附加信息：</p>



<pre class="wp-block-code"><code>#在PowerShell登录SSH主机
ssh -p &#91;端口号] &#91;用户名]@&#91;ip]
#upsd.users文件位置
cat /etc/config/ups/upsd.users</code></pre>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
