How can I automatically start a node.js application in Amazon Linux AMI on aws?

前端 未结 8 979
轻奢々
轻奢々 2020-12-07 16:44

Is there a brief guide to explain how to start up a application when the instance starts up and running? If it were one of the services installed through yum th

8条回答
  •  旧巷少年郎
    2020-12-07 17:25

    Quick solution for you would be to start your app from /etc/rc.local ; just add your command there.

    But if you want to go the elegant way, you'll have to package your application in a rpm file, have a startup script that goes in /etc/rc.d so that you can use chkconfig on your app, then install the rpm on your instance.

    Maybe this or this help. (or just google for "creating rpm packages")

提交回复
热议问题