<?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>Other Service (其它服务) &#8211; Eternal Center</title>
	<atom:link href="https://eternalcenter-sep-2022.github.io/category/service/other-service/feed/" rel="self" type="application/rss+xml" />
	<link>https://eternalcenter-sep-2022.github.io/</link>
	<description></description>
	<lastBuildDate>Mon, 05 Sep 2022 14:06:14 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>[内容] /etc/resolv.conf 配置文件的 search 选项</title>
		<link>https://eternalcenter-sep-2022.github.io/etc-resolv-conf-search/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Wed, 10 Aug 2022 15:07:19 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[Other Service (其它服务)]]></category>
		<category><![CDATA[Service (服务)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Network (系统网络)]]></category>
		<category><![CDATA[System Network & System Security & System Log (系统网络 & 系统安全 & 系统日志)]]></category>
		<category><![CDATA[System Operation & System Setting & System Software (系统操作 & 系统设置 & 系统软件)]]></category>
		<category><![CDATA[System Setting (系统设置)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=27527</guid>

					<description><![CDATA[内容一：测试 search 选项的配置 内容二：测试 search 选项 2.1 查询 zhumingyu （补充：当查询 zhumingyu 时，也就是中间没有点 “.”，则默认会被视为查询主机名，会先依次把 eternalcenter.com、local 和 new 作为后缀添加到 zhumingyu 后进行查询，最后才查询 zhumingyu） 2.2 zhumingyu.com （补充：当查询 zhumingyu.com 时，也就是中间有 1 个点 “.”，则默认会被视为查询域名，会先查询 mingyuzhu.com，如果查询失败，则会先依次把 eternalcenter.com、local 和 new 作为后缀添加到 zhumingyu 后进行查询） 2.3 查询 zhumingyu.com. （补充：当查询 zhumingyu.com. 时，也就是末尾有 1 个点 “.”，默认会被视为查询域名，且只会查询这个域名。不会查询 search 里的每 1 项）]]></description>
										<content:encoded><![CDATA[
<h3>内容一：测试 search 选项的配置</h3>



<pre class="wp-block-code"><code># cat /etc/resolv.conf
search eternalcenter.com local new
nameserver 8.8.8.8</code></pre>



<h3>内容二：测试 search 选项</h3>



<h4>2.1 查询 zhumingyu</h4>



<pre class="wp-block-code"><code># host -a zhumingyu
Trying "zhumingyu.eternalcenter.com"
Trying "zhumingyu.local"
Trying "zhumingyu.new"
Trying "zhumingyu"
Host zhumingyu not found: 3(NXDOMAIN)
Received 102 bytes from 8.8.8.8#53 in 62 ms</code></pre>



<p>（补充：当查询 zhumingyu 时，也就是中间没有点 “.”，则默认会被视为查询主机名，会先依次把 eternalcenter.com、local 和 new 作为后缀添加到 zhumingyu 后进行查询，最后才查询 zhumingyu）</p>



<h4>2.2 zhumingyu.com</h4>



<pre class="wp-block-code"><code># host -a zhumingyu.com
Trying "zhumingyu.com"
Received 31 bytes from 1.1.1.1#53 in 217 ms
Trying "zhumingyu.com.eternalcenter.com"
Trying "zhumingyu.com.local"
Trying "zhumingyu.com.new"
Host zhumingyu.com.new not found: 4(NOTIMP)
Received 35 bytes from 1.1.1.1#53 in 218 ms</code></pre>



<p>（补充：当查询 zhumingyu.com 时，也就是中间有 1 个点 “.”，则默认会被视为查询域名，会先查询 mingyuzhu.com，如果查询失败，则会先依次把 eternalcenter.com、local 和 new 作为后缀添加到 zhumingyu 后进行查询）</p>



<h4>2.3 查询 zhumingyu.com.</h4>



<pre class="wp-block-code"><code># host -a zhumingyu.com.
Trying "zhumingyu.com"
Host zhumingyu.com not found: 4(NOTIMP)
Received 31 bytes from 1.1.1.1#53 in 204 ms
Received 31 bytes from 1.1.1.1#53 in 204 ms</code></pre>



<p>（补充：当查询 zhumingyu.com. 时，也就是末尾有 1 个点 “.”，默认会被视为查询域名，且只会查询这个域名。不会查询 search 里的每 1 项）</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[命令] Linux 命令 dig （从 DNS 服务器获取主机信息）</title>
		<link>https://eternalcenter-sep-2022.github.io/dig/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Fri, 29 Jul 2022 08:22:42 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[Other Service (其它服务)]]></category>
		<category><![CDATA[Service (服务)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Network (系统网络)]]></category>
		<category><![CDATA[System Network & System Security & System Log (系统网络 & 系统安全 & 系统日志)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=27453</guid>

					<description><![CDATA[内容一：dig 命令简介 dig 即 domain information groper，主要功能是从 DNS 服务器获取主机信息 内容二：dig 命令的使用案例 2.1 案例一：显示互联网上所有 DNS 根服务器的信息 2.2 案例二：直接通过域名获取主机信息 （补充：这里以通过 eternalcenter.com 域名获取主机信息为例） 2.3 案例三：直接通过域名获取主机信息，但只显示最基础的内容 （补充：这里以通过 eternalcenter.com 域名获取主机信息为例） 2.4 案例四：直接通过域名获取主机信息，并指定显示的内容 （补充：这里以通过 eternalcenter.com 域名获取主机信息，并显示 noall 和 answer 部分的内容为例） 2.5 案例五：从指定的 DNS 服务器和端口号通过域名获取主机信息 （补充：这里以通过 eternalcenter.com 域名从 IP 地址是 8.8.8.8 端口是 53 的 DNS 服务器获取主机信息为例） 2.6 案例六：通过 IP 地址获取主机信息 （补充：这里以通过 IP &#8230; <p class="link-more"><a href="https://eternalcenter-sep-2022.github.io/dig/" class="more-link">Continue reading<span class="screen-reader-text"> "[命令] Linux 命令 dig （从 DNS 服务器获取主机信息）"</span></a></p>]]></description>
										<content:encoded><![CDATA[
<h3>内容一：dig 命令简介</h3>



<p>dig 即 domain information groper，主要功能是从 DNS 服务器获取主机信息</p>



<h3>内容二：dig 命令的使用案例</h3>



<h4>2.1 案例一：显示互联网上所有 DNS 根服务器的信息</h4>



<pre class="wp-block-code"><code># dig</code></pre>



<h4>2.2 案例二：直接通过域名获取主机信息</h4>



<pre class="wp-block-code"><code># dig eternalcenter.com</code></pre>



<p>（补充：这里以通过 eternalcenter.com 域名获取主机信息为例）</p>



<h4>2.3 案例三：直接通过域名获取主机信息，但只显示最基础的内容</h4>



<pre class="wp-block-code"><code># dig eternalcenter.com +short</code></pre>



<p>（补充：这里以通过 eternalcenter.com 域名获取主机信息为例）</p>



<h4>2.4 案例四：直接通过域名获取主机信息，并指定显示的内容</h4>



<pre class="wp-block-code"><code># dig eternalcenter.com +noall +answer</code></pre>



<p>（补充：这里以通过 eternalcenter.com 域名获取主机信息，并显示 noall 和 answer 部分的内容为例）</p>



<h4>2.5 案例五：从指定的 DNS 服务器和端口号通过域名获取主机信息</h4>



<pre class="wp-block-code"><code># dig @8.8.8.8 -p 53 eternalcenter.com</code></pre>



<p>（补充：这里以通过 eternalcenter.com 域名从 IP 地址是 8.8.8.8 端口是 53 的 DNS 服务器获取主机信息为例）</p>



<h4>2.6 案例六：通过 IP 地址获取主机信息</h4>



<pre class="wp-block-code"><code># dig -x 8.8.8.8</code></pre>



<p>（补充：这里以通过 IP 地址 8.8.8.8 获取主机信息为例）</p>



<h4>2.7 案例七：通过 IP 地址获得主机信息，但只显示最基础的内容</h4>



<pre class="wp-block-code"><code># dig -x 8.8.8.8  +short</code></pre>



<p>（补充：这里以通过 IP 地址 8.8.8.8 获取主机信息为例）</p>



<h4>2.8 案例八：直接通过域名获取主机信息，同时显示获取的过程</h4>



<pre class="wp-block-code"><code># dig eternalcenter.com +trace</code></pre>



<p>（补充：这里以通过 eternalcenter.com 域名获取主机信息为例）</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[排错] 解决 Red Hat Satellite 发布新版本 Content Views 时报错 “Unable to find content with the ID &#8220;&#8230;&#8230;&#8221;”</title>
		<link>https://eternalcenter-sep-2022.github.io/debug-unable-to-find-content-with-the-id/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Wed, 13 Jul 2022 07:10:59 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[Other Service (其它服务)]]></category>
		<category><![CDATA[Red Hat Satellite]]></category>
		<category><![CDATA[Service (服务)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=26764</guid>

					<description><![CDATA[报错代码 分析 当 Content Views 里包含有问题的软件源时，发布新版本 Content View 时就会报此类错误 解决方法 步骤一：根据报错时出现的 ID 显示出问题的软件名称 （补充：这里以显示 ID 9210 的软件名称为例） 步骤二：给服务器系统打一个快照 （步骤略） 步骤三：强制停止出问题的任务 Monitor &#8211;&#62; Tasks &#8211;&#62; Paused &#8211;&#62; &#8220;select the task which publish a new Content View version&#8221; &#8211;&#62; Cancel (注意：操作前需要确保左上角的组织是否正确) 或者： 步骤三：将出问题的软件源从要布新版本的 Content Views 里删除 Content &#8211;&#62; Content Views &#8211;&#62; &#8220;select the Content View which whill &#8230; <p class="link-more"><a href="https://eternalcenter-sep-2022.github.io/debug-unable-to-find-content-with-the-id/" class="more-link">Continue reading<span class="screen-reader-text"> "[排错] 解决 Red Hat Satellite 发布新版本 Content Views 时报错 “Unable to find content with the ID &#8220;&#8230;&#8230;&#8221;”"</span></a></p>]]></description>
										<content:encoded><![CDATA[
<h1>报错代码</h1>



<pre class="wp-block-code"><code>Unable to find content with the ID "......"</code></pre>



<h1>分析</h1>



<p>当 Content Views 里包含有问题的软件源时，发布新版本 Content View 时就会报此类错误</p>



<h1>解决方法</h1>



<h3>步骤一：根据报错时出现的 ID 显示出问题的软件名称</h3>



<pre class="wp-block-code"><code># su - postgres -c "psql candlepin -c \"select uuid, content_id, contentUrl, label, type, vendor from cp2_content where content_id = '9210'\""</code></pre>



<p>（补充：这里以显示 ID 9210 的软件名称为例）</p>



<h3>步骤二：给服务器系统打一个快照</h3>



<p>（步骤略）</p>



<h3>步骤三：强制停止出问题的任务</h3>



<p>Monitor &#8211;&gt; Tasks &#8211;&gt; Paused &#8211;&gt; &#8220;select the task which publish a new Content View version&#8221; &#8211;&gt; Cancel</p>



<p>(注意：操作前需要确保左上角的组织是否正确)</p>



<p>或者：</p>



<div class="wp-container-1 wp-block-buttons">
<div class="wp-block-button aligncenter is-style-outline"><a class="wp-block-button__link" href="https://eternalcenter-sep-2022.github.io/red-hat-satellite-task-forced-stop/" style="border-radius:0px">Red Hat Satellite 无法停止任务的强制停止</a></div>
</div>



<h3>步骤三：将出问题的软件源从要布新版本的 Content Views 里删除</h3>



<p>Content &#8211;&gt; Content Views &#8211;&gt; &#8220;select the Content View which whill publish a new version&#8221; &#8211;&gt; Yum Content &#8211;&gt; Repository &#8211;&gt; &#8220;select the repository which is error&#8221; &#8211;&gt; Remove Repositories</p>



<h3>步骤四：重新发布新版本的 Content Views</h3>



<p>（步骤略）</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[内容] SUSE Repository Mirroring Tool (RMT) 服务端的设置 （软件源）</title>
		<link>https://eternalcenter-sep-2022.github.io/suse-repository-mirroring-tool-rmt-server-repository-source/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Mon, 27 Jun 2022 07:28:40 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[Other Service (其它服务)]]></category>
		<category><![CDATA[Service (服务)]]></category>
		<category><![CDATA[SUSE Repository Mirroring Tool (RMT)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=26221</guid>

					<description><![CDATA[内容一：显示软件源 1.1 显示所有的 SUSE 软件源产品 1.2 显示所有已经启用的 SUSE 软件源产品 1.3 显示所有指定版本且指定架构的 SUSE 软件源产品 （补充：这里以显示所有 15.4 版本且 x86_64 架构的 SUSE 软件源产品为例） 1.4 显示所有已启用指定版本且指定架构的 SUSE 软件源产品 （补充：这里以显示所有已其应用 15.4 版本且 x86_64 架构的 SUSE 软件源产品为例） 内容二：启用软件源 2.1 启用某个软件源 或者： 2.2 开启所有指定版本且指定架构的 SUSE 软件源产品 （补充：这里以开启所有 15.4 版本且 x86_64 架构的 SUSE 软件源产品） 内容三：取消启用软件源 3.1 取消启用某个软件源 或者： 3.2 取消所有指定版本且指定架构的 SUSE 软件源产品 （补充：这里以取消开启所有 &#8230; <p class="link-more"><a href="https://eternalcenter-sep-2022.github.io/suse-repository-mirroring-tool-rmt-server-repository-source/" class="more-link">Continue reading<span class="screen-reader-text"> "[内容] SUSE Repository Mirroring Tool (RMT) 服务端的设置 （软件源）"</span></a></p>]]></description>
										<content:encoded><![CDATA[
<h3>内容一：显示软件源</h3>



<h4>1.1 显示所有的 SUSE 软件源产品</h4>



<pre class="wp-block-code"><code># rmt-cli products list --all</code></pre>



<h4>1.2 显示所有已经启用的 SUSE 软件源产品</h4>



<pre class="wp-block-code"><code># rmt-cli products list</code></pre>



<h4>1.3 显示所有指定版本且指定架构的 SUSE 软件源产品</h4>



<pre class="wp-block-code"><code># rmt-cli products list --all --version=15.4 --arch=x86_64</code></pre>



<p>（补充：这里以显示所有 15.4 版本且 x86_64 架构的 SUSE 软件源产品为例）</p>



<h4>1.4 显示所有已启用指定版本且指定架构的 SUSE 软件源产品</h4>



<pre class="wp-block-code"><code># rmt-cli products list --version=15.4 --arch=x86_64</code></pre>



<p>（补充：这里以显示所有已其应用 15.4 版本且 x86_64 架构的 SUSE 软件源产品为例）</p>



<h3>内容二：启用软件源</h3>



<h4>2.1 启用某个软件源</h4>



<pre class="wp-block-code"><code># rmt-cli products enable &lt;id&gt;</code></pre>



<p>或者：</p>



<pre class="wp-block-code"><code># rmt-cli products enable &lt;string&gt;</code></pre>



<h4>2.2 开启所有指定版本且指定架构的 SUSE 软件源产品</h4>



<pre class="wp-block-code"><code># for i in `rmt-cli products list --all --version=15.4 --arch=x86_64 | awk '{print $2}' | egrep -v '\||ID|^$'`;do rmt-cli products enable $i;done</code></pre>



<p>（补充：这里以开启所有 15.4 版本且 x86_64 架构的 SUSE 软件源产品）</p>



<h3>内容三：取消启用软件源</h3>



<h4>3.1 取消启用某个软件源</h4>



<pre class="wp-block-code"><code># rmt-cli products disable &lt;id&gt;</code></pre>



<p>或者：</p>



<pre class="wp-block-code"><code># rmt-cli products disable &lt;string&gt;</code></pre>



<h4>3.2 取消所有指定版本且指定架构的 SUSE 软件源产品</h4>



<pre class="wp-block-code"><code># for i in `rmt-cli products list --all --version=15.4 --arch=x86_64 | awk '{print $2}' | egrep -v '\||ID|^$'`;do rmt-cli products disable $i;done</code></pre>



<p>（补充：这里以取消开启所有 15.4 版本且 x86_64 架构的 SUSE 软件源产品）</p>



<h1>参考文献：</h1>



<p class="has-text-align-center">https://documentation.suse.com/sles/15-SP4/single-html/SLES-rmt/index.html#sec-rmt-tools-rmt-cli</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[内容] PXE 装机模板中软件的删除 （openSUSE &#038; SLE 版）</title>
		<link>https://eternalcenter-sep-2022.github.io/pxe-remove-opensuse-sle/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Tue, 21 Jun 2022 07:33:42 +0000</pubDate>
				<category><![CDATA[Other Service (其它服务)]]></category>
		<category><![CDATA[Pre-boot Execution Environment (PXE)]]></category>
		<category><![CDATA[Service (服务)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=25945</guid>

					<description><![CDATA[（补充：这里以删除 httpd 软件为例）]]></description>
										<content:encoded><![CDATA[
<pre class="wp-block-code"><code># mv /var/run/zypp.pid /var/run/zypp.sav
# /usr/bin/zypper remove httpd
# mv /var/run/zypp.sav /var/run/zypp.pid</code></pre>



<p>（补充：这里以删除 httpd 软件为例）</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[步骤] Red Hat Satellite 无法停止任务的强制停止</title>
		<link>https://eternalcenter-sep-2022.github.io/red-hat-satellite-task-forced-stop/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Thu, 09 Jun 2022 11:43:29 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[Other Service (其它服务)]]></category>
		<category><![CDATA[Red Hat Satellite]]></category>
		<category><![CDATA[Service (服务)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=23740</guid>

					<description><![CDATA[步骤一：打一个快照 （步骤略） 步骤二：显示运行结果是错误的任务 （补充：从这里可以看出运行结果是错误的任务标签是 Actions::Katello::ContentView::Publish） 步骤三：强制停止 Red Hat Satellite 无法停止的任务 （补充：这里以强制停止标签为 Actions::Katello::ContentView::Publish 的任务为例）]]></description>
										<content:encoded><![CDATA[
<h3>步骤一：打一个快照</h3>



<p>（步骤略）</p>



<h3>步骤二：显示运行结果是错误的任务</h3>



<pre class="wp-block-code"><code># sudo su - postgres -c "psql -d foreman -c 'select label,count(label),state,result from foreman_tasks_tasks where state &lt;&gt; '\''stopped'\'' group by label,state,result ORDER BY label;'"
                        label                         | count |   state   | result  
------------------------------------------------------+-------+-----------+---------
 Actions::Katello::ContentView::Publish               |     1 | paused    | error
 ......</code></pre>



<p>（补充：从这里可以看出运行结果是错误的任务标签是 Actions::Katello::ContentView::Publish）</p>



<h3>步骤三：强制停止 Red Hat Satellite 无法停止的任务</h3>



<pre class="wp-block-code"><code># foreman-rake foreman_tasks:cleanup TASK_SEARCH='label = Actions::Katello::ContentView::Publish' STATES='paused' VERBOSE=true</code></pre>



<p>（补充：这里以强制停止标签为 Actions::Katello::ContentView::Publish 的任务为例）</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[步骤] Red Hat Satellite Content View 信息的显示</title>
		<link>https://eternalcenter-sep-2022.github.io/red-hat-satellite-cv-display/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Fri, 27 May 2022 06:38:38 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[Other Service (其它服务)]]></category>
		<category><![CDATA[Red Hat Satellite]]></category>
		<category><![CDATA[Service (服务)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=23638</guid>

					<description><![CDATA[步骤一：显示所有 Content View 的 ID 步骤二：显示某 1 个 Content View 的详细信息 （补充：这里以显示 ID 为 10 的 Content View 的信息为例）]]></description>
										<content:encoded><![CDATA[
<h3>步骤一：显示所有 Content View 的 ID</h3>



<pre class="wp-block-code"><code># hammer content-view list

----------------|---------------------------|--------------------------------------|-----------|---------------------|---------------------------------------------------------------------------------
CONTENT VIEW ID | NAME                      | LABEL                                | COMPOSITE | LAST PUBLISHED      | REPOSITORY IDS                                                                  
----------------|---------------------------|--------------------------------------|-----------|---------------------|---------------------------------------------------------------------------------
10              | test_CV                   | test_CV                              | false     | 2022/06/23 20:20:20 | 61525, 16812, 61524, 16814, 16813, 16811, 16816, 16817, 6578, 231, 8, 9, 131,...</code></pre>



<h3>步骤二：显示某 1 个 Content View 的详细信息</h3>



<pre class="wp-block-code"><code># hammer content-view info --id 10</code></pre>



<p>（补充：这里以显示 ID 为 10 的 Content View 的信息为例）</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[内容] SUSE Repository Mirroring Tool (RMT) 服务端的设置 （网络代理）</title>
		<link>https://eternalcenter-sep-2022.github.io/rmt-proxy/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Thu, 28 Apr 2022 11:26:11 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[Other Service (其它服务)]]></category>
		<category><![CDATA[Service (服务)]]></category>
		<category><![CDATA[SUSE Repository Mirroring Tool (RMT)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=23351</guid>

					<description><![CDATA[将部分内容修改如下： （补充：这里以将网络代理网址设置为 https://eternalcenter-sep-2022.github.io，网络代理端口设置为/ 8000，不使用密码为例）]]></description>
										<content:encoded><![CDATA[
<pre class="wp-block-code"><code># vim /etc/rmt.conf</code></pre>



<p>将部分内容修改如下：</p>



<pre class="wp-block-code"><code>http_client:
  verbose: false
  proxy: https://eternalcenter-sep-2022.github.io:8000/
  proxy_auth: 
  proxy_user: 
  proxy_password: </code></pre>



<p>（补充：这里以将网络代理网址设置为 https://eternalcenter-sep-2022.github.io，网络代理端口设置为/ 8000，不使用密码为例）</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[步骤] Red Hat Satellite 打补丁或升级</title>
		<link>https://eternalcenter-sep-2022.github.io/red-hat-satellite-patch-upgrade/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Mon, 25 Apr 2022 09:01:00 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[Other Service (其它服务)]]></category>
		<category><![CDATA[Red Hat Satellite]]></category>
		<category><![CDATA[Service (服务)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=23278</guid>

					<description><![CDATA[步骤一：备份系统 1.1 关闭 Red Hat Satellite 服务 1.2 备份系统 （补充：这里以备份虚拟环境下的 Red Hat Satellite 为例） 1.2.1 关闭系统 1.2.2 给系统打快照 （步骤略） 1.2.3 启动系统 （步骤略） 步骤二：升级 Red Hat Satellite 或给 Red Hat Satellite 打补丁 2.1 检测可升级 RedHat Satellite 版本 2.2 预检测升级 Red Hat Satellite 或给 Red Hat Satellite 打补丁是否能成功 （注意：如果是升级 Red Hat Satellite 的话就指定最新的版本，如果是给 Red Hat Satellite 打补丁的话就选择当前的版本） &#8230; <p class="link-more"><a href="https://eternalcenter-sep-2022.github.io/red-hat-satellite-patch-upgrade/" class="more-link">Continue reading<span class="screen-reader-text"> "[步骤] Red Hat Satellite 打补丁或升级"</span></a></p>]]></description>
										<content:encoded><![CDATA[
<h3>步骤一：备份系统</h3>



<h4>1.1 关闭 Red Hat Satellite 服务</h4>



<pre class="wp-block-code"><code># satellite-maintain service stop</code></pre>



<h4>1.2 备份系统</h4>



<p>（补充：这里以备份虚拟环境下的 Red Hat Satellite 为例）</p>



<h5>1.2.1 关闭系统</h5>



<pre class="wp-block-code"><code># poweroff</code></pre>



<h5>1.2.2 给系统打快照</h5>



<p>（步骤略）</p>



<h5>1.2.3 启动系统</h5>



<p>（步骤略）</p>



<h3>步骤二：升级 Red Hat Satellite 或给 Red Hat Satellite 打补丁</h3>



<h4>2.1 检测可升级 RedHat Satellite 版本</h4>



<pre class="wp-block-code"><code># satellite-maintain upgrade list-versions</code></pre>



<h4>2.2 预检测升级 Red Hat Satellite 或给 Red Hat Satellite 打补丁是否能成功</h4>



<pre class="wp-block-code"><code># satellite-maintain upgrade check --target-version 6.10.z</code></pre>



<p>（注意：如果是升级 Red Hat Satellite 的话就指定最新的版本，如果是给 Red Hat Satellite 打补丁的话就选择当前的版本）</p>



<p>（补充：这里以指定 6.10.z 版本的 Red Hat Satellite 为例）</p>



<h4>2.3 升级 Red Hat Satellite 或给 Red Hat Satellite 打补丁</h4>



<pre class="wp-block-code"><code># satellite-maintain upgrade run --target-version 6.10.z</code></pre>



<p>（<br>注意：<br>1) 只有当预检测升级 Red Hat Satellite 或给 Red Hat Satellite 打补丁成功后才能接着执行此步骤<br>2) 如果是升级 Red Hat Satellite 的话就指定最新的版本，如果是给 Red Hat Satellite 打补丁的话就选择当前的版本<br>）</p>



<p>（补充：这里以指定 6.10.z 版本的 Red Hat Satellite 为例）</p>



<h3>步骤三：重启 Red Hat Satellite</h3>



<h4>3.1 关闭 Red Hat Satellite 服务</h4>



<pre class="wp-block-code"><code># satellite-maintain service stop</code></pre>



<h4>3.2 重启 Red Hat Satellite</h4>



<pre class="wp-block-code"><code># reboot</code></pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[[内容] Linux 官方软件库列表 （RHEL 8 版）</title>
		<link>https://eternalcenter-sep-2022.github.io/official-software-repository-list-rhel/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Sat, 23 Apr 2022 15:24:12 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[Other Service (其它服务)]]></category>
		<category><![CDATA[Red Hat Satellite]]></category>
		<category><![CDATA[Service (服务)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Operation & System Setting & System Software (系统操作 & 系统设置 & 系统软件)]]></category>
		<category><![CDATA[System Software (系统软件)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=23248</guid>

					<description><![CDATA[内容一：基础软件源 内容二：Red Hat Satellite Tool 软件源 （补充：这里以 Red Hat Satellite Tool 6.10 软件源为例）]]></description>
										<content:encoded><![CDATA[
<h3>内容一：基础软件源</h3>



<pre class="wp-block-code"><code>rhel-8-for-x86_64-baseos-rpms</code></pre>



<pre class="wp-block-code"><code>rhel-8-for-x86_64-appstream-rpms</code></pre>



<h3>内容二：Red Hat Satellite Tool 软件源</h3>



<pre class="wp-block-code"><code>satellite-tools-6.10-for-rhel-8-x86_64-rpms</code></pre>



<p>（补充：这里以 Red Hat Satellite Tool 6.10 软件源为例）</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[内容] 全球公共免费 DNS</title>
		<link>https://eternalcenter-sep-2022.github.io/free-dns/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Thu, 14 Apr 2022 15:24:23 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[Other Service (其它服务)]]></category>
		<category><![CDATA[Service (服务)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Network (系统网络)]]></category>
		<category><![CDATA[System Network & System Security & System Log (系统网络 & 系统安全 & 系统日志)]]></category>
		<category><![CDATA[System Operation & System Setting & System Software (系统操作 & 系统设置 & 系统软件)]]></category>
		<category><![CDATA[System Setting (系统设置)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=23164</guid>

					<description><![CDATA[AdGuard Cloudflare COMODO DNS Watch Dyn Level 3 Neustar FreeDNS Google OpenDNS SAFEDNS Symantec]]></description>
										<content:encoded><![CDATA[
<h3>AdGuard</h3>



<pre class="wp-block-code"><code>94.140.14.14
94.140.14.15
94.140.15.15
94.140.15.16</code></pre>



<h3>Cloudflare</h3>



<pre class="wp-block-code"><code>1.0.0.1
1.0.0.2
1.0.0.3
1.1.1.1
1.1.1.2
1.1.1.3</code></pre>



<h3>COMODO</h3>



<pre class="wp-block-code"><code>8.20.247.20
8.26.56.26</code></pre>



<h3>DNS Watch</h3>



<pre class="wp-block-code"><code>84.200.69.80
84.200.70.40</code></pre>



<h3>Dyn</h3>



<pre class="wp-block-code"><code>216.146.35.35
216.146.36.36</code></pre>



<h3>Level 3</h3>



<pre class="wp-block-code"><code>209.244.0.3
209.244.0.4</code></pre>



<h3>Neustar</h3>



<pre class="wp-block-code"><code>156.154.70.1
156.154.71.1</code></pre>



<h3>FreeDNS</h3>



<pre class="wp-block-code"><code>37.235.1.174
37.235.1.177</code></pre>



<h3>Google</h3>



<pre class="wp-block-code"><code>8.8.4.4
8.8.8.8</code></pre>



<h3>OpenDNS</h3>



<pre class="wp-block-code"><code>208.67.220.220
208.67.222.222</code></pre>



<h3>SAFEDNS</h3>



<pre class="wp-block-code"><code>195.46.39.39
195.46.39.40</code></pre>



<h3>Symantec</h3>



<pre class="wp-block-code"><code>199.85.126.10
199.85.137.10</code></pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[排错] 解决 Linux 日志报错：“hash:/etc/aliases is unavailable.open database /etc/aliases.db” 或者 “error: open database /etc/aliases.db: No such file or directory”</title>
		<link>https://eternalcenter-sep-2022.github.io/debug-hash-etc-aliases-is-unavailable-open-database-etc-aliases-db-or-error-open-database-etc-aliases-db-no-such-file-or-directory/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Mon, 04 Apr 2022 09:54:35 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[Mail]]></category>
		<category><![CDATA[Other Service (其它服务)]]></category>
		<category><![CDATA[Service (服务)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Operation (系统操作)]]></category>
		<category><![CDATA[System Operation & System Setting & System Software (系统操作 & 系统设置 & 系统软件)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=22729</guid>

					<description><![CDATA[报错代码 或者： 解决方法]]></description>
										<content:encoded><![CDATA[
<h3>报错代码</h3>



<pre class="wp-block-code"><code>hash:/etc/aliases is unavailable.open database /etc/aliases.db</code></pre>



<p>或者：</p>



<pre class="wp-block-code"><code>error: open database /etc/aliases.db: No such file or directory</code></pre>



<h3>解决方法</h3>



<pre class="wp-block-code"><code># newaliases</code></pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[排错] 解决 openSUSE &#038; SLE 升级系统时报错 “Can&#8217;t get available migrations from server: SUSE::Connect::ApiError: Multiple base products found:&#8230;&#8230;”</title>
		<link>https://eternalcenter-sep-2022.github.io/debug-cant-get-available-migrations-from-server-suseconnectapierror-multiple-base-products-found/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Thu, 03 Mar 2022 08:00:33 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[Other Service (其它服务)]]></category>
		<category><![CDATA[Service (服务)]]></category>
		<category><![CDATA[SUSE Repository Mirroring Tool (RMT)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Computer & System Hardware & System Installation & System Upgradation (系统电脑 & 系统硬件 & 系统安装 & 系统升级)]]></category>
		<category><![CDATA[System Upgradation (系统升级)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=22328</guid>

					<description><![CDATA[报错代码 分析 当上一次升级失败或者升级回滚了以后可能会报此类错误 解决方法 方法一：通过 SUSEConnect 命令回滚 1.1 通过 SUSEConnect 命令回滚 # SUSEConnect &#8211;rollback 1.2 重新升级 （步骤略） 步骤二：取消注册再重新注册 2.1 取消注册再重新注册 （步骤略） 2.2 重新升级 （步骤略） 参考文献： https://www.suse.com/support/kb/doc/?id=000019523]]></description>
										<content:encoded><![CDATA[
<h2>报错代码</h2>



<pre class="wp-block-code"><code>Can't get available migrations from server: SUSE::Connect::ApiError: Multiple base products found: ......</code></pre>



<h2>分析</h2>



<p>当上一次升级失败或者升级回滚了以后可能会报此类错误</p>



<h2>解决方法</h2>



<h3>方法一：通过 SUSEConnect 命令回滚</h3>



<h4>1.1 通过 SUSEConnect 命令回滚</h4>



<p># SUSEConnect &#8211;rollback</p>



<h4>1.2 重新升级</h4>



<p>（步骤略）</p>



<h3>步骤二：取消注册再重新注册</h3>



<h4>2.1 取消注册再重新注册</h4>



<p>（步骤略）</p>



<h4>2.2 重新升级</h4>



<p>（步骤略）</p>



<h1>参考文献：</h1>



<p class="has-text-align-center">https://www.suse.com/support/kb/doc/?id=000019523</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[工具] Shell 监控普通登录记录 （排除 SFTP 登录记录只监控普通登录记录）</title>
		<link>https://eternalcenter-sep-2022.github.io/shell-login-log-exclude-sftp/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Tue, 15 Feb 2022 14:52:50 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[Language (语言)]]></category>
		<category><![CDATA[Other Service (其它服务)]]></category>
		<category><![CDATA[Service (服务)]]></category>
		<category><![CDATA[SFTP]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[Shell Monitor (监控)]]></category>
		<category><![CDATA[Shell Tools (工具)]]></category>
		<category><![CDATA[Storage Service (存储服务)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System General Log (系统普通日志)]]></category>
		<category><![CDATA[System Log (系统日志)]]></category>
		<category><![CDATA[System Network & System Security & System Log (系统网络 & 系统安全 & 系统日志)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=21977</guid>

					<description><![CDATA[注意： 在排除 SFTP 登录记录只监控普通登录记录前要先开启 SFTP 日志： 正文： 介绍 基本信息 作者：朱明宇名称：监控普通登录记录 （排除 SFTP 登录记录只监控普通登录记录）作用：监控普通登录记录 （排除 SFTP 登录记录只监控普通登录记录） 使用方法 1. 在此脚本的分割线内写入相应的内容2. 给此脚本添加执行权限3. 执行此脚本4. 普通登录记录会同时记录在系统日志和 $logfile 里 脚本分割线里的变量 1. logfile=logfile.txt #用户保存记录的文件2. prompt=&#8221;and no sftp info&#8221; #记录里普通登录记录的文件 脚本]]></description>
										<content:encoded><![CDATA[
<h1 id="注意">注意：</h1>



<p>在排除 SFTP 登录记录只监控普通登录记录前要先开启 SFTP 日志：</p>



<div class="wp-container-2 wp-block-buttons">
<div class="wp-block-button aligncenter is-style-outline"><a class="wp-block-button__link" href="https://eternalcenter-sep-2022.github.io/sftp-log/" style="border-radius:0px">SFTP 日志的开启</a></div>
</div>



<h1>正文：</h1>



<h2 id="介绍">介绍</h2>



<h3>基本信息</h3>



<p>作者：朱明宇<br>名称：监控普通登录记录 （排除 SFTP 登录记录只监控普通登录记录）<br>作用：监控普通登录记录 （排除 SFTP 登录记录只监控普通登录记录）</p>



<h3>使用方法</h3>



<p>1. 在此脚本的分割线内写入相应的内容<br>2. 给此脚本添加执行权限<br>3. 执行此脚本<br>4. 普通登录记录会同时记录在系统日志和 $logfile 里</p>



<h3>脚本分割线里的变量</h3>



<p>1. logfile=logfile.txt #用户保存记录的文件<br>2. prompt=&#8221;and no sftp info&#8221; #记录里普通登录记录的文件</p>



<h2 id="脚本">脚本</h2>



<pre class="wp-block-code"><code>#!/bin/bash

####################### Separator ########################

logfile=logfile.txt
prompt="and no sftp info"

####################### Separator ########################

checktime=`date +%Y-%m-%dT%H -d "-1 day"`

for i in `cat -n /var/log/messages | grep $check_time | grep 'Started Session' | grep -v 'root' | awk '{print $1}'`

do
   line=`sed -n $&#91;i]p /var/log/messages`
   time=`echo $line | awk '{print $1}'`
   session=`echo $line | awk '{print $6}'`
   user=`echo $line | awk '{print $9}'`
   user=${user%.}

   message="ACCESS CHECK LOG: Time:$time Session:$session $user has accessed `hostname`, $prompt"

   let sftpline=i+3

   sed -n $&#91;sftpline]p /var/log/messages | grep sftp-server &amp;&gt; /dev/null
   if &#91; $? -ne 0 ];then
           echo $message
           echo $message &gt;&gt; $logfile.txt
           logger $message
   fi
   echo
done</code></pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[命令] SLE 命令 SUSEConnect （注册客户端到 SUSE Repository Mirroring Tool (RMT)）</title>
		<link>https://eternalcenter-sep-2022.github.io/suseconnect/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Tue, 15 Feb 2022 13:27:33 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[Other Service (其它服务)]]></category>
		<category><![CDATA[Service (服务)]]></category>
		<category><![CDATA[SUSE Repository Mirroring Tool (RMT)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Operation & System Setting & System Software (系统操作 & 系统设置 & 系统软件)]]></category>
		<category><![CDATA[System Software (系统软件)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=21968</guid>

					<description><![CDATA[如果是 HTTP 协议： 或者： 如果是 HTTPS 协议： 或者：]]></description>
										<content:encoded><![CDATA[
<p>如果是 HTTP 协议：</p>



<pre class="wp-block-code"><code># SUSEConnect -u http://&lt;/<span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: -webkit-standard; font-size: medium; white-space: normal;">SUSE Repository Mirroring Tool (RMT</span>) Server's IP address or FQDN&gt;</code></pre>



<p>或者：</p>



<pre class="wp-block-code"><code># SUSEConnect --url http://&lt;/<span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: -webkit-standard; font-size: medium; white-space: normal;">SUSE Repository Mirroring Tool (RMT</span>) Server's IP address or FQDN&gt;</code></pre>



<p>如果是 HTTPS 协议：</p>



<pre class="wp-block-code"><code># SUSEConnect -u https://&lt;/<span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: -webkit-standard; font-size: medium; white-space: normal;">SUSE Repository Mirroring Tool (RMT</span>) Server's IP address or FQDN&gt;</code></pre>



<p>或者：</p>



<pre class="wp-block-code"><code># SUSEConnect --url https://&lt;/<span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: -webkit-standard; font-size: medium; white-space: normal;">SUSE Repository Mirroring Tool (RMT</span>) Server's IP address or FQDN&gt;</code></pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[步骤] PXE 新系统模板的添加</title>
		<link>https://eternalcenter-sep-2022.github.io/pxe-template-add/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Sat, 12 Feb 2022 15:14:50 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[Other Service (其它服务)]]></category>
		<category><![CDATA[Pre-boot Execution Environment (PXE)]]></category>
		<category><![CDATA[Service (服务)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Computer & System Hardware & System Installation & System Upgradation (系统电脑 & 系统硬件 & 系统安装 & 系统升级)]]></category>
		<category><![CDATA[System Installation (系统安装)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=21908</guid>

					<description><![CDATA[步骤一：准备安装镜像 1.1 从官网上下载安装镜像 （步骤略） 1.2 挂载安装镜像 1.2.1 创建用于挂载安装镜像的目录 1.2.2 挂载安装镜像 步骤二：准备用于进行 PXE 安装的数据 2.1 准备系统安装数据 2.1.1 创建用于存放系统安装数据的目录 （注意：用于存放系统安装数据的目录必须要放在能够实现 PXE 安装时网络共享的目录里（例如：通过 httpd 服务进行网络共享）） 2.1.2 拷贝安装镜像里的数据到用于存放系统安装数据的目录 2.1.2.1 拷贝安装镜像里的普通数据到用于存放系统安装数据的目录 2.1.2.2 拷贝安装镜像里的 .treeinfo 文件到用于存放系统安装数据的目录 2.2 准备安装引导文件 2.2.1 创建用于存放安装引导文件的目录 2.2.1.1 创建用于存放 BIOS 安装引导文件的目录 （注意：用于存放 BIOS 安装引导文件的目录必须要放在能够实现 TFPT 网络共享的目录里） 2.2.1.2 创建用于存放 EFI 安装引导文件的目录 （注意：用于存放 EFI 安装引导文件的目录必须要放在能够实现 TFPT 网络共享的目录里） 2.2.2 拷贝安装镜像里的安装引导文件到存放安装引导文件的目录 2.2.2.1 &#8230; <p class="link-more"><a href="https://eternalcenter-sep-2022.github.io/pxe-template-add/" class="more-link">Continue reading<span class="screen-reader-text"> "[步骤] PXE 新系统模板的添加"</span></a></p>]]></description>
										<content:encoded><![CDATA[
<h3 id="步骤一-准备安装镜像1-1-从官网上下载安装镜像">步骤一：准备安装镜像</h3>



<h4 id="步骤一-准备安装镜像1-1-从官网上下载安装镜像">1.1 从官网上下载安装镜像</h4>



<p>（步骤略）</p>



<h4 id="1-2-挂载安装镜像1-2-1-创建用于挂载安装镜像的目录">1.2 挂载安装镜像</h4>



<h5 id="1-2-挂载安装镜像1-2-1-创建用于挂载安装镜像的目录">1.2.1 创建用于挂载安装镜像的目录</h5>



<pre class="wp-block-code"><code># mkdir &lt;directory for mounting the image&gt;</code></pre>



<h5 id="1-2-2-挂载安装镜像">1.2.2 挂载安装镜像</h5>



<pre class="wp-block-code"><code># mount -t iso9660 &lt;image&gt; &lt;directory for mounting the image&gt;</code></pre>



<h3 id="步骤二-准备用于进行-pxe-安装的数据2-1-准备系统安装数据2-1-1-创建用于存放系统安装数据的目录">步骤二：准备用于进行 PXE 安装的数据</h3>



<h4 id="步骤二-准备用于进行-pxe-安装的数据2-1-准备系统安装数据2-1-1-创建用于存放系统安装数据的目录">2.1 准备系统安装数据</h4>



<h5 id="步骤二-准备用于进行-pxe-安装的数据2-1-准备系统安装数据2-1-1-创建用于存放系统安装数据的目录">2.1.1 创建用于存放系统安装数据的目录</h5>



<pre class="wp-block-code"><code># mkdir &lt;directory of data for installing the system&gt;</code></pre>



<p>（注意：用于存放系统安装数据的目录必须要放在能够实现 PXE 安装时网络共享的目录里（例如：通过 httpd 服务进行网络共享））</p>



<h5 id="2-1-2-拷贝安装镜像里的数据到用于存放系统安装数据的目录2-1-2-1-拷贝安装镜像里的普通数据到用于存放系统安装数据的目录">2.1.2 拷贝安装镜像里的数据到用于存放系统安装数据的目录</h5>



<h5 id="2-1-2-拷贝安装镜像里的数据到用于存放系统安装数据的目录2-1-2-1-拷贝安装镜像里的普通数据到用于存放系统安装数据的目录">2.1.2.1 拷贝安装镜像里的普通数据到用于存放系统安装数据的目录</h5>



<pre class="wp-block-code"><code># cp -rp &lt;directory for mounting the image&gt;/* &lt;directory of data for installing the system&gt;</code></pre>



<h5 id="2-1-2-2-拷贝安装镜像里的-treeinfo-文件到用于存放系统安装数据的目录">2.1.2.2 拷贝安装镜像里的 .treeinfo 文件到用于存放系统安装数据的目录</h5>



<pre class="wp-block-code"><code># cp -rp &lt;directory for mounting the image&gt;/.treeinfo &lt;directory of data for installing the system&gt;</code></pre>



<h4 id="2-2-准备安装引导文件2-2-1-创建用于存放安装引导文件的目录2-2-1-1-创建用于存放-bios-安装引导文件的目录">2.2 准备安装引导文件</h4>



<h5 id="2-2-准备安装引导文件2-2-1-创建用于存放安装引导文件的目录2-2-1-1-创建用于存放-bios-安装引导文件的目录">2.2.1 创建用于存放安装引导文件的目录</h5>



<h5 id="2-2-准备安装引导文件2-2-1-创建用于存放安装引导文件的目录2-2-1-1-创建用于存放-bios-安装引导文件的目录">2.2.1.1 创建用于存放 BIOS 安装引导文件的目录</h5>



<pre class="wp-block-code"><code># mkdir &lt;directory of BIOS boot file for installing the system&gt;</code></pre>



<p>（注意：用于存放 BIOS 安装引导文件的目录必须要放在能够实现 TFPT 网络共享的目录里）</p>



<h5 id="2-2-1-2-创建用于存放-efi-安装引导文件的目录">2.2.1.2 创建用于存放 EFI 安装引导文件的目录</h5>



<pre class="wp-block-code"><code># mkdir &lt;directory of EFI boot file for installing the system&gt;</code></pre>



<p>（注意：用于存放 EFI 安装引导文件的目录必须要放在能够实现 TFPT 网络共享的目录里）</p>



<h5 id="2-2-2-拷贝安装镜像里的安装引导文件到存放安装引导文件的目录2-2-2-1-拷贝安装镜像里的-bios-安装引导文件到存放-bios-安装引导文件的目录">2.2.2 拷贝安装镜像里的安装引导文件到存放安装引导文件的目录</h5>



<h5 id="2-2-2-拷贝安装镜像里的安装引导文件到存放安装引导文件的目录2-2-2-1-拷贝安装镜像里的-bios-安装引导文件到存放-bios-安装引导文件的目录">2.2.2.1 拷贝安装镜像里的 BIOS 安装引导文件到存放 BIOS 安装引导文件的目录</h5>



<p>如果是 Rocky Linux &amp; RHEL 则拷贝 initrd.img 文件、TRANS.TBL 文件和 vmlinuz 文件：</p>



<pre class="wp-block-code"><code># curl &lt;The URL of the network share when PXE installing&gt;/&lt;directory of data for installing the system&gt;/images/pxeboot/initrd.img -O &lt;directory of BIOS boot file for installing the system&gt;/initrd.img
# curl &lt;The URL of the network share when PXE installing&gt;/&lt;directory of data for installing the system&gt;/images/pxeboot/TRANS.TBL -O &lt;directory of BIOS boot file for installing the system&gt;/TRANS.TBL
# curl &lt;The URL of the network share when PXE installing&gt;/&lt;directory of data for installing the system&gt;/images/pxeboot/vmlinuz -O &lt;directory of BIOS boot file for installing the system&gt;/vmlinuz</code></pre>



<p>如果是 openSUSE &amp; SLE 则拷贝 linux 文件和 initrd 文件：</p>



<pre class="wp-block-code"><code># curl &lt;The URL of the network share when PXE installing&gt;/&lt;directory of data for installing the system&gt;/boot/x86_64/loader/linux -O &lt;directory of BIOS boot file for installing the system&gt;/linux
# curl &lt;The URL of the network share when PXE installing&gt;/&lt;directory of data for installing the system&gt;/boot/x86_64/loader/initrd -O &lt;directory of BIOS boot file for installing the system&gt;/initrd</code></pre>



<h5 id="2-2-2-2-拷贝安装镜像里的-efi-安装引导文件到存放-efi-安装引导文件的目录">2.2.2.2 拷贝安装镜像里的 EFI 安装引导文件到存放 EFI 安装引导文件的目录</h5>



<p>如果是 Rocky Linux &amp; RHEL 则拷贝 initrd.img 文件、TRANS.TBL 文件和 vmlinuz 文件：</p>



<pre class="wp-block-code"><code># curl &lt;The URL of the network share when PXE installing&gt;/&lt;directory of data for installing the system&gt;/images/pxeboot/initrd.img -O &lt;directory of EFI boot file for installing the system&gt;/initrd.img
# curl &lt;The URL of the network share when PXE installing&gt;/&lt;directory of data for installing the system&gt;/images/pxeboot/TRANS.TBL -O &lt;directory of EFI boot file for installing the system&gt;/TRANS.TBL
# curl &lt;The URL of the network share when PXE installing&gt;/&lt;directory of data for installing the system&gt;/images/pxeboot/vmlinuz -O &lt;directory of EFI boot file for installing the system&gt;/vmlinuz</code></pre>



<p>如果是 openSUSE &amp; SLE 则拷贝 linux 文件和 initrd 文件：</p>



<pre class="wp-block-code"><code># curl &lt;The URL of the network share when PXE installing&gt;/&lt;directory of data for installing the system&gt;/boot/x86_64/loader/linux -O &lt;directory of EFI boot file for installing the system&gt;/linux
# curl &lt;The URL of the network share when PXE installing&gt;/&lt;directory of data for installing the system&gt;/boot/x86_64/loader/initrd -O &lt;directory of EFI boot file for installing the system&gt;/initrd</code></pre>



<h4 id="2-3-准备系统安装配置文件2-3-1-进入到用于存放系统安装配置文件的目录">2.3 准备系统安装配置文件</h4>



<h5 id="2-3-准备系统安装配置文件2-3-1-进入到用于存放系统安装配置文件的目录">2.3.1 进入到用于存放系统安装配置文件的目录</h5>



<pre class="wp-block-code"><code># cd &lt;directory of profile for installing the system&gt;</code></pre>



<p>（注意：进入到用于存放系统安装配置文件的目录必须要放在能够实现 PXE 安装时网络共享的目录里（例如：通过 httpd 服务进行网络共享））</p>



<h5 id="2-3-2-创建系统安装配置文件2-3-2-1-创建-bios-系统安装配置文件">2.3.2 创建系统安装配置文件</h5>



<h5 id="2-3-2-创建系统安装配置文件2-3-2-1-创建-bios-系统安装配置文件">2.3.2.1 创建 BIOS 系统安装配置文件</h5>



<p>如果是 Rocky Linux &amp; RHEL 的话</p>



<pre class="wp-block-code"><code># vim &lt;BIOS system installation profile&gt;</code></pre>



<p>（步骤略）</p>



<p>（<br>补充：<br>1) 如果是 Rocky Linux &amp; RHEL 的话系统安装配置文件是 CFG 文件，文件名最好以 .cfg 后缀结尾<br>2) 如果是 openSUSE &amp; SLE 的话系统安装配置文件是 XML 文件，文件名最好以 .xml 后缀结尾<br>）</p>



<h5 id="2-3-2-2-创建-efi-系统安装配置文件">2.3.2.2 创建 EFI 系统安装配置文件</h5>



<pre class="wp-block-code"><code># vim &lt;EFI system installation profile&gt;</code></pre>



<p>（步骤略）</p>



<p>（<br>补充：<br>1) 如果是 Rocky Linux &amp; RHEL 的话系统安装配置文件是 CFG 文件，文件名最好以 .cfg 后缀结尾<br>2) 如果是 openSUSE &amp; SLE 的话系统安装配置文件是 XML 文件，文件名最好以 .xml 后缀结尾<br>）</p>



<h5 id="2-3-3-设置系统安装配置文件的权限2-3-3-1-设置-bios-系统安装配置文件的权限">2.3.3 设置系统安装配置文件的权限</h5>



<h5 id="2-3-3-设置系统安装配置文件的权限2-3-3-1-设置-bios-系统安装配置文件的权限">2.3.3.1 设置 BIOS 系统安装配置文件的权限</h5>



<pre class="wp-block-code"><code># chmod 755 &lt;BIOS system installation profile&gt;</code></pre>



<h5 id="2-3-3-2-设置-efi-系统安装配置文件的权限">2.3.3.2 设置 EFI 系统安装配置文件的权限</h5>



<pre class="wp-block-code"><code># chmod 755 &lt;EFI system installation profile&gt;</code></pre>



<h4 id="2-4-修改系统安装菜单文件-pxelinux-cfg2-4-1-修改-bios-系统安装菜单文件-pxelinux-cfg">2.4 修改系统安装菜单文件 pxelinux.cfg</h4>



<h5 id="2-4-修改系统安装菜单文件-pxelinux-cfg2-4-1-修改-bios-系统安装菜单文件-pxelinux-cfg">2.4.1 修改 BIOS 系统安装菜单文件 pxelinux.cfg</h5>



<pre class="wp-block-code"><code># vim &lt;directory of file for BIOS system installation menu&gt;/pxelinux.cfg</code></pre>



<p>如果是 Rocky Linux &amp; RHEL 的话，添加以下内容：</p>



<pre class="wp-block-code"><code>......
label Rocky Linux or RHEL
  menu label ^Installation Rocky Linux or RHEL
  kernel &lt;relative directory of pxelinux.cfg of BIOS boot file for installing the system&gt;/vmlinuz
  append initrd=/&lt;relative directory of pxelinux.cfg of BIOS boot file for installing the system&gt;/initrd.img ks=&lt;The URL of the network share when PXE installing&gt;/&lt;BIOS system installation profile&gt;</code></pre>



<p>（注意：这里的 vmlinuz 文件和 initrd.im 文件的位置要写 pxelinux.cfg 文件的相对路径）</p>



<p>如果是 openSUSE &amp; SLE 的话，添加以下内容：</p>



<pre class="wp-block-code"><code>......
label openSUSE or SLE
  menu label ^Installation openSUSE or SLE
  kernel &lt;relative directory of pxelinux.cfg of BIOS boot file for installing the system&gt;/linux
  append initrd=&lt;relative directory of pxelinux.cfg of BIOS boot file for installing the system&gt;/initrd splash=silent showopts install=&lt;The URL of the network share when PXE installing&gt;/&lt;directory of data for installing the system&gt;/ autoyast=&lt;The URL of the network share when PXE installing&gt;/&lt;BIOS system installation profile&gt;</code></pre>



<p>（注意：这里的 linux 文件和 initrd 文件的位置要写 pxelinux.cfg 文件的相对路径）</p>



<p>（注意：用于存放 BIOS 系统安装菜单文件的目录必须要放在能够实现 TFPT 网络共享的目录里）</p>



<h5 id="2-4-2-修改-efi-系统安装菜单文件-grub-cfg">2.4.2 修改 EFI 系统安装菜单文件 grub.cfg</h5>



<pre class="wp-block-code"><code># vim &lt;directory of file for EFI system installation menu&gt;/grub.cfg</code></pre>



<p>如果是 Rocky Linux &amp; RHEL 的话，添加以下内容：</p>



<pre class="wp-block-code"><code>......
label Rocky Linux or RHEL
  menu label ^Installation Rocky Linux or RHEL
  kernel &lt;relative directory of pxelinux.cfg of EFI boot file for installing the system&gt;/vmlinuz
  append initrd=/&lt;relative directory of pxelinux.cfg of EFI boot file for installing the system&gt;/initrd.img ks=&lt;The URL of the network share when PXE installing&gt;/&lt;EFI system installation profile&gt;</code></pre>



<p>（注意：这里的 vmlinuz 文件和 initrd.im 文件的位置要写 pxelinux.cfg 文件的相对路径）</p>



<p>如果是 openSUSE &amp; SLE 的话，添加以下内容：</p>



<pre class="wp-block-code"><code>......
label openSUSE or SLE
  menu label ^Installation openSUSE or SLE
  kernel &lt;relative directory of pxelinux.cfg of EFI boot file for installing the system&gt;/linux
  append initrd=&lt;relative directory of pxelinux.cfg of EFI boot file for installing the system&gt;/initrd splash=silent showopts install=&lt;The URL of the network share when PXE installing&gt;/&lt;directory of data for installing the system&gt;/ autoyast=&lt;The URL of the network share when PXE installing&gt;/&lt;EFI system installation profile&gt;</code></pre>



<p>（注意：这里的 linux 文件和 initrd 文件的位置要写 pxelinux.cfg 文件的相对路径）</p>



<p>（注意：用于存放 EFI 系统安装菜单文件的目录必须要放在能够实现 TFPT 网络共享的目录里）</p>



<h3 id="步骤三-取消挂载安装镜像-1">步骤三：取消挂载安装镜像</h3>



<pre class="wp-block-code"><code># umount &lt;directory for mounting the image&gt;</code></pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[STEP] Red Hat Satellite client register</title>
		<link>https://eternalcenter-sep-2022.github.io/red-hat-satellite-client-register/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Tue, 18 Jan 2022 14:41:36 +0000</pubDate>
				<category><![CDATA[English (英文)]]></category>
		<category><![CDATA[Other Service (其它服务)]]></category>
		<category><![CDATA[Red Hat Satellite]]></category>
		<category><![CDATA[Service (服务)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=21287</guid>

					<description><![CDATA[Step One: Add domain name resolution into /etc/hosts Add the following: Step Two: Install katello-ca-consumer-latest.noarch.rpm 2.1 Download katello-ca-consumer-latest.noarch.rpm 2.2 Install katello-ca-consumer-latest.noarch.rpm Step Three: Register to Red Hat Satellite Server Step Four: Install katello-host-tools, katello-host-tools-tracer and katello-agent 4.1 Enable rhel-*-satellite-tools-*-rpms repo or satellite-tools-*-rhel-*-rpms RHEL 7: RHEL 8: 4.2 Install katello-host-tools, katello-host-tools-tracer and katello-agent Step Five: Check &#8230; <p class="link-more"><a href="https://eternalcenter-sep-2022.github.io/red-hat-satellite-client-register/" class="more-link">Continue reading<span class="screen-reader-text"> "[STEP] Red Hat Satellite client register"</span></a></p>]]></description>
										<content:encoded><![CDATA[
<h3>Step One: Add domain name resolution into /etc/hosts</h3>



<pre class="wp-block-code"><code># vim /etc/hosts</code></pre>



<p>Add the following:</p>



<pre class="wp-block-code"><code>......
&lt;Redhat Satellite IP address&gt; &lt;Redhat Satellite Server FQDN&gt;</code></pre>



<h3>Step Two: Install katello-ca-consumer-latest.noarch.rpm</h3>



<h4>2.1 Download katello-ca-consumer-latest.noarch.rpm</h4>



<pre class="wp-block-code"><code># curl --insecure --output katello-ca-consumer-latest.noarch.rpm https://&lt;Redhat/ Satellite Server FQDN&gt;/pub/katello-ca-consumer-latest.noarch.rpm</code></pre>



<h4>2.2 Install katello-ca-consumer-latest.noarch.rpm</h4>



<pre class="wp-block-code"><code># yum -y localinstall katello-ca-consumer-latest.noarch.rpm</code></pre>



<h3>Step Three: Register to Red Hat Satellite Server</h3>



<pre class="wp-block-code"><code># subscription-manager register --org="&lt;organization&gt;" --activationkey="&lt;activation key&gt;"</code></pre>



<h3>Step Four: Install katello-host-tools, katello-host-tools-tracer and katello-agent</h3>



<h4>4.1 Enable rhel-*-satellite-tools-*-rpms repo or satellite-tools-*-rhel-*-rpms</h4>



<p>RHEL 7:</p>



<pre class="wp-block-code"><code># subscription-manager repos --enable=rhel-\*-satellite-tools-\*-rpms</code></pre>



<p>RHEL 8:</p>



<pre class="wp-block-code"><code># subscription-manager repos --enable=satellite-tools-\*-rhel-\*-rpms
# subscription-manager repos --disable=satellite-tools-\*-rhel-\*-eus-rpms</code></pre>



<h4>4.2 Install katello-host-tools, katello-host-tools-tracer and katello-agent</h4>



<pre class="wp-block-code"><code># yum -y install katello-host-tools; yum -y install katello-host-tools-tracer; yum -y install katello-agent</code></pre>



<h3>Step Five: Check</h3>



<h4>5.1 Check registration information</h4>



<pre class="wp-block-code"><code># subscription-manager identity</code></pre>



<h4>5.2 Check license</h4>



<pre class="wp-block-code"><code># subscription-manager list --consumed</code></pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[步骤] Red Hat Satellite Server 客户端注册的取消</title>
		<link>https://eternalcenter-sep-2022.github.io/red-hat-satellite-server-client-unregister/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Tue, 18 Jan 2022 13:54:51 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[Other Service (其它服务)]]></category>
		<category><![CDATA[Red Hat Satellite]]></category>
		<category><![CDATA[Service (服务)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=21280</guid>

					<description><![CDATA[步骤一：取消 Red Hat Satellite Server 客户端的注册 步骤二：清理 Red Hat Satellite Server 客户端的注册信息]]></description>
										<content:encoded><![CDATA[
<h3>步骤一：取消 Red Hat Satellite Server 客户端的注册</h3>



<pre class="wp-block-code"><code># subscription-manager unregister</code></pre>



<h3>步骤二：清理 Red Hat Satellite Server 客户端的注册信息 </h3>



<pre class="wp-block-code"><code># subscription-manager clean</code></pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[步骤] GitHub 代码的更新 （令牌版）</title>
		<link>https://eternalcenter-sep-2022.github.io/github-push-token/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Sat, 01 Jan 2022 13:33:23 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[Other Service (其它服务)]]></category>
		<category><![CDATA[Service (服务)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=20763</guid>

					<description><![CDATA[步骤一：在 GitHub 官网上生成令牌 1.1 在 https://github.com/ 上登录或注册 GitHub 用户 （步骤略） 1.2 在 GitHub 上创建仓库 右上角 + &#8211;&#62; New repository &#8211;&#62; 填写 Repository name &#8211;&#62; 勾选 Public &#8211;&#62; Create repository （注意：只有当要使用的仓库还没有创建时才需要进行此步骤） 1.3 在 GitHub 官网上生成令牌 右上角的头像 &#8211;> Settings &#8211;> Developer settings &#8211;> Personal access tokens &#8211;> Generate new token &#8211;> 填写 Note &#8211;> 勾选需要的 scopes &#8211;> &#8230; <p class="link-more"><a href="https://eternalcenter-sep-2022.github.io/github-push-token/" class="more-link">Continue reading<span class="screen-reader-text"> "[步骤] GitHub 代码的更新 （令牌版）"</span></a></p>]]></description>
										<content:encoded><![CDATA[
<h3 id="步骤一-在-github-官网上生成令牌-1-1-在-https-github-com-上登录或注册-github-用户">步骤一：在 GitHub 官网上生成令牌</h3>



<h4 id="步骤一-在-github-官网上生成令牌-1-1-在-https-github-com-上登录或注册-github-用户">1.1 在 https://github.com/ 上登录或注册 GitHub 用户</h4>



<p>（步骤略）</p>



<h4 id="1-2-在-github-上创建仓库">1.2 在 GitHub 上创建仓库</h4>



<p>右上角 + &#8211;&gt; New repository &#8211;&gt; 填写 Repository name &#8211;&gt; 勾选 Public &#8211;&gt; Create repository</p>



<p>（注意：只有当要使用的仓库还没有创建时才需要进行此步骤）</p>



<h4 id="1-3-在-github-官网上生成令牌">1.3 在 GitHub 官网上生成令牌</h4>



<p>右上角的头像 &#8211;> Settings &#8211;> Developer settings &#8211;> Personal access tokens &#8211;> Generate new token &#8211;> 填写 Note &#8211;> 勾选需要的 scopes &#8211;> Generate token</p>



<h4 id="1-4-复制生成的令牌">1.4 复制生成的令牌</h4>



<p>（步骤略）</p>



<h3 id="步骤二-更新-github-代码-2-1-进入有代码需要更新的目录">步骤二：更新 GitHub 代码</h3>



<h4 id="步骤二-更新-github-代码-2-1-进入有代码需要更新的目录">2.1 进入有代码需要更新的目录</h4>



<pre class="wp-block-code"><code># cd github</code></pre>



<p>（补充：这里以进入 github 目录为例）</p>



<h4 id="2-2-初始化-git-环境">2.2 初始化 Git 环境</h4>



<pre class="wp-block-code"><code># git init</code></pre>



<h4 id="2-3-添加需要更新的代码">2.3 添加需要更新的代码</h4>



<pre class="wp-block-code"><code># git add *</code></pre>



<p>（补充：这里以添加当前目录下的所有文件为例）</p>



<h4 id="2-4-提交刚刚的添加">2.4 提交刚刚的添加</h4>



<pre class="wp-block-code"><code># git commit -m "last commit"</code></pre>



<p>（补充：这里以提交时添加 “last commit” 备注为例）</p>



<h4 id="2-5-创建或选择代码库的分支">2.5 创建或选择代码库的分支</h4>



<pre class="wp-block-code"><code># git branch -M main</code></pre>



<p>（补充：这里以创建或选择库里的 main 分支为例）</p>



<h4 id="2-6-添加-github-源">2.6 添加 GitHub 源</h4>



<pre class="wp-block-code"><code># git remote add origin git@github.com:eternalcenter-now/eternalcenter-now.github.io</code></pre>



<p>（补充：这里以添加 GitHub 的 eternalcenter-now 用户的 eternalcenter-now.github.io 库为例）</p>



<p>（注意：这里的 eternalcenter-now 用户和 eternalcenter-now.github.io 库是指在 1.1、1.2 上创建的用户和库）</p>



<h4 id="2-7-通过令牌设置-github-源">2.7 通过令牌设置 GitHub 源</h4>



<pre class="wp-block-code"><code># git remote set-url origin https://gafafhp_Nfaodfwiixma8hPpds4e6asdflim@github.com/eternalcenter-now/eternalcenter-now.github.io</code></pre>



<p>（补充：这里以使用 GitHub 的 gafafhp_Nfaodfwiixma8hPpds4e6asdflim 令牌、eternalcenter-now 用户的 eternalcenter-now.github.io 库为例）</p>



<p>（注意：这里的 eternalcenter-now 用户、eternalcenter-now.github.io 库和 gafafhp_Nfaodfwiixma8hPpds4e6asdflim 令牌是指在 1.1、1.2、1.3 上创建的用户、库和生成的令牌）</p>



<h4 id="2-8-将代码更新至-github">2.8 将代码更新至 GitHub</h4>



<pre class="wp-block-code"><code># git push -u origin main</code></pre>



<p>（补充：这里以将代码更新至 main 分支为例）</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[工具] Shell 将同目录下最新的某个目录里的所有文件替换到 GitHub 库里 （Git LFS 版）</title>
		<link>https://eternalcenter-sep-2022.github.io/shell-github-replace-git-lfs/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Sat, 18 Dec 2021 13:44:56 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[Language (语言)]]></category>
		<category><![CDATA[Other Service (其它服务)]]></category>
		<category><![CDATA[Service (服务)]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[Shell Backup (备份)]]></category>
		<category><![CDATA[Shell Tools (工具)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=19851</guid>

					<description><![CDATA[介绍 基本信息 作者：朱明宇名称：将同目录下最新的某个目录里的所有文件替换到 GitHub 库里作用：将同目录下最新的某个目录里的所有文件替换到 GitHub 库里 使用方法 1. 在此脚本的分割线内写入相应的内容2. 给此脚本添加执行权限3. 执行此脚本 脚本分割线里的变量 1. directory=download-eternalcenter #本地的缓冲目录2. gituser=mingyuzhu #GitHub 用户3. gitemail=mingyu.zhu@eternalcenter.com #GitHub 邮箱4. gitrepository=download-eternalcenter #GitHub 库5. gitbranch=’master’ #GitHub 库的分支6. backupfile=all #备份后的文件7. keyword=clone #同目录下要备份目录名称的关键字 注意 需要提前安装 git 和 git-lfs，注册 GitHub，创建相应的 GitHub 库，并且创建和设置了对应的 ssh 密钥 脚本]]></description>
										<content:encoded><![CDATA[
<h2>介绍</h2>



<h3>基本信息</h3>



<p>作者：朱明宇<br>名称：将同目录下最新的某个目录里的所有文件替换到 GitHub 库里<br>作用：将同目录下最新的某个目录里的所有文件替换到 GitHub 库里</p>



<h3>使用方法</h3>



<p>1. 在此脚本的分割线内写入相应的内容<br>2. 给此脚本添加执行权限<br>3. 执行此脚本</p>



<h3>脚本分割线里的变量</h3>



<p>1. directory=download-eternalcenter #本地的缓冲目录<br>2. gituser=mingyuzhu #GitHub 用户<br>3. gitemail=mingyu.zhu@eternalcenter.com #GitHub 邮箱<br>4. gitrepository=download-eternalcenter #GitHub 库<br>5. gitbranch=’master’ #GitHub 库的分支<br>6. backupfile=all #备份后的文件<br>7. keyword=clone #同目录下要备份目录名称的关键字</p>



<h3>注意</h3>



<p>需要提前安装 git 和 git-lfs，注册 GitHub，创建相应的 GitHub 库，并且创建和设置了对应的 ssh 密钥</p>



<h2>脚本</h2>



<pre class="wp-block-code"><code>#!/bin/bash

####################### Separator ########################

directory=download-eternalcenter
gituser=mingyuzhu
gitemail=mingyu.zhu@eternalcenter.com
gitrepository=download-eternalcenter
gitbranch='master'
backupfile=all
keyword=clone

####################### Separator ########################

backupdirectory=`ls -rtlh | grep $keyword | awk '{print $NF}' | tail -1`

sqlfile=`ls $backupdirectory | grep sql`
tarfile=`ls $backupdirectory | grep tar`

rm -rf $directory
mkdir -p $directory &amp;&gt; /dev/null

echo $gituser
git config --global user.email "$gitemail"
git config --global user.name "$gituser"

rm -rf $directory
mkdir -p $directory &amp;&gt; /dev/null
cd $directory
git init
git lfs install
git remote add origin git@github.com:$gituser/$gitrepository
git pull --rebase origin $gitbranch -f
git lfs track *
git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch *' --prune-empty --tag-name-filter cat -- --all
git commit -m 'cleapup'
git push -u origin $gitbranch -f
rm -rf .git/refs/original/
git reflog expire --expire=now --all
git gc --prune=now
git gc --aggressive --prune=now

cd ..

rm -rf $directory
mkdir -p $directory &amp;&gt; /dev/null
cd $directory
git init
git lfs install
git remote add origin git@github.com:$gituser/$gitrepository
git pull --rebase origin $gitbranch -f
git lfs track *
git rm *
git commit -m 'cleapup'

cd ../$backupdirectory/
tar -zcvf ../$directory/$backupfile.tar.gz *
cd ../$directory

git lfs track *
git add *
git status
git commit -m 'upload'
git push -u origin $gitbranch -f
cd ..</code></pre>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
