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
systemdでよく使うサブコマンド
Search
Kazuhiro NISHIYAMA
June 24, 2018
Technology
380
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
systemdでよく使うサブコマンド
第136回関西Debian勉強会 + Linux Kernel 勉強会 LT大会
https://debianjp.connpass.com/event/90376/
での発表資料です。
Kazuhiro NISHIYAMA
June 24, 2018
More Decks by Kazuhiro NISHIYAMA
See All by Kazuhiro NISHIYAMA
Rubyの配布パッケージの変遷
znz
0
31
Headscale + Tailscale に移行中
znz
0
72
Ruby on Rails と私
znz
0
79
riscv64.rubyci.org internal
znz
0
59
Rubyの日本語リファレンスマニュアルの現在と未来
znz
0
120
devise-two-factorを4.xから5.xに上げた話
znz
0
430
docs.ruby-lang.org/ja/ の生成方法を変えた
znz
0
120
Ubuntuのriscv64版をqemuで動かした
znz
0
150
lilo.linux.or.jpをbusterからbullseyeに上げた
znz
0
150
Other Decks in Technology
See All in Technology
オブザーバビリティ、本当に活用できてる? 〜API連携×生成AIで成熟度を自動評価〜
dmmsre
1
3.3k
穢れた技術選定について
watany
16
4.6k
Claude Code 珍プレー好プレー
shinyasaita
0
340
SREとQA 二人三脚で進めるSLO運用/sre-qa-slo
sugitak
0
650
人を動かすのは時間ではなく、納得感 〜新任EMが入社3ヶ月、組織を2回変えた話〜
kakehashi
PRO
3
250
環境凍結という Toil を倒す -セルフサービス型 Ephemeral テスト環境の 設計と実践
shirouz
1
2.4k
証券システムを10年Scalaで作り続けるということ - 関数型まつり2026
krrrr38
3
860
End-to-Endで考える信頼性 —LINEアプリにおけるクライアント開発×SRE連携の実践
maruloop
4
4.3k
SoccerMaster: A Vision Foundation Model for Soccer Understanding
kzykmyzw
0
110
Type-safe IaC for Dart
coborinai
0
110
AmplifyHostingConstructからSSRフレームワークのためのホスティング設計を考察する/amplify-hosting-construct
fossamagna
1
110
キャリアの中で本を作る / Making a Book During Your Career
ak1210
0
140
Featured
See All Featured
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.9k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
From π to Pie charts
rasagy
0
230
The Limits of Empathy - UXLibs8
cassininazir
1
480
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
240
RailsConf 2023
tenderlove
30
1.5k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
410
Game over? The fight for quality and originality in the time of robots
wayneb77
1
220
Test your architecture with Archunit
thirion
1
2.3k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
220
Claude Code のすすめ
schroneko
67
230k
Transcript
systemdでよく使うサブコマン ド Kazuhiro NISHIYAMA 第136回関西Debian勉強会 + Linux Kernel 勉強会 LT大会
2018/06/24 Powered by Rabbit 2.2.1
self.introduce One of Ruby committers Twitter, GitHub: @znz 1/7
基本コマンド systemctl start Unit名 systemctl stop Unit名 systemctl restart Unit名
systemctl status Unit名 2/7
たまに使うコマンド systemctl enable Unit名 systemctl disable Unit名 Debian 系に慣れているとパッケージインストールで 即有効担っていることが多いので忘れがち
3/7
一覧コマンド systemctl list-units systemctl list-timers 4/7
systemd の設定ファイルの場所 /lib, /usr/lib 以下: パッケージが使う (例: /lib/ systemd/system, /usr/lib/tmpfles.d)
普通はいじらない /etc 以下: 変更するファイル (例: /etc/systemd/ system, /etc/tmpfles.d) 同名ファイルで完全に上書き Unit名.d/なんとか.conf で追加変更 /run 以下: 動的に生成されるファイル (例: /run/ systemd/system, /run/tmpfles.d) init.d 以下から自動生成されるファイルがあった覚えが あるけど最近のだと見当たらなかった 5/7
設定変更 systemctl edit Unit名 /etc/systemd/system/Unit名.d/override.conf を編集 edit サブコマンドを使わずに管理しやすい名前のファイ ル名にしても良い systemctl
daemon-reload systemctl restart Unit名の前に設定ファイルの変更を反 映させる必要あり 忘れていてもメッセージが出るので気づける 6/7
systemctl cat $ systemctl cat php7.0-fpm.service # /lib/systemd/system/php7.0-fpm.service [Unit] Description=The
PHP 7.0 FastCGI Process Manager After=network.target [Service] Type=notify PIDFile=/run/php/php7.0-fpm.pid ExecStartPre=/usr/lib/php/php7.0-fpm-checkconf ExecStart=/usr/sbin/php-fpm7.0 --nodaemonize --fpm-config /etc/php/7.0/fpm/php-fpm.conf ExecReload=/usr/lib/php/php7.0-fpm-checkconf ExecReload=/bin/kill -USR2 $MAINPID [Install] WantedBy=multi-user.target # /etc/systemd/system/php7.0-fpm.service.d/override.conf [Unit] After=nslcd.service 上書きも含めて設定確認例 LDAP のユーザーを使って権限分離する設定をしている 都合で nslcd を待ってから起動する必要があった 7/7 Powered by Rabbit 2.2.1