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
350
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
34
riscv64.rubyci.org internal
znz
0
30
Rubyの日本語リファレンスマニュアルの現在と未来
znz
0
71
devise-two-factorを4.xから5.xに上げた話
znz
0
350
docs.ruby-lang.org/ja/ の生成方法を変えた
znz
0
87
Ubuntuのriscv64版をqemuで動かした
znz
0
110
lilo.linux.or.jpをbusterからbullseyeに上げた
znz
0
110
小規模個人アプリをRails 7.xにバージョンアップした話
znz
0
100
Ruby リファレンスマニュアル改善計画 2022 進捗報告
znz
0
160
Other Decks in Technology
See All in Technology
個人から巡るAI疲れと組織としてできること - AI疲れをふっとばせ。エンジニアのAI疲れ治療法 ショートセッション -
kikuchikakeru
5
1.9k
都市スケールAR制作で気をつけること
segur
0
200
レガシーで硬直したテーブル設計から変更容易で柔軟なテーブル設計にする
red_frasco
4
570
膨大なデータをどうさばく? Java × MQで作るPub/Subアーキテクチャ
zenta
0
120
LINEスキマニ/LINEバイトにおけるバックエンド開発
lycorptech_jp
PRO
0
370
AWS Media Services 最新サービスアップデート 2025
eijikominami
0
110
現地速報!Microsoft Ignite 2025 M365 Copilotアップデートレポート
kasada
2
1.7k
Dev Containers と Skaffold で実現する クラウドネイティブ開発環境 ローカルのみという制約に挑む / Cloud-Native Development with Dev Containers and Skaffold: Tackling the Local-Only Constraint
bitkey
PRO
0
130
AI時代の戦略的アーキテクチャ 〜Adaptable AI をアーキテクチャで実現する〜 / Enabling Adaptable AI Through Strategic Architecture
bitkey
PRO
15
9.8k
Building AI Applications with Java, LLMs, and Spring AI
thomasvitale
1
230
Service Monitoring Platformについて
lycorptech_jp
PRO
0
350
[CV勉強会@関東 ICCV2025] WoTE: End-to-End Driving with Online Trajectory Evaluation via BEV World Model
shinkyoto
0
340
Featured
See All Featured
Building Applications with DynamoDB
mza
96
6.8k
Scaling GitHub
holman
464
140k
A designer walks into a library…
pauljervisheath
210
24k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.5k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
37
2.6k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.2k
The Art of Programming - Codeland 2020
erikaheidi
56
14k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3k
Fireside Chat
paigeccino
41
3.7k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
A better future with KSS
kneath
239
18k
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