<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Unix on Net Boy</title>
    <link>https://lian.st/tags/unix/</link>
    <description>Recent content in Unix on Net Boy</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-gb</language>
    <lastBuildDate>Wed, 16 Oct 2024 15:31:15 +0800</lastBuildDate><atom:link href="https://lian.st/tags/unix/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>FreeBSD更換pkg國內源</title>
      <link>https://lian.st/posts/e703e108/</link>
      <pubDate>Wed, 16 Oct 2024 15:31:15 +0800</pubDate>
      
      <guid>https://lian.st/posts/e703e108/</guid>
      
      <description>&lt;h2 id=&#34;備份源文件&#34;&gt;備份源文件&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;root@localhost:/ # cd /etc/pkg/
root@localhost:/etc/pkg # cp FreeBSD.conf FreeBSD.conf.bak
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;編輯配置文件&#34;&gt;編輯配置文件&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;root@localhost:/etc/pkg # vi FreeBSD.conf
# 南京大學
FreeBSD: {
  url: &amp;#34;http://mirrors.nju.edu.cn/freebsd-pkg/${ABI}/quarterly&amp;#34;,
  mirror_type: &amp;#34;srv&amp;#34;,
  signature_type: &amp;#34;fingerprints&amp;#34;,
  fingerprints: &amp;#34;/usr/share/keys/pkg&amp;#34;,
  enabled: yes
}
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;更新-pkg-数据库&#34;&gt;更新 &lt;code&gt;pkg&lt;/code&gt; 数据库&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;root@localhost:/etc/pkg # pkg update
Updating FreeBSD repository catalogue...
pkg: Repository FreeBSD has a wrong packagesite, need to re-create database
pkg: No SRV record found for the repo &amp;#39;FreeBSD&amp;#39;
Fetching meta.conf: 100%    178 B   0.2kB/s    00:01    
Fetching data.pkg: 100%    7 MiB   7.3MB/s    00:01    
Processing entries: 100%
FreeBSD repository update completed. 34404 packages processed.
All repositories are up to date.
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;查看當前使用的源&#34;&gt;查看當前使用的源&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;root@localhost:/etc/pkg # pkg -vv | grep url
    url             : &amp;#34;http://mirrors.nju.edu.cn/freebsd-pkg/FreeBSD:14:amd64/quarterly&amp;#34;,
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;常用國內源&#34;&gt;常用國內源&lt;/h2&gt;
&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th style=&#34;text-align: left&#34;&gt;Owner&lt;/th&gt;
          &lt;th style=&#34;text-align: left&#34;&gt;URL&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;中国科学技术大学&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;a href=&#34;http://mirrors.ustc.edu.cn/freebsd-pkg/$%7BABI%7D/quarterly&#34;&gt;http://mirrors.ustc.edu.cn/freebsd-pkg/${ABI}/quarterly&lt;/a&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;南京大学&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;a href=&#34;http://mirrors.nju.edu.cn/freebsd-pkg/$%7BABI%7D/quarterly&#34;&gt;http://mirrors.nju.edu.cn/freebsd-pkg/${ABI}/quarterly&lt;/a&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;網易&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;a href=&#34;http://mirrors.163.com/freebsd-pkg/$%7BABI%7D/quarterly&#34;&gt;http://mirrors.163.com/freebsd-pkg/${ABI}/quarterly&lt;/a&gt;&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;</description>
      
    </item>
    
  </channel>
</rss>
