Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
systemdでよく使うサブコマンド
Kazuhiro NISHIYAMA
June 24, 2018
Technology
0
190
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
History of Japanese Ruby reference manual, and future
znz
0
1k
qemuのriscv64にDebianを入れてみた
znz
0
45
systemd 再入門
znz
0
170
Ruby 3.0.0 コネタ集
znz
0
150
livedoor天気API終了対応
znz
0
160
Wireguard 実践入門
znz
0
190
あまり知られていないRubyの便利機能
znz
0
190
workflow,job,step の使い分けの基準を考える
znz
0
140
Dockerのオフィシャルrubyイメージとは?
znz
0
37
Other Decks in Technology
See All in Technology
API連携に伴う規制と対応 / Regulations and responses to API linkage
moneyforward
0
170
立ち止まっても、寄り道しても / even if I stop, even if I take a detour
katoaz
0
1k
Cloudflare Workersで動くOG画像生成器
aiji42
1
500
CSS Variable をもっと活用する / Kyoto.js 18
spring_raining
2
1.1k
日経電子版だけじゃない! 日経の新規Webメディアの開発 - NIKKEI Tech Talk #3
sztm
0
350
AWS Cloud Forensics & Incident Response
e11i0t_4lders0n
0
420
WebLogic Server for OCI 概要
oracle4engineer
PRO
3
900
ChatGPT for Hacking
anugrahsr
0
4.7k
Oracle Transaction Manager for Microservices Free 22.3 製品概要
oracle4engineer
PRO
5
120
Bill One 開発エンジニア 紹介資料
sansantech
PRO
0
130
230125 モニターマウントLT ITガジェット翁(Ryu.Cyber)さん
comucal
PRO
0
4.8k
SPA・SSGでSSRのようなOGP対応!
simo123
2
160
Featured
See All Featured
GitHub's CSS Performance
jonrohan
1020
430k
Bootstrapping a Software Product
garrettdimon
299
110k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
182
15k
How GitHub Uses GitHub to Build GitHub
holman
465
280k
Fireside Chat
paigeccino
16
1.9k
Faster Mobile Websites
deanohume
295
29k
VelocityConf: Rendering Performance Case Studies
addyosmani
317
22k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
270
12k
StorybookのUI Testing Handbookを読んだ
zakiyama
8
3.2k
GraphQLの誤解/rethinking-graphql
sonatard
39
7.8k
Rails Girls Zürich Keynote
gr2m
87
12k
The Power of CSS Pseudo Elements
geoffreycrofte
52
4.3k
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