TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Dipping my toes in OpenBSD, in Amsterdam

78 点作者 DJHenk大约 2 个月前

9 条评论

palata大约 2 个月前
Very nice read!<p>This really resonated with me:<p>&gt; I would skim the documentation for the command to run, or the configuration to enter, only to get error messages in response. Then a period of frantic searching and trial and error would follow. Until I finally got it right. Once it worked, I reread the original documentation and saw that the answers were right there all along. Crystal clear. And yet somehow it did not register the first time. This happened on multiple occasions.
评论 #43563834 未加载
sim7c00大约 2 个月前
haha thanks this seems so oddly familiar. setting up openbsd on a vps slowly. each problem as you write, stumped, searching frustratedly. only to find the answer staring me in the face in the docs i definitely tried to read the first time round :&#x27;)... getting slowly more into the &#x27;read it slowly and take notes&#x27;. litterally every issue :D. they say these man pages &#x2F; docs are the best. they really are. maybe there is some learning curve to transition from bad documentation to good documentation...<p>either way, thanks for writeup, definitely going to reread it better and maybe it will save me some fallingonmyface soon!
WalterGillman大约 2 个月前
If you forget about the security focus that only started when Theo de Raadt got pwned by N3tBSD h4xx0rz, it is one of the best OS experiences the interwebs has to offer.<p>It has gotten a lot friendlier than it used to be too. It used to be that you had to build your own -CURRENT every week if you wanted to have something akin to an update.<p>Nowadays, you can run a binary update every six months and you even get binary patches for the errata in the interim. And if you need to patch your kernel you can grab it from GitHub.<p>I had a small board from 10 years ago I wanted to turn into a VPN and I just had to boot it, connect the serial adapter, download a new bsd.rd, and it was fresh and ready to go again.<p>It&#x27;s sad that they had to let VAX and other legacy platforms go with the switch to clang, but, if some hardware has ever worked in OpenBSD, it is likely to keep working decades from now.<p>Sent from my OpenBSD M2 MacBook.
fattosan大约 2 个月前
Very good read, made me want to try OpenBSD again after a story similar to yours.
jhancock大约 2 个月前
thanks for the good read.<p>I used Amsterdam BSD two years back to scratch my itch. It was a no nonsense, perhaps perfect way to try out OpenBSD.<p>The thing keeping me from using OpenBSD&#x2F;FreeBSD on my new production app is I don&#x27;t know what kinds of issues I may run into compared to Debian stable on a fairly beefy dedicated server.<p>My new app has dependancies:<p>a) http reverse proxy. No problem<p>b) Java 21 &#x2F; Clojure 1.12. JDK 21 virtual threads is a must. Unclear what level of support&#x2F;quality can be expected on OpenBSD or FreeBSD.<p>c) Postgres 17 (TimeScale)
ninjin大约 2 个月前
Beautiful, thoughtful writing. In an era where taking time to understand something thoroughly seem to fall to the wayside over skimming, this warmed my heart: &quot;Originally I planned to make this post a simple recipe. Just follow these steps, and you have your website running in no time. But now I know it won&#x27;t work like that. At least not for everyone. Instead, I&#x27;ll just give you the list of resources I used and the first version of the configuration files that worked. The ingredient you need to add is some time and effort&quot;.<p>As a somewhat more senior OpenBSD user (daily driver on my work laptop, work desktop, maintaining two servers, and reading misc@ and tech@), I think you can drop your reliance on relayd(8) and make your configuration <i>much</i> simpler. Yes, you lose caching granularity, but I doubt you see the amount of traffic needed to justify monthly and annual cache limits. Here is a sketch which I have typed out without <i>any</i> testing.<p>&#x2F;etc&#x2F;acme-client.conf<p><pre><code> domain ewintr.nl { domain key &quot;&#x2F;etc&#x2F;ssl&#x2F;private&#x2F;ewintr.nl.key&quot; domain full chain certificate &quot;&#x2F;etc&#x2F;ssl&#x2F;ewintr.nl.fullchain.pem&quot; sign with letsencrypt } domain vrijkorteverhalen.nl { domain key &quot;&#x2F;etc&#x2F;ssl&#x2F;private&#x2F;vrijkorteverhalen.nl.key&quot; domain full chain certificate &quot;&#x2F;etc&#x2F;ssl&#x2F;vrijkorteverhalen.nl.fullchain.pem&quot; sign with letsencrypt } </code></pre> &#x2F;etc&#x2F;httpd.conf:<p><pre><code> types { include &quot;&#x2F;usr&#x2F;share&#x2F;misc&#x2F;mime.types&quot; } server http { listen on * port 80 location &quot;&#x2F;.well-known&#x2F;acme-challenge&#x2F;*&quot; { root &quot;&#x2F;acme&quot; request strip 2 } location * { block return 301 &quot;https:&#x2F;&#x2F;$HTTP_HOST$REQUEST_URI&quot; } } server &quot;ewintr.nl&quot; { listen on * port 80 listen on * tls port 443 root &quot;&#x2F;htdocs&#x2F;ewintr.nl&quot; tls { certificate &quot;&#x2F;etc&#x2F;ssl&#x2F;ewintr.nl.fullchain.pem&quot; key &quot;&#x2F;etc&#x2F;ssl&#x2F;private&#x2F;ewintr.nl.key&quot; } location match &quot;&#x2F;linklog&#x2F;%d*&#x2F;links%-([%d%-]*)&quot; { block return 302 &quot;$REQUEST_SCHEME:&#x2F;&#x2F;$HTTP_HOST&#x2F;linklog&#x2F;#links-%1&quot; } location &quot;&#x2F;feed&#x2F;&quot; { block return 302 &quot;$REQUEST_SCHEME:&#x2F;&#x2F;$HTTP_HOST&#x2F;atom.xml&quot; } location &quot;&#x2F;quick-go-test-clycle-with-reflex&quot; { block return 301 &quot;$REQUEST_SCHEME:&#x2F;&#x2F;$HTTP_HOST&#x2F;posts&#x2F;2020&#x2F;quick-go-test-cycle-with-reflex&#x2F;&quot; } # ---&amp;&lt;--- } server &quot;vrijkorteverhalen.nl&quot; { listen on * port 80 listen on * tls port 443 root &quot;&#x2F;htdocs&#x2F;vrijkorteverhalen.nl&quot; tls { certificate &quot;&#x2F;etc&#x2F;ssl&#x2F;vrijkorteverhalen.nl.fullchain.pem&quot; key &quot;&#x2F;etc&#x2F;ssl&#x2F;private&#x2F;vrijkorteverhalen.nl.key&quot; } } </code></pre> Do not forget to add your acme-client calls to crontab(1) (as is <i>of course</i> noted on the manpage).<p>My philosophy so far is that the shorter my configuration files, the easier it is to read&#x2F;comprehend, the more defaults I rely on, and the happier I am as a user. Learning to live with defaults and resisting nearly all urges to deviate from them is a virtue that OpenBSD teaches <i>very</i> well.<p>Now if only I could figure out why streaming 1440p60 x11grab to 1080p60 always leads to massive frame drops if anything else is running on the system (Is it the kernel not being preemptive? Xenocara?) I would have all my own use cases covered.
ptek大约 2 个月前
I thought ast (Andrew Tanenbaum) would cycle past and kick you in the water and say &quot;This is Minix territory&quot;.
damhsa大约 2 个月前
i didnt understand it until i stumbled on the bsd supp docs that openbsd couldnt be ****** to include. i dont have the sources, but v7 vol2 is close enough:<p><a href="https:&#x2F;&#x2F;s3.amazonaws.com&#x2F;plan9-bell-labs&#x2F;7thEdMan&#x2F;bswv7.html" rel="nofollow">https:&#x2F;&#x2F;s3.amazonaws.com&#x2F;plan9-bell-labs&#x2F;7thEdMan&#x2F;bswv7.html</a><p>vol2 contains fuller book like manuals and tutorials for complicated things like ed, C, filesystem, UNIX, etc. and should be your first introduction to UNIX&#x2F;BSD, while the man(1) program (vol1) serves as a complementary quick reference for experienced users and for short programs that dont need much explanation. sadly V7 wont tell you about the internet because that was started by the &quot;net&quot; releases of 4.3-4.4BSD (see kirk mckusicks history <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=DEEr6dT-4uQ" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=DEEr6dT-4uQ</a> )<p>for vi, get the PostScript.ps files for the OTHER manual from keith bostics sources (openbsd src only has troff source and no troff):<p><a href="https:&#x2F;&#x2F;sites.google.com&#x2F;a&#x2F;bostic.com&#x2F;keithbostic&#x2F;the-berkeley-vi-editor-home-page" rel="nofollow">https:&#x2F;&#x2F;sites.google.com&#x2F;a&#x2F;bostic.com&#x2F;keithbostic&#x2F;the-berkel...</a><p><pre><code> echo pkg_add ghostscript | su root tar xfz nvi-1.79.tar.gz cd nvi-1.79&#x2F;docs&#x2F;USD.doc (cd vi.ref; ps2pdf vi.ref.ps) (cd vi.tut; ps2pdf vi.tut.ps) </code></pre> the interactive vi tutorial is also great:<p><pre><code> cp &#x2F;usr&#x2F;src&#x2F;usr.bin&#x2F;vi&#x2F;docs&#x2F;tutorial&#x2F;* .&#x2F; vi vi.beginner vi vi.advanced </code></pre> assuming you installed the relevant src tar:<p><pre><code> ftp -C https:&#x2F;&#x2F;cdn.openbsd.org&#x2F;pub&#x2F;OpenBSD&#x2F;&quot;`uname -r`&quot;&#x2F;SHA256.sig &amp;&amp; ftp -C https:&#x2F;&#x2F;cdn.openbsd.org&#x2F;pub&#x2F;OpenBSD&#x2F;&quot;`uname -r`&quot;&#x2F;src.tar.gz &amp;&amp; signify -Cp &#x2F;etc&#x2F;signify&#x2F;openbsd-&quot;`uname -r|tr -d .`&quot;-base.pub -x SHA256.sig src.tar.gz &amp;&amp; su root -c &#x27;tar xfzCp src.tar.gz&#x27; </code></pre> wouldnt it be nice if installation did this and syspatch patched it and sysupgrade merged it?<p>openbsd is also not very good at pointing you to the right manual. making them grepable was a small improvement for me.<p><pre><code> mkdir man &amp;&amp; cd man &amp;&amp; for n in 1 2 3 4 5 6 7 8 9 do for m in &#x2F;usr&#x2F;share&#x2F;man&#x2F;man$n{&#x2F;,&#x2F;&quot;`machine`&quot;&#x2F;}* do test -f &quot;$m&quot; &amp;&amp; man $n &quot;`basename $m .$n`&quot; | col -b &gt; &quot;`basename $m`&quot; done done grep relink * | grep kernel </code></pre> maybe use it to train an LLM, idk.<p><i>the 15 min long boot is due to relinking done by &#x2F;etc&#x2F;rc</i><p>you can try pressing ^T to see whats going on at boot and ^C to skip anything<p>or just delete it from &#x2F;etc&#x2F;rc<p><pre><code> login root cp &#x2F;etc&#x2F;rc &#x2F;etc&#x2F;rc.old ed &#x2F;etc&#x2F;rc g&#x2F;reorder&#x2F;p &#x2F;^reorder_libs[^()]*$&#x2F;s&#x2F;^&#x2F;# &#x2F;^wait_reorder_libs[^()]*$&#x2F;s&#x2F;^&#x2F;# &#x2F;reorder_kernel&#x2F;s&#x2F;^&#x2F;# wq </code></pre> you are now on the beginning of the long, tedious, futile and soul crushing journey of dealing with documentation and source code on openbsd.
评论 #43567488 未加载
评论 #43567224 未加载
DrNosferatu大约 2 个月前
Just ask a LLM what are the commands to perform what you need to do.<p>We are indeed living in new times.<p>But don’t let that get in the way of the Amsterdam socializing :)