0

Got a RHEL 7.9 server. Seems the networkmanger package is installed but no service added. Is there a way that I can manually add the service?

#  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)"
...
sleepy
  • 147
  • 1
  • 2
  • 9

1 Answers1

1

Try:

systemctl daemon-reload
systemctl status NetworkManager
# start if it is there
systemctl start NetworkManager

If it doesn't work check unit files:

systemctl list-unit-files | grep -i network

If It isn't there check

/usr/lib/systemd/system/
/etc/systemd/system

directories for any .service file.

If you need to create .service file here is a template:

[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
ust
  • 26
  • 3