How to create a service for Fedora/RHEL
A common task for Linux administrators is to create a background task that must be executed in the background. The most popular service manager in the Linux world is the systemd. This is an example of how to create a new service and use it.
Requirements Fedora/RHEL distro family flavor Create the background service file
Description=my-service nginx example
ExecStart=/usr/bin/env docker run --name nginx --rm -p 8080:80 docker.io/nginx:alpine
# Create the service file
# (if you change an existent file, you must reload the daemon config)
# Reload daemon config
systemctl enable my-service.service
systemctl start my-service.service
# (if you need to restart)
systemctl restart my-service.service
how to create a systemd service References
No results for your search, please try with something else.
Great! You've successfully subscribed.
Great! Next, complete checkout for full access.
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.