I decided to local host a small Minecraft server on a RHEL 7 vm. There are tons of guides on how to install Minecraft on Linux, but I did not find much of anything that details how to get the software to start at boot-time via systemd.
Below are the steps that I took. These instructions should work on RHEL 6/7, Centos 6/7, or any other Linux that utilizes systemd for starting services.
Change directory to the systemd directory.
# cd /etc/systemd/system
Create a systemd service file using your favorite text editor. Mine is called minecraft.service.
Next, create a startup script. Again use your favorite text editor. In the example above, systemd is configured to run the script “/root/start_minecraft_server.bash”. We now need to create that script. Its contents are below.