<?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>未完待续</title>
	<atom:link href="https://ioio.name/feed" rel="self" type="application/rss+xml" />
	<link>https://ioio.name</link>
	<description>To Be Continued</description>
	<lastBuildDate>Sat, 04 Jul 2026 05:54:47 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.4</generator>
	<item>
		<title>List open network ports on FreeBSD</title>
		<link>https://ioio.name/list-open-network-ports-on-freebsd.html</link>
		
		<dc:creator><![CDATA[枯藤昏鸦]]></dc:creator>
		<pubDate>Sat, 04 Jul 2026 05:54:21 +0000</pubDate>
				<category><![CDATA[就是不分类]]></category>
		<guid isPermaLink="false">https://ioio.name/?p=2403</guid>

					<description><![CDATA[Method 1: Using the sockstat Command (Recommended) List all listening IPv4 and IPv6 ports: [crayon-6ae35f91c4469097846359/] List only IPv4 listening ports: [crayon-6ae35f91c4474273431249/] List only IPv6 listening ports: [crayon-6ae35f91c4476732423696/] List only TCP listening ports: [crayon-6ae35f91c4478357181361/] List only UDP listening ports: [crayon-6ae35f91c4479908492730/] Method 2: Using the Traditional netstat Command Show all listening network sockets: [crayon-6ae35f91c447b862927844/] Show all active &#8230; <p class="link-more"><a href="https://ioio.name/list-open-network-ports-on-freebsd.html" class="more-link">Continue reading<span class="screen-reader-text"> "List open network ports on FreeBSD"</span></a></p>]]></description>
										<content:encoded><![CDATA[<p>Method 1: Using the <code>sockstat</code> Command (Recommended)</p>
<p>List all listening IPv4 and IPv6 ports:</p><pre class="urvanov-syntax-highlighter-plain-tag">sockstat -46 -l</pre><p></p>
<p>List only IPv4 listening ports:</p><pre class="urvanov-syntax-highlighter-plain-tag">sockstat -4 -l</pre><p></p>
<p>List only IPv6 listening ports:</p><pre class="urvanov-syntax-highlighter-plain-tag">sockstat -6 -l</pre><p></p>
<p>List only TCP listening ports:</p><pre class="urvanov-syntax-highlighter-plain-tag">sockstat -P tcp -l</pre><p></p>
<p>List only UDP listening ports:</p><pre class="urvanov-syntax-highlighter-plain-tag">sockstat -P udp -l</pre><p></p>
<p>Method 2: Using the Traditional <code>netstat</code> Command</p>
<p>Show all listening network sockets:</p><pre class="urvanov-syntax-highlighter-plain-tag">netstat -an | grep LISTEN</pre><p></p>
<p>Show all active connections and listening ports (numerical format):</p><pre class="urvanov-syntax-highlighter-plain-tag">netstat -an</pre><p></p>
<p>-EOF-</p>
<hr /><h2>Related posts:</h2><ul><li><a href="https://ioio.name/update-freebsd-hostname.html" rel="bookmark" title="Permanent Link: Update FreeBSD hostname">Update FreeBSD hostname</a></li><li><a href="https://ioio.name/predefined-macros-in-compilersclang-gcc.html" rel="bookmark" title="Permanent Link: Predefined macros in compilers(clang, gcc)">Predefined macros in compilers(clang, gcc)</a></li><li><a href="https://ioio.name/http-referer.html" rel="bookmark" title="Permanent Link: HTTP Referer">HTTP Referer</a></li><li><a href="https://ioio.name/social-learning-space.html" rel="bookmark" title="Permanent Link: 社交學習空間@FJU CSIE">社交學習空間@FJU CSIE</a></li><li><a href="https://ioio.name/jos-open-source.html" rel="bookmark" title="Permanent Link: 开放Judge Online System源代码">开放Judge Online System源代码</a></li></ul><hr /><small>Copyright &copy; 2005~2011 | <a href="https://ioio.name/list-open-network-ports-on-freebsd.html" title="Permalink">Permalink</a> | <a href="https://ioio.name/list-open-network-ports-on-freebsd.html#comments">0 Comments</a> | <a href="http://closetou.com" title="Close To U">Close To U</a> <br />
<a href="http://feeds.feedburner.com/miss">订阅</a> <a href="https://twitter.com/tearnon">Twitter</a> <a href="http://www.linode.com/?r=8dd6ddd391fc320d9f55ad101e051bde767df599">Linode VPS</a>
</small> )</small>]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Building a Command-Line Tool to Verify iOS AASAFiles</title>
		<link>https://ioio.name/a.html</link>
		
		<dc:creator><![CDATA[枯藤昏鸦]]></dc:creator>
		<pubDate>Fri, 20 Feb 2026 06:27:33 +0000</pubDate>
				<category><![CDATA[就是不分类]]></category>
		<guid isPermaLink="false">https://ioio.name/?p=2391</guid>

					<description><![CDATA[# Building a Command-Line Tool to Verify iOS AASA Files If you&#8217;ve ever set up Universal Links for an iOS application, you know that the Apple App Site Association (AASA) file can sometimes be a headache. Just a single typo, a missing bracket, or a misconfigured HTTP header can break deep linking entirely. To make &#8230; <p class="link-more"><a href="https://ioio.name/a.html" class="more-link">Continue reading<span class="screen-reader-text"> "Building a Command-Line Tool to Verify iOS AASAFiles"</span></a></p>]]></description>
										<content:encoded><![CDATA[<p># Building a Command-Line Tool to Verify iOS AASA Files</p>
<p>If you&#8217;ve ever set up Universal Links for an iOS application, you know that the Apple App Site Association (AASA) file can sometimes be a headache. Just a single typo, a missing bracket, or a misconfigured HTTP header can break deep linking entirely. </p>
<p>To make this process a bit smoother, I recently built a simple, dependency-free Python tool that verifies AASA files right from the command line.</p>
<p>## What is an AASA File?</p>
<p>The Apple App Site Association (AASA) file is a JSON file that lives on your web server. It establishes a secure connection between your domain and your iOS app, proving to Apple that you own both. When a user clicks a Universal Link (like <code>https://yourdomain.com/path</code>), iOS checks this file to see if the link should open in your app instead of Safari.</p>
<p>For this to work, the AASA file must:<br />
1. Be served over HTTPS with a valid certificate.<br />
2. Be exposed exactly at <code>/.well-known/apple-app-site-association</code> or <code>/apple-app-site-association</code>.<br />
3. Contain valid JSON syntax defining the <code>applinks</code> (and optionally <code>webcredentials</code> or <code>appclips</code>).</p>
<p>If everything is correct, Apple&#8217;s CDN will also eventually cache a copy at <code>https://app-site-association.cdn-apple.com/a/v1/[yourdomain.com]</code>.</p>
<p>## The Problem: It&#8217;s Hard to See Why It Fails</p>
<p>Usually, when deep links stop working, you&#8217;re left guessing. Is the file missing? Did the server return the wrong caching headers? Did my JSON syntax break when I updated it?</p>
<p>There are some web-based validators out there, but I wanted something I could run quickly in terminal, integrate into CI/CD pipelines, or just use locally without relying on third-party sites.</p>
<p>## Building <code>verify_aasa.py</code></p>
<p>I decided to build a simple Python script called <code>verify_aasa.py</code>. The goal was to check the common endpoints where an AASA file might live, fetch it, parse the JSON, and validate its structural integrity.</p>
<p>### 1. Fetching the File</p>
<p>The script checks three distinct locations:</p>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">paths = [
    f&quot;https://{domain}/.well-known/apple-app-site-association&quot;,
    f&quot;https://{domain}/apple-app-site-association&quot;,
    f&quot;https://app-site-association.cdn-apple.com/a/v1/{domain}&quot;
]</pre><p></p>
<p>It iterates through these paths using Python&#8217;s built-in <code>urllib.request</code>. If it succeeds in pulling down the valid file, it confirms the HTTP status and notes the <code>Content-Type</code> returned by the server. </p>
<p>*Note: One common hangup is that local Python environments on macOS sometimes struggle with root SSL certificates. To make the tool robust, I added a quick fallback behavior: if the <code>certifi</code> module is available, it uses that for validation; otherwise, it bypasses SSL validation and prints a warning so the user isn&#8217;t stuck behind a local configuration error.*</p>
<p>### 2. Validating the JSON</p>
<p>Once it has the file, the next step is parsing it. If the AASA file has trailing commas or weird quotes, <code>json.loads()</code> will throw an error immediately, simulating the confusion iOS might experience.</p>
<p>Assuming it passes the JSON decode, the script validates the structure:</p>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">if 'applinks' in data:
    applinks = data['applinks']
    if 'details' in applinks:
        for i, app in enumerate(applinks['details']):
            appID = app.get('appID')
            appIDs = app.get('appIDs')
            # Check for modern 'components' or legacy 'paths'
            # ...</pre><p></p>
<p>A common issue nowadays is transitioning from the legacy <code>paths</code> routing to the modern <code>components</code> routing, as well as the transition from <code>appID</code> (string) to <code>appIDs</code> (array). The script validates that at least one of these is correctly defined for each block.</p>
<p>It also supports checking for the existence of <code>webcredentials</code> (Shared Web Credentials) and <code>appclips</code> (App Clips configurations).</p>
<p>## Running the Tool</p>
<p>Running the tool is simple:</p>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">python3 verify_aasa.py apple.com</pre><p></p>
<p>Which produces an output like this:</p>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">Verifying AASA file for domain: apple.com

Checking https://apple.com/.well-known/apple-app-site-association ...
Found AASA file at https://apple.com/.well-known/apple-app-site-association
Content-Type: None

Successfully parsed as JSON.

--- Validating AASA Structure ---
Found 'applinks' key.
Found 'applinks.details' key.

  App 1: appIDs = ['W74U47NE8E.com.apple.store.Jolly']
    Uses modern 'components' routing.

Found 'webcredentials' key.
  Includes 1 app(s) for shared web credentials.

Found 'appclips' key.
  Includes 1 app(s) for App Clips.

Summary: AASA file syntax looks good!</pre><p></p>
<p>## Wrapping Up</p>
<p>Building this little tool was a great reminder of how useful small, purpose-built CLI utilities can be. No dependencies (unless you want <code>certifi</code> for strict SSL), no web interfaces, just a quick sanity check to ensure iOS will swallow your AASA file correctly.</p>
<p>You can grab the script and use it in your own projects whenever Universal Links start acting up!<br />
https://gist.github.com/darcyliu/0f15d22751829f2fa4f5c811e15b67c8</p>
<p>-EOF-</p>
<hr /><small>Copyright &copy; 2005~2011 | <a href="https://ioio.name/a.html" title="Permalink">Permalink</a> | <a href="https://ioio.name/a.html#comments">0 Comments</a> | <a href="http://closetou.com" title="Close To U">Close To U</a> <br />
<a href="http://feeds.feedburner.com/miss">订阅</a> <a href="https://twitter.com/tearnon">Twitter</a> <a href="http://www.linode.com/?r=8dd6ddd391fc320d9f55ad101e051bde767df599">Linode VPS</a>
</small> )</small>]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>ssh stuck at expecting SSH2_MSG_KEX_ECDH_REPLY</title>
		<link>https://ioio.name/ssh-stuck-at-expecting-ssh2_msg_kex_ecdh_reply.html</link>
		
		<dc:creator><![CDATA[枯藤昏鸦]]></dc:creator>
		<pubDate>Fri, 25 Jul 2025 21:32:00 +0000</pubDate>
				<category><![CDATA[就是不分类]]></category>
		<guid isPermaLink="false">https://ioio.name/?p=2382</guid>

					<description><![CDATA[前段时间遇到使用了 WireGuard 的 IP SSH 卡在了 SSH2_MSG_KEX_ECDH_REPLY，使用主机对外的IP又能正常登陆。 debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: algorithm: sntrup761x25519-sha512@openssh.com debug1: kex: host key algorithm: ssh-ed25519 debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: compression: none debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: compression: none debug1: expecting SSH2_MSG_KEX_ECDH_REPLY 一番研究之后发现是 MTU 值偏低导致，在不调整 MTU 的情况下，可以更改 KexAlgorithms 或者 MACs 试试。 ssh root@10.10.10.10 -v -o &#8230; <p class="link-more"><a href="https://ioio.name/ssh-stuck-at-expecting-ssh2_msg_kex_ecdh_reply.html" class="more-link">Continue reading<span class="screen-reader-text"> "ssh stuck at expecting SSH2_MSG_KEX_ECDH_REPLY"</span></a></p>]]></description>
										<content:encoded><![CDATA[<p>前段时间遇到使用了 WireGuard 的 IP SSH 卡在了 SSH2_MSG_KEX_ECDH_REPLY，使用主机对外的IP又能正常登陆。<br />
<code></code><code><br />
debug1: SSH2_MSG_KEXINIT sent<br />
debug1: SSH2_MSG_KEXINIT received<br />
debug1: kex: algorithm: sntrup761x25519-sha512@openssh.com<br />
debug1: kex: host key algorithm: ssh-ed25519<br />
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none<br />
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none<br />
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY<br />
</code><code></code></p>
<p>一番研究之后发现是 MTU 值偏低导致，在不调整 MTU 的情况下，可以更改 KexAlgorithms 或者 MACs 试试。<br />
<code></code><code><br />
ssh root@10.10.10.10 -v -o KexAlgorithms=ecdh-sha2-nistp521<br />
ssh root@10.10.10.10 -v -o MACs=hmac-sha2-256<br />
</code><code></code></p>
<p>-EOF-</p>
<hr /><h2>Related posts:</h2><ul><li><a href="https://ioio.name/a.html" rel="bookmark" title="Permanent Link: Building a Command-Line Tool to Verify iOS AASAFiles">Building a Command-Line Tool to Verify iOS AASAFiles</a></li></ul><hr /><small>Copyright &copy; 2005~2011 | <a href="https://ioio.name/ssh-stuck-at-expecting-ssh2_msg_kex_ecdh_reply.html" title="Permalink">Permalink</a> | <a href="https://ioio.name/ssh-stuck-at-expecting-ssh2_msg_kex_ecdh_reply.html#comments">0 Comments</a> | <a href="http://closetou.com" title="Close To U">Close To U</a> <br />
<a href="http://feeds.feedburner.com/miss">订阅</a> <a href="https://twitter.com/tearnon">Twitter</a> <a href="http://www.linode.com/?r=8dd6ddd391fc320d9f55ad101e051bde767df599">Linode VPS</a>
</small> )</small>]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>macOS 不借助第三方软查看图片是否含有 Alpha 通道</title>
		<link>https://ioio.name/check-image-alpha-channel-on-macos.html</link>
		
		<dc:creator><![CDATA[枯藤昏鸦]]></dc:creator>
		<pubDate>Wed, 25 Jun 2025 04:24:14 +0000</pubDate>
				<category><![CDATA[就是不分类]]></category>
		<guid isPermaLink="false">https://ioio.name/?p=2378</guid>

					<description><![CDATA[方法一： Using Preview: 1. Open the image in Preview 2. Click Tools > Show Inspector (or press Cmd + I) 3. Click the &#8220;i&#8221; tab (Information) 4. Look under &#8220;More Info&#8221; &#8211; it will show color space and bits per component 方法二： Using Terminal: [crayon-6ae35f91c53d4584553081/] -EOF- Related posts:GAE SDK 1.4.0 预览版放出Judge Online System Download:Celiz Judge &#8230; <p class="link-more"><a href="https://ioio.name/check-image-alpha-channel-on-macos.html" class="more-link">Continue reading<span class="screen-reader-text"> "macOS 不借助第三方软查看图片是否含有 Alpha 通道"</span></a></p>]]></description>
										<content:encoded><![CDATA[<p>方法一：<br />
Using Preview:<br />
1. Open the image in Preview<br />
2. Click Tools > Show Inspector (or press Cmd + I)<br />
3. Click the &#8220;i&#8221; tab (Information)<br />
4. Look under &#8220;More Info&#8221; &#8211; it will show color space and bits per component</p>
<p>方法二：<br />
Using Terminal:</p><pre class="urvanov-syntax-highlighter-plain-tag">sips -g format -g pixelWidth -g pixelHeight -g hasAlpha path/to/image.jpg</pre><p>-EOF-</p>
<hr /><h2>Related posts:</h2><ul><li><a href="https://ioio.name/gae-sdk-140-prerelease.html" rel="bookmark" title="Permanent Link: GAE SDK 1.4.0 预览版放出">GAE SDK 1.4.0 预览版放出</a></li><li><a href="https://ioio.name/judge-online-system-download-celiz-judge-system.html" rel="bookmark" title="Permanent Link: Judge Online System Download:Celiz Judge System">Judge Online System Download:Celiz Judge System</a></li><li><a href="https://ioio.name/how-to-check-which-shell-i-am-using.html" rel="bookmark" title="Permanent Link: How to check which shell I am using?">How to check which shell I am using?</a></li><li><a href="https://ioio.name/a.html" rel="bookmark" title="Permanent Link: Building a Command-Line Tool to Verify iOS AASAFiles">Building a Command-Line Tool to Verify iOS AASAFiles</a></li><li><a href="https://ioio.name/google-app-engine-roadmap-2011.html" rel="bookmark" title="Permanent Link: Google App Engine Roadmap 2011">Google App Engine Roadmap 2011</a></li></ul><hr /><small>Copyright &copy; 2005~2011 | <a href="https://ioio.name/check-image-alpha-channel-on-macos.html" title="Permalink">Permalink</a> | <a href="https://ioio.name/check-image-alpha-channel-on-macos.html#comments">0 Comments</a> | <a href="http://closetou.com" title="Close To U">Close To U</a> <br />
<a href="http://feeds.feedburner.com/miss">订阅</a> <a href="https://twitter.com/tearnon">Twitter</a> <a href="http://www.linode.com/?r=8dd6ddd391fc320d9f55ad101e051bde767df599">Linode VPS</a>
</small> )</small>]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>快速添加public ssh key到服务器</title>
		<link>https://ioio.name/how-to-add-given-public-ssh-key-to-my-server.html</link>
		
		<dc:creator><![CDATA[枯藤昏鸦]]></dc:creator>
		<pubDate>Wed, 25 Jun 2025 04:01:49 +0000</pubDate>
				<category><![CDATA[就是不分类]]></category>
		<guid isPermaLink="false">https://ioio.name/?p=2375</guid>

					<description><![CDATA[登陆服务器，然后执行 [crayon-6ae35f91c5597393061281/] -EOF- Related posts:Google Public DNSSRV DNS 记录JAVA求素数算法实现ASP.NET MVC 1.0 的数据模型验证安装Visual Studio 2008 Team Foundation ServerCopyright &#169; 2005~2011 &#124; Permalink &#124; 0 Comments &#124; Close To U 订阅 Twitter Linode VPS )]]></description>
										<content:encoded><![CDATA[<p>登陆服务器，然后执行</p><pre class="urvanov-syntax-highlighter-plain-tag">mkdir -m 700 ~/.ssh
curl https://github.com/{username}.keys &gt;&gt; ~/.ssh/authorized_keys</pre><p>-EOF-</p>
<hr /><h2>Related posts:</h2><ul><li><a href="https://ioio.name/google-public-dns.html" rel="bookmark" title="Permanent Link: Google Public DNS">Google Public DNS</a></li><li><a href="https://ioio.name/srv-dns.html" rel="bookmark" title="Permanent Link: SRV DNS 记录">SRV DNS 记录</a></li><li><a href="https://ioio.name/java-prime.html" rel="bookmark" title="Permanent Link: JAVA求素数算法实现">JAVA求素数算法实现</a></li><li><a href="https://ioio.name/asp-net-mvc-1-0-onvalidate.html" rel="bookmark" title="Permanent Link: ASP.NET MVC 1.0 的数据模型验证">ASP.NET MVC 1.0 的数据模型验证</a></li><li><a href="https://ioio.name/install-visual-studio-2008-team-foundation-server.html" rel="bookmark" title="Permanent Link: 安装Visual Studio 2008 Team Foundation Server">安装Visual Studio 2008 Team Foundation Server</a></li></ul><hr /><small>Copyright &copy; 2005~2011 | <a href="https://ioio.name/how-to-add-given-public-ssh-key-to-my-server.html" title="Permalink">Permalink</a> | <a href="https://ioio.name/how-to-add-given-public-ssh-key-to-my-server.html#comments">0 Comments</a> | <a href="http://closetou.com" title="Close To U">Close To U</a> <br />
<a href="http://feeds.feedburner.com/miss">订阅</a> <a href="https://twitter.com/tearnon">Twitter</a> <a href="http://www.linode.com/?r=8dd6ddd391fc320d9f55ad101e051bde767df599">Linode VPS</a>
</small> )</small>]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>PSQL 常用命令</title>
		<link>https://ioio.name/psql-commonds.html</link>
		
		<dc:creator><![CDATA[枯藤昏鸦]]></dc:creator>
		<pubDate>Sun, 24 Nov 2024 06:18:01 +0000</pubDate>
				<category><![CDATA[就是不分类]]></category>
		<guid isPermaLink="false">https://ioio.name/?p=2356</guid>

					<description><![CDATA[Local Login [crayon-6ae35f91c5773852477083/] Remote or Standard Password Login [crayon-6ae35f91c577b562858695/] 创建新的数据库 [crayon-6ae35f91c577e585205912/] 创建新的用户 [crayon-6ae35f91c577f703564559/] 将新数据库的所有权限授予新用户 [crayon-6ae35f91c5781029806728/] 删除数据库 [crayon-6ae35f91c5783280444980/] 删除用户 [crayon-6ae35f91c5784800362078/] -EOF- Copyright &#169; 2005~2011 &#124; Permalink &#124; 0 Comments &#124; Close To U 订阅 Twitter Linode VPS )]]></description>
										<content:encoded><![CDATA[<p>Local Login</p><pre class="urvanov-syntax-highlighter-plain-tag">sudo -i -u postgres psql</pre><p></p>
<p>Remote or Standard Password Login</p><pre class="urvanov-syntax-highlighter-plain-tag">psql -h localhost -p 5432 -U postgres -d postgres</pre><p></p>
<p>创建新的数据库</p><pre class="urvanov-syntax-highlighter-plain-tag">psql -U postgres -c &quot;CREATE DATABASE $DB_NAME;&quot;</pre><p>创建新的用户</p><pre class="urvanov-syntax-highlighter-plain-tag">psql -U postgres -c &quot;CREATE USER $DB_USER WITH PASSWORD '$DB_PASSWORD';&quot;</pre><p>将新数据库的所有权限授予新用户</p><pre class="urvanov-syntax-highlighter-plain-tag">psql -U postgres -c &quot;GRANT ALL PRIVILEGES ON DATABASE $DB_NAME TO $DB_USER;&quot;</pre><p>删除数据库</p><pre class="urvanov-syntax-highlighter-plain-tag">psql -U postgres -c &quot;DROP DATABASE IF EXISTS $DB_NAME;&quot;</pre><p>删除用户</p><pre class="urvanov-syntax-highlighter-plain-tag">psql -U postgres -c &quot;DROP USER IF EXISTS $DB_USER;&quot;</pre><p>-EOF-</p>
<hr /><small>Copyright &copy; 2005~2011 | <a href="https://ioio.name/psql-commonds.html" title="Permalink">Permalink</a> | <a href="https://ioio.name/psql-commonds.html#comments">0 Comments</a> | <a href="http://closetou.com" title="Close To U">Close To U</a> <br />
<a href="http://feeds.feedburner.com/miss">订阅</a> <a href="https://twitter.com/tearnon">Twitter</a> <a href="http://www.linode.com/?r=8dd6ddd391fc320d9f55ad101e051bde767df599">Linode VPS</a>
</small> )</small>]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>修复 WordPress 的文件读写权限错误</title>
		<link>https://ioio.name/fix-wordpress-permission.html</link>
		
		<dc:creator><![CDATA[枯藤昏鸦]]></dc:creator>
		<pubDate>Wed, 31 Jul 2024 17:50:04 +0000</pubDate>
				<category><![CDATA[就是不分类]]></category>
		<guid isPermaLink="false">https://ioio.name/?p=2350</guid>

					<description><![CDATA[如果在 WordPress Site Health 页面遇到 “Some files are not writable by WordPress”, 可以通过如下的方式解决： 1. 检查 web server 所使用的 user 账号， 比如 nginx: [crayon-6ae35f91c5965849977025/] 如上 nginx 所使用的 user 为 www-data. 2. 将 WordPress 的文件 Owner 更改成 web server user, 比如： [crayon-6ae35f91c596f338897753/] 重新刷新页面即可。 -EOF- Related posts:WordPress在根目录中显示子目录下的BLOG内容WordPress用户角色换域名Hello,How are you!WordPress 2.2.2 简体中文语言文件Copyright &#169; 2005~2011 &#124; Permalink &#124; 0 Comments &#8230; <p class="link-more"><a href="https://ioio.name/fix-wordpress-permission.html" class="more-link">Continue reading<span class="screen-reader-text"> "修复 WordPress 的文件读写权限错误"</span></a></p>]]></description>
										<content:encoded><![CDATA[<p>如果在 WordPress Site Health 页面遇到 “Some files are not writable by WordPress”, 可以通过如下的方式解决：<br />
1. 检查 web server 所使用的 user 账号， 比如 nginx:</p><pre class="urvanov-syntax-highlighter-plain-tag">cat /etc/nginx/nginx.conf
user www-data;
worker_processes auto;
pid /run/nginx.pid;
error_log /var/log/nginx/error.log;
include /etc/nginx/modules-enabled/*.conf;</pre><p>如上 nginx 所使用的 user 为 <code>www-data</code>.<br />
2. 将 WordPress 的文件 Owner 更改成 web server user, 比如：</p><pre class="urvanov-syntax-highlighter-plain-tag">chown -R www-data:www-data /the/folder/place/the/wordpress/</pre><p>重新刷新页面即可。<br />
-EOF-</p>
<hr /><h2>Related posts:</h2><ul><li><a href="https://ioio.name/display-sub-dir-in-root-dir.html" rel="bookmark" title="Permanent Link: WordPress在根目录中显示子目录下的BLOG内容">WordPress在根目录中显示子目录下的BLOG内容</a></li><li><a href="https://ioio.name/wordpress-roles.html" rel="bookmark" title="Permanent Link: WordPress用户角色">WordPress用户角色</a></li><li><a href="https://ioio.name/new-domain.html" rel="bookmark" title="Permanent Link: 换域名">换域名</a></li><li><a href="https://ioio.name/hello-how-are-you.html" rel="bookmark" title="Permanent Link: Hello,How are you!">Hello,How are you!</a></li><li><a href="https://ioio.name/wordpress-222-chinese-lang.html" rel="bookmark" title="Permanent Link: WordPress 2.2.2 简体中文语言文件">WordPress 2.2.2 简体中文语言文件</a></li></ul><hr /><small>Copyright &copy; 2005~2011 | <a href="https://ioio.name/fix-wordpress-permission.html" title="Permalink">Permalink</a> | <a href="https://ioio.name/fix-wordpress-permission.html#comments">0 Comments</a> | <a href="http://closetou.com" title="Close To U">Close To U</a> <br />
<a href="http://feeds.feedburner.com/miss">订阅</a> <a href="https://twitter.com/tearnon">Twitter</a> <a href="http://www.linode.com/?r=8dd6ddd391fc320d9f55ad101e051bde767df599">Linode VPS</a>
</small> )</small>]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Unix/Linux enable IP forwarding(开启IP包转发)</title>
		<link>https://ioio.name/unix-linux-enable-ip-forwarding.html</link>
		
		<dc:creator><![CDATA[枯藤昏鸦]]></dc:creator>
		<pubDate>Sat, 30 Dec 2023 23:33:54 +0000</pubDate>
				<category><![CDATA[就是不分类]]></category>
		<guid isPermaLink="false">https://ioio.name/?p=2337</guid>

					<description><![CDATA[Unix/Linux在默认情况下在网络包转发是处于禁用状态的，在安装了 WireGuard 等网络流量转发软件后，需要开启IP包转发才能正常的处理来自客户的流量转发请求。 以下命令可以查询当前的 ip.forwarding 标记状态, 0表示已禁用，1表示已开启。 [crayon-6ae35f91c5b25871889214/] 我们可以通过设置该值为1开启IP包转发功能。 [crayon-6ae35f91c5b2e571571875/] -EOF- Related posts:Kubernetes Dashboard Disable Token TTL/Skip Login修复Nginx + PHP 5xx ErrorPredefined macros in compilers(clang, gcc)Judge Online System Download:Celiz Judge SystemSSH Port ForwardingCopyright &#169; 2005~2011 &#124; Permalink &#124; 0 Comments &#124; Close To U 订阅 Twitter Linode VPS )]]></description>
										<content:encoded><![CDATA[<p>Unix/Linux在默认情况下在网络包转发是处于禁用状态的，在安装了 WireGuard 等网络流量转发软件后，需要开启IP包转发才能正常的处理来自客户的流量转发请求。<br />
以下命令可以查询当前的 ip.forwarding 标记状态, 0表示已禁用，1表示已开启。</p><pre class="urvanov-syntax-highlighter-plain-tag">sysctl net.inet.ip.forwarding
sysctl net.inet6.ip6.forwarding</pre><p>我们可以通过设置该值为1开启IP包转发功能。</p><pre class="urvanov-syntax-highlighter-plain-tag">sysctl net.inet.ip.forwarding=1
sysctl net.inet6.ip6.forwarding=1</pre><p></p>
<p>-EOF-</p>
<hr /><h2>Related posts:</h2><ul><li><a href="https://ioio.name/kubernetes-dashboard-disable-token-ttl-skip-login.html" rel="bookmark" title="Permanent Link: Kubernetes Dashboard Disable Token TTL/Skip Login">Kubernetes Dashboard Disable Token TTL/Skip Login</a></li><li><a href="https://ioio.name/fix-nginx-php-5xx-error.html" rel="bookmark" title="Permanent Link: 修复Nginx + PHP 5xx Error">修复Nginx + PHP 5xx Error</a></li><li><a href="https://ioio.name/predefined-macros-in-compilersclang-gcc.html" rel="bookmark" title="Permanent Link: Predefined macros in compilers(clang, gcc)">Predefined macros in compilers(clang, gcc)</a></li><li><a href="https://ioio.name/judge-online-system-download-celiz-judge-system.html" rel="bookmark" title="Permanent Link: Judge Online System Download:Celiz Judge System">Judge Online System Download:Celiz Judge System</a></li><li><a href="https://ioio.name/ssh-port-forwarding.html" rel="bookmark" title="Permanent Link: SSH Port Forwarding">SSH Port Forwarding</a></li></ul><hr /><small>Copyright &copy; 2005~2011 | <a href="https://ioio.name/unix-linux-enable-ip-forwarding.html" title="Permalink">Permalink</a> | <a href="https://ioio.name/unix-linux-enable-ip-forwarding.html#comments">0 Comments</a> | <a href="http://closetou.com" title="Close To U">Close To U</a> <br />
<a href="http://feeds.feedburner.com/miss">订阅</a> <a href="https://twitter.com/tearnon">Twitter</a> <a href="http://www.linode.com/?r=8dd6ddd391fc320d9f55ad101e051bde767df599">Linode VPS</a>
</small> )</small>]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>修复Nginx + PHP 5xx Error</title>
		<link>https://ioio.name/fix-nginx-php-5xx-error.html</link>
		
		<dc:creator><![CDATA[枯藤昏鸦]]></dc:creator>
		<pubDate>Sat, 30 Dec 2023 00:59:04 +0000</pubDate>
				<category><![CDATA[就是不分类]]></category>
		<guid isPermaLink="false">https://ioio.name/?p=2331</guid>

					<description><![CDATA[之前时不时会收到 Google Search Console 发来的邮件告知在索引页面的时候遇到了5xx，一直都没有管。 直到上周我自己重现了一次才开始重视起来。 Search Console has identified that your site is affected by 1 Page indexing issue(s). The following issues were found on your site. Top Issues Server error (5xx) We recommend that you fix these issues when possible to enable the best experience and coverage in Google Search. 检查日志发现如下内容： 2023/12/12 01:23:45 &#8230; <p class="link-more"><a href="https://ioio.name/fix-nginx-php-5xx-error.html" class="more-link">Continue reading<span class="screen-reader-text"> "修复Nginx + PHP 5xx Error"</span></a></p>]]></description>
										<content:encoded><![CDATA[<p>之前时不时会收到 Google Search Console 发来的邮件告知在索引页面的时候遇到了5xx，一直都没有管。 直到上周我自己重现了一次才开始重视起来。<br />
<quote>Search Console has identified that your site is affected by 1 Page indexing issue(s). The following issues were found on your site.</quote></p>
<p>Top Issues</p>
<p>Server error (5xx)<br />
We recommend that you fix these issues when possible to enable the best experience and coverage in Google Search.<br />
检查日志发现如下内容：<br />
<code><br />
2023/12/12 01:23:45 [error] 2175086#0: *57111 connect() to unix:/run/php-fpm/www.sock failed (11: Resource temporarily unavailable) while connecting to upstream, client: 192.3.114.12, server: example.com, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm/www.sock:", host: "example.com", referrer: "http://example.com/"<br />
</code><br />
于是跑了一遍压力测试，发现将近一半的请求都遇到5xx错误，同时日志中产生如上记录。<br />
<code><br />
wrk -t12 -c400 -d30s https://ioio.name<br />
</code></p>
<p>便因此做了一下研究，主要参考 <a href="https://serverfault.com/questions/867866/11-resource-temporarily-unavailable-while-connecting-to-upstream-bad-gateway" target="_blank" rel="noopener">11: Resource temporarily unavailable, while connecting to upstream + Bad Gateway (Nginx)</a></p>
<p>通过执行如下命令调整了 net.core.somaxconn 及 net.core.netdev_max_backlog<br />
<code><br />
echo "net.core.somaxconn = 65535" | sudo tee -a /etc/sysctl.conf<br />
sudo sysctl -p<br />
echo "net.core.netdev_max_backlog = 65535" | sudo tee -a /etc/sysctl.conf<br />
sudo sysctl -p<br />
</code></p>
<p>更新nginx配置文件，给 FastCGI service 添加</p><pre class="urvanov-syntax-highlighter-plain-tag">fastcgi_keep_conn on;</pre><p></p>
<p>然后重启服务</p><pre class="urvanov-syntax-highlighter-plain-tag">systemctl restart php-fpm.service
systemctl restart nginx</pre><p></p>
<p>再次运行压力测试，错误消失。<br />
<code><br />
wrk -t12 -c400 -d30s https://ioio.name<br />
Running 30s test @ https://ioio.name<br />
12 threads and 400 connections<br />
Thread Stats   Avg      Stdev     Max   +/- Stdev<br />
Latency   180.51ms   88.60ms   1.91s    89.36%<br />
Req/Sec   109.17     32.60   212.00     71.29%<br />
39114 requests in 30.08s, 1.86GB read<br />
Socket errors: connect 158, read 0, write 0, timeout 0<br />
Requests/sec:   1300.31<br />
Transfer/sec:     63.29MB<br />
</code><br />
-EOF-</p>
<hr /><h2>Related posts:</h2><ul><li><a href="https://ioio.name/fix-wordpress-permission.html" rel="bookmark" title="Permanent Link: 修复 WordPress 的文件读写权限错误">修复 WordPress 的文件读写权限错误</a></li><li><a href="https://ioio.name/jquery-error-event.html" rel="bookmark" title="Permanent Link: jQuery取得页面JavaScript错误">jQuery取得页面JavaScript错误</a></li><li><a href="https://ioio.name/lion-install-mod-python.html" rel="bookmark" title="Permanent Link: [Mac OS X]Lion编译安装mod_python">[Mac OS X]Lion编译安装mod_python</a></li><li><a href="https://ioio.name/gae-templatedoesnotexist-error.html" rel="bookmark" title="Permanent Link: GAE TemplateDoesNotExist Error">GAE TemplateDoesNotExist Error</a></li><li><a href="https://ioio.name/using-recaptcha-with-google-app-engine.html" rel="bookmark" title="Permanent Link: 在GAE中使用reCAPTCHA">在GAE中使用reCAPTCHA</a></li></ul><hr /><small>Copyright &copy; 2005~2011 | <a href="https://ioio.name/fix-nginx-php-5xx-error.html" title="Permalink">Permalink</a> | <a href="https://ioio.name/fix-nginx-php-5xx-error.html#comments">0 Comments</a> | <a href="http://closetou.com" title="Close To U">Close To U</a> <br />
<a href="http://feeds.feedburner.com/miss">订阅</a> <a href="https://twitter.com/tearnon">Twitter</a> <a href="http://www.linode.com/?r=8dd6ddd391fc320d9f55ad101e051bde767df599">Linode VPS</a>
</small> )</small>]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to Install PostgreSQL on FreeBSD</title>
		<link>https://ioio.name/how-to-install-postgresql-on-freebsd.html</link>
		
		<dc:creator><![CDATA[枯藤昏鸦]]></dc:creator>
		<pubDate>Sat, 18 Nov 2023 21:24:14 +0000</pubDate>
				<category><![CDATA[就是不分类]]></category>
		<guid isPermaLink="false">https://ioio.name/?p=2326</guid>

					<description><![CDATA[1. Update all available repository and upgrade all packages to the latest [crayon-6ae35f91c5e90621878164/] 2. Install PostgreSQL 13 [crayon-6ae35f91c5e99898114559/] 3. Add the PostgreSQL to the system boot: [crayon-6ae35f91c5e9b755118550/] 4. Initialize the PostgreSQL database [crayon-6ae35f91c5e9c300282001/] 5. Start the PostgreSQL service and check its status [crayon-6ae35f91c5e9e369158439/] -EOF- Related posts:Update FreeBSD hostnameUbuntu 安装 Python Imaging Library (PIL)如何在 Debian/Ubuntu VPS &#8230; <p class="link-more"><a href="https://ioio.name/how-to-install-postgresql-on-freebsd.html" class="more-link">Continue reading<span class="screen-reader-text"> "How to Install PostgreSQL on FreeBSD"</span></a></p>]]></description>
										<content:encoded><![CDATA[<p>1. Update all available repository and upgrade all packages to the latest</p><pre class="urvanov-syntax-highlighter-plain-tag">pkg update
pkg upgrade</pre><p>2. Install PostgreSQL 13</p><pre class="urvanov-syntax-highlighter-plain-tag">pkg install postgresql13-server postgresql13-client</pre><p>3. Add the PostgreSQL to the system boot:</p><pre class="urvanov-syntax-highlighter-plain-tag">sysrc postgresql_enable=yes</pre><p>4. Initialize the PostgreSQL database</p><pre class="urvanov-syntax-highlighter-plain-tag">/usr/local/etc/rc.d/postgresql initdb</pre><p>5. Start the PostgreSQL service and check its status</p><pre class="urvanov-syntax-highlighter-plain-tag">service postgresql start
service postgresql status</pre><p>-EOF-</p>
<hr /><h2>Related posts:</h2><ul><li><a href="https://ioio.name/update-freebsd-hostname.html" rel="bookmark" title="Permanent Link: Update FreeBSD hostname">Update FreeBSD hostname</a></li><li><a href="https://ioio.name/ubuntu-pil.html" rel="bookmark" title="Permanent Link: Ubuntu 安装 Python Imaging Library (PIL)">Ubuntu 安装 Python Imaging Library (PIL)</a></li><li><a href="https://ioio.name/how-to-install-openvpn-on-a-debianubuntu-vps.html" rel="bookmark" title="Permanent Link: 如何在 Debian/Ubuntu VPS 安装 OpenVPN">如何在 Debian/Ubuntu VPS 安装 OpenVPN</a></li><li><a href="https://ioio.name/install-wget.html" rel="bookmark" title="Permanent Link: wget的下载与安装">wget的下载与安装</a></li><li><a href="https://ioio.name/ubuntu-filezilla-putty-bluefish.html" rel="bookmark" title="Permanent Link: Ubuntu 下常用工具软件的安装">Ubuntu 下常用工具软件的安装</a></li></ul><hr /><small>Copyright &copy; 2005~2011 | <a href="https://ioio.name/how-to-install-postgresql-on-freebsd.html" title="Permalink">Permalink</a> | <a href="https://ioio.name/how-to-install-postgresql-on-freebsd.html#comments">0 Comments</a> | <a href="http://closetou.com" title="Close To U">Close To U</a> <br />
<a href="http://feeds.feedburner.com/miss">订阅</a> <a href="https://twitter.com/tearnon">Twitter</a> <a href="http://www.linode.com/?r=8dd6ddd391fc320d9f55ad101e051bde767df599">Linode VPS</a>
</small> )</small>]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
