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
17
riscv64.rubyci.org internal
znz
0
14
Rubyの日本語リファレンスマニュアルの現在と未来
znz
0
62
devise-two-factorを4.xから5.xに上げた話
znz
0
270
docs.ruby-lang.org/ja/ の生成方法を変えた
znz
0
77
Ubuntuのriscv64版をqemuで動かした
znz
0
96
lilo.linux.or.jpをbusterからbullseyeに上げた
znz
0
100
小規模個人アプリをRails 7.xにバージョンアップした話
znz
0
88
Ruby リファレンスマニュアル改善計画 2022 進捗報告
znz
0
150
Other Decks in Technology
See All in Technology
React Server ComponentsでAPI不要の開発体験
polidog
PRO
0
340
ユーザー課題を愛し抜く――AI時代のPdM価値
kakehashi
PRO
1
130
GCASアップデート(202506-202508)
techniczna
0
160
✨敗北解法コレクション✨〜Expertだった頃に足りなかった知識と技術〜
nanachi
1
770
20250807 Applied Engineer Open House
sakana_ai
PRO
2
570
20250807_Kiroと私の反省会
riz3f7
0
260
AI関数が早くなったので試してみよう
kumakura
0
330
Claude Codeから我々が学ぶべきこと
oikon48
10
2.8k
生成AI活用のROI、どう測る? DMM.com 開発責任者から学ぶ「AI効果検証のノウハウ」 / ROI of AI
i35_267
3
120
GISエンジニアよ 現場に行け!
sudataka
1
140
マルチプロダクト×マルチテナントを支えるモジュラモノリスを中心としたアソビューのアーキテクチャ
disc99
1
650
Oracle Exadata Database Service on Cloud@Customer X11M (ExaDB-C@C) サービス概要
oracle4engineer
PRO
2
6.4k
Featured
See All Featured
Why You Should Never Use an ORM
jnunemaker
PRO
58
9.5k
The Straight Up "How To Draw Better" Workshop
denniskardys
236
140k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
We Have a Design System, Now What?
morganepeng
53
7.7k
For a Future-Friendly Web
brad_frost
179
9.9k
Rails Girls Zürich Keynote
gr2m
95
14k
Optimizing for Happiness
mojombo
379
70k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
60k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
18
1.1k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
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