
RHEL 7.9サーバーがあります。 networkmangerパッケージはインストールされていますが、サービスは追加されていないようです。サービスを手動で追加する方法はありますか?
# yum install NetworkManager
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
local | 2.8 kB 00:00:00
Package 1:NetworkManager-1.18.8-1.el7.x86_64 already installed and latest version
Nothing to do
# systemctl start networkmanager
Failed to start networkmanager.service: Unit not found.
# cat /etc/*release
NAME="Red Hat Enterprise Linux Server"
VERSION="7.9 (Maipo)"
...
答え1
努力する:
systemctl daemon-reload
systemctl status NetworkManager
# start if it is there
systemctl start NetworkManager
うまくいかない場合は、ユニットファイルを確認してください。
systemctl list-unit-files | grep -i network
存在しない場合は確認してください。
/usr/lib/systemd/system/
/etc/systemd/system
.service ファイルのディレクトリです。
.service ファイルを生成する必要がある場合、テンプレートは次のようになります。
[Unit]
Description=<description about this service>
[Service]
User=<user e.g. root>
WorkingDirectory=<directory_of_script e.g. /root>
ExecStart=<script which needs to be executed>
Restart=always
[Install]
WantedBy=multi-user.target