Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
ホスト名の命名規則について調査してみた
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
YouYou
May 29, 2021
Programming
11k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
ホスト名の命名規則について調査してみた
詳細ブログ↓
https://zenn.dev/yuta28/articles/hostname-os-research
YouYou
May 29, 2021
More Decks by YouYou
See All by YouYou
AWSマネコンに複数のアカウントで入れるようになりました
yuhta28
2
290
今インフラ技術をイチから学び直すなら
yuhta28
1
300
AWSに詳しくない人でも始められるコスト最適化ガイド
yuhta28
3
680
Datadog外形監視基盤をEC2から ECSへ移行してみた
yuhta28
0
1.8k
アウトプット頑張ったら企業からLT登壇の依頼がきた話
yuhta28
1
1.8k
小さなことから始めるAWSコスト最適入門
yuhta28
1
1.4k
Datadogのコストも監視しよう
yuhta28
1
1.1k
Rcloneを使った定期的なストレージ同期
yuhta28
0
830
Pulumiを触ってみよう
yuhta28
1
2.7k
Other Decks in Programming
See All in Programming
エージェンティックRAGにAWSで入門しよう!
har1101
8
1.5k
PHPで使える日時の表現と、その知り方 #frontend_phpcon_do
o0h
PRO
0
240
Creating Composable Callables in Contemporary C++
rollbear
0
130
The NotImplementedError Problem in Ruby
koic
1
770
Vite+ Unified Toolchain for the Web
naokihaba
0
300
並列実装の現場、2ヶ月間実務でAIを使い倒したAIもPCも私も限界が近い
ming_ayami
0
130
ローカルLLMでどこまでコードが書けるか -拡張版 / How much code can be written on a local LLM Extended
kishida
10
4k
ECSアプリログをFireLensでコスト削減しようとしたけど諦めた話 in Fargate×Node.js
akihisaikeda
2
4.2k
生成AI時代にこそ効くGo | Why Go Works in the Age of Generative AI
mom0tomo
8
3.2k
軽量Java基盤の設計 DIコンテナに頼らない、長期保守と1秒起動の実現 JJUG CCC 2026 Spring
macha64
0
510
Datadog × OpenTelemetry 入門と実践のあいだ
kn_to_maxpno
1
160
気づいたらRubyで100作品 ー クリエイティブコーディングが生活の一部になるまで / 100 Ruby Sketches Later: How Creative Coding Became Part of My Life
chobishiba
3
570
Featured
See All Featured
How to make the Groovebox
asonas
2
2.2k
Building AI with AI
inesmontani
PRO
1
1.1k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
1
190
Visualization
eitanlees
152
17k
Evolving SEO for Evolving Search Engines
ryanjones
0
220
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.7k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
310
Amusing Abliteration
ianozsvald
1
200
Paper Plane (Part 1)
katiecoart
PRO
0
8.9k
GraphQLとの向き合い方2022年版
quramy
50
15k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
380
Transcript
ホスト名の命名規則について 調査してみた
Name:ユータ Occupation:SRE Twitter:@Y0u281 (オーでなくゼロです) ブログ:https://zenn.dev/yuta28 自己紹介 Twitter 2
目次 • きっかけ • 疑問 • 検証 • 調査結果 •
おまけ • まとめ
きっかけ • CentOSからUbuntuへのサーバー移行 • 移行後にホスト名をCentOSのものに変更したら失敗した アンダースコアが消えてる
きっかけ • ホスト名を変更したが、正しく変更されなかった。 • RFCのルールではダメらしい A "name" (Net, Host, Gateway,
or Domain name) is a text string up to 24 characters drawn from the alphabet (A-Z), digits (0-9), minus sign (-), and period (.). ホスト名は24文字以下で英字、数字、ハイフン(-)、ピリオド(.)が使用できます。ピリオドは、 ドメイン名の区切りに限ってのみ使用できます。
疑問 • RFCのルールは厳密に守られているのか • OS毎にルールの遵守が異なるのか CentOSでアンダースコアをホスト名に 使えるのはなぜ?
検証 1. ホスト名にアンスコ(_)、アットマーク(@)、アスタリスク(*)を使えるか 2. ホスト名に日本語は使えるか 3. ホスト名の先頭に英字以外の文字が使えるか 4. ホスト名の最後にハイフン (-)、ピリオド(.)が使えるか
5. ホスト名の文字数に24文字以上設定できるか 6. 空白文字が使えるか • Ubuntu 20.04 • Amazon Linux 2 • Red Hat Enterprise Linux 8.3 • openSUSE 15.2 • Debian GNU/Linux 10
・Ubuntu ・Amazon Linux2 UbuntuとAmazon Linux2の比較 $ sudo hostnamectl set-hostname Yuta_Ubuntu@PC*AWS
#ルール①検証 $ hostname YutaUbuntuPCAWS $ sudo hostnamectl set-hostname Yuta_Amazon@Linux2*AWS #ルール①検証 $ hostname yuta_amazonlinux2aws $ sudo hostnamectl set-hostname Yuta- #ルール④検証 $ hostname Yuta $ sudo hostnamectl set-hostname Yuta- #ルール④検証 $ hostname yuta-
調査結果 検証 Ubuntu Amazon Linux2 RHEL openSUSE Debian ① ☓
△ △ △ ☓ ② ☓ ☓ ☓ ☓ ☓ ③ ◦ ◦ ◦ ◦ ◦ ④ ☓ △ △ △ ☓ ⑤ ◦ ◦ ◦ ◦ ◦ ⑥ ☓ ☓ ☓ ☓ ☓
おまけ はどうなの?
検証 1. ホスト名にアンスコ(_)、アットマーク(@)、アスタリスク(*)を使えるか 2. ホスト名に日本語は使えるか 3. ホスト名の先頭に英字以外の文字が使えるか 4. ホスト名の最後にハイフン (-)、ピリオド(.)が使えるか
5. ホスト名の文字数に24文字以上設定できるか 6. 空白文字が使えるか Windowsだしルール遵守で 全部使えないだろうなー
おまけ Windows Server 2019は日本語ホストネームが使えた!
まとめ • Ubuntu系はルール遵守が厳しい • Fedora系は寛容 • Windowsは独自性
ありがとうございました より詳しい内容は以下のブログで↓ Linuxのホスト名について調査して みた 14