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
370
0
Share
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
Headscale + Tailscale に移行中
znz
0
52
Ruby on Rails と私
znz
0
67
riscv64.rubyci.org internal
znz
0
56
Rubyの日本語リファレンスマニュアルの現在と未来
znz
0
100
devise-two-factorを4.xから5.xに上げた話
znz
0
400
docs.ruby-lang.org/ja/ の生成方法を変えた
znz
0
110
Ubuntuのriscv64版をqemuで動かした
znz
0
130
lilo.linux.or.jpをbusterからbullseyeに上げた
znz
0
130
小規模個人アプリをRails 7.xにバージョンアップした話
znz
0
130
Other Decks in Technology
See All in Technology
AI時代に、 データアナリストがデータエンジニアに異動して
jackojacko_
0
770
Oracle Cloud Infrastructure presents managed, serverless MCP Servers for Oracle AI Database
thatjeffsmith
0
250
Databricks 月刊サービスアップデートまとめ 2026年04月号
tyosi1212
0
120
Digital Independence: Why, When and How
wannesrams
0
310
自動テストだけで リリース判断できるチームへ - 鍵はテストの量ではなくリリース判断基準の再設計にあった / Redesigning Release Criteria for Lightweight Releases
ewa
7
3.7k
Gaussian Splattingの実用化 - 映像制作への展開
gpuunite_official
0
160
小さいVue.jsを30分で作る
hal_spidernight
0
150
カオナビに Suspenseを導入するまで / The Road to Suspense at kaonavi
kaonavi
1
450
みんなの考えた最強のデータ基盤アーキテクチャ'26前期〜前夜祭〜ルーキーズ_資料_遠藤な
endonanana
0
310
ESP32 IoTを動かしながらメモリ使用量を観測してみた話
zozotech
PRO
0
110
2026-05-14 要件定義からソース管理まで!IBM Bob基礎ハンズオン
yutanonaka
0
140
サンプリングは「作る」のか「使う」のか? 分散トレースのコストと運用を両立する実践的戦略 / Why you need the tail sampling and why you don't want it
ymotongpoo
4
170
Featured
See All Featured
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Are puppies a ranking factor?
jonoalderson
1
3.4k
Making the Leap to Tech Lead
cromwellryan
135
9.8k
Paper Plane
katiecoart
PRO
1
50k
Information Architects: The Missing Link in Design Systems
soysaucechin
0
920
So, you think you're a good person
axbom
PRO
2
2k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.5k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
1k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
400
The untapped power of vector embeddings
frankvandijk
2
1.7k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
180
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
340
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