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
0
340
systemdでよく使うサブコマンド
第136回関西Debian勉強会 + Linux Kernel 勉強会 LT大会
https://debianjp.connpass.com/event/90376/
での発表資料です。
Kazuhiro NISHIYAMA
June 24, 2018
Tweet
Share
More Decks by Kazuhiro NISHIYAMA
See All by Kazuhiro NISHIYAMA
Ruby on Rails と私
znz
0
23
riscv64.rubyci.org internal
znz
0
18
Rubyの日本語リファレンスマニュアルの現在と未来
znz
0
67
devise-two-factorを4.xから5.xに上げた話
znz
0
330
docs.ruby-lang.org/ja/ の生成方法を変えた
znz
0
81
Ubuntuのriscv64版をqemuで動かした
znz
0
100
lilo.linux.or.jpをbusterからbullseyeに上げた
znz
0
110
小規模個人アプリをRails 7.xにバージョンアップした話
znz
0
94
Ruby リファレンスマニュアル改善計画 2022 進捗報告
znz
0
150
Other Decks in Technology
See All in Technology
いまさら聞けない ABテスト入門
skmr2348
1
190
空間を設計する力を考える / 20251004 Naoki Takahashi
shift_evolve
PRO
3
270
stupid jj tricks
indirect
0
7.8k
C# 14 / .NET 10 の新機能 (RC 1 時点)
nenonaninu
1
1.5k
ZOZOのAI活用実践〜社内基盤からサービス応用まで〜
zozotech
PRO
0
150
Railsアプリケーション開発者のためのブックガイド
takahashim
14
6k
KAGのLT会 #8 - 東京リージョンでGAしたAmazon Q in QuickSightを使って、報告用の資料を作ってみた
0air
0
200
Go Conference 2025: GoのinterfaceとGenericsの内部構造と進化 / Go type system internals
ryokotmng
3
620
#普通の文系サラリーマンチャレンジ 自分でアプリ開発と電子工作を続けたら人生が変わった
tatsuya1970
0
930
関係性が駆動するアジャイル──GPTに人格を与えたら、対話を通してふりかえりを習慣化できた話
mhlyc
0
130
自作LLM Native GORM Pluginで実現する AI Agentバックテスト基盤構築
po3rin
2
230
Why React!?? Next.jsそしてReactを改めてイチから選ぶ
ypresto
10
4.3k
Featured
See All Featured
Producing Creativity
orderedlist
PRO
347
40k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
36
2.5k
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
Designing Experiences People Love
moore
142
24k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
252
21k
Learning to Love Humans: Emotional Interface Design
aarron
274
40k
A Tale of Four Properties
chriscoyier
160
23k
The Art of Programming - Codeland 2020
erikaheidi
56
14k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
VelocityConf: Rendering Performance Case Studies
addyosmani
332
24k
Building a Modern Day E-commerce SEO Strategy
aleyda
43
7.7k
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