How to start stardog as Service instead of executable?

We installed starDog on EC2, we do “nohup ./stardog-admin server start” to start it. However, our EC2 will shut down every night and restart in the morning automatically. When EC2 restarts, stardog server will stop.

Instead of manually type that command to start starDog every morning, is there an automated way to start it whenever EC2 restarts? Something like install stardog as Service?

Yes, of course. It is defined in the User data field of the AMI.

See: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html

The rpm install includes a systemd service that will do that.

I got below errors when following the instruction. Please advise!

[root@ip-10-204-93-196 test]# sudo yum-config-manager --add-repo http://packages.stardog.com/rpms/stardog.repo

Loaded plugins: amazon-id, product-id, rhui-lb, subscription-manager

This system is not registered with an entitlement server. You can use subscription-manager to register.

Config Error: File contains no section headers.

file: file:///etc/yum.repos.d/stardog.repo, line: 1

‘<!DOCTYPE html>\r\n’

[root@ip-10-204-93-196 test]#

Looks like the url is returning an html page rather than the yum repo definition. I’m guessing it’s some sort of error page. Can you include the stardog.repo file or at least take a look at it and see what’s in there.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.