what I did is I deployed Tomcat application in EC2 but I install and configure it previously before launching the ec2. basically, when your machine of app comes up, it should have the tomcat application already deployed in it without running the shell commands manually to install and configure tomcat. Right now the problem is when I stopped the ec2 and start it again the tomcat application was not pop up when I hit the IP.
can you please tell me how to solve this problem?
CodePudding user response:
If I understood correctly, you need to run a set of commands on instance startup to configure your application/server.
You can do this with a user data script. User data is executed at launch, and you can configure it to run on restarts as well.
CodePudding user response:
If I understood right, you want your tomcat to be started everytime you restart your server.
You can configure the tomcat as a linux service and enable that service so that it will start tomcat every time your system reboots. This way, you don't have to start tomcat manually each time system reboots. Reference: https://www.digitalocean.com/community/tutorials/install-tomcat-on-linux