| |
|
|
| ◆ |
サービスの起動 |
|
|
|
[root@centos]#
systemctl start ******.service
(******はサービス名)
|
|
|
|
|
| ◆ |
サービスの停止 |
|
|
|
[root@centos]#
systemctl stop ******.service
(******はサービス名)
|
|
|
|
|
| ◆ |
サービスの再起動 |
|
|
|
[root@centos]#
systemctl restart ******.service
(******はサービス名)
|
|
|
|
|
| ◆ |
サービスの自動起動設定 |
|
|
|
[root@centos]#
systemctl enable ******.service
(******はサービス名)
|
|
|
|
|
| ◆ |
サービスの自動起動設定解除 |
|
|
|
[root@centos]#
systemctl disable ******.service
(******はサービス名)
|
|
|
|
|
| ◆ |
各種サービスの自動起動設定(解除)の確認 |
|
|
|
[root@centos]#
systemctl list-unit-files |
grep ******.service
(******はサービス名)
******.service
enabled
<--- enabled(自動起動)
disabled(自動起動解除)
|
|
|
|
※ systemd サービスコマンドの最後の
.service は省略できる |
| |
|
|
|
| ◆ |
yum インストール・アンインストール |
|
|
|
単独インストール&削除の場合 |
|
|
|
[root@centos]#
yum -y install ******
(****** はサービス名)※インストール
|
|
|
|
[root@centos]#
yum -y remove ******
(****** はサービス名)※削除
|
|
|
|
グループインストール&削除の場合 |
|
|
|
[root@centos]#
yum
-y groupinstall "********" (********
はグループ名)※インストール
|
|
|
|
[root@centos]#
yum
-y groupremove "********" (********
はグループ名)※削除
|
|
|
|
|
| ◆ |
インストール確認 |
|
|
|
[root@centos]#
rpm -q ******
(******
はサービス名)
******-2.3.3-2 <---
バージョン表示されればインストールされている
|
|
|
|
|
| ◆ |
yum
キャッシュ領域のクリーン化 |
|
|
|
yum
コマンドを多用するとキャッシュが大量に保全されキャッシュ領域が少なくなり多くの依存関係があるプログラムを yum
でインストールする場合にキャッシュ領域不足でインストールできない事があるのでキャッシュを削除する |
|
|
|
[root@centos]#
du -sh /var/cache/yum
<--- 入力
59M /var/cache/yum
<--- 59M 使用中
[root@centos]#
yum clean all
<--- 入力 キャッシュを削除
[root@centos]#
du -sh /var/cache/yum
<--- 入力
3M /var/cache/yum
<--- 3M に縮小した
|
|
|
|
|
| ◆ |
ファイル検索 |
|
|
|
yum 等で自動インストールした場合、どこにファイルが置かれているか不明な場合に実行 |
|
|
|
[root@centos]#
find / -name ******** (******
はサービス名)
|
|
|
|
|
| ◆ |
ログアウト&再起動&終了 |
|
|
|
ログアウト&再起動&終了する場合 |
|
|
|
[root@centos]#
logout
<--- ログアウト
[root@centos]#
reboot
<--- 再起動
[root@centos]#
halt
<--- 終了
|
|
|
|
|