简体   繁体   中英

Keeping H2 database running on Amazon EC2

I currently have an webapp on Amazon's EC2. The app uses the H2 database to store tables ( I used scp to import my H2 directory from local machine to EC2). The app works when I connect to the instance and startup the H2, but once I close the local Terminal, H2 stops and the app also stops working. Is there a way to keep H2 running even after I close the Terminal locally?

Most database systems are services and run as a process in the background rather than within a given user session.

It does appear that it has some kind of server mode: http://www.h2database.com/html/tutorial.html#using_server

It doesn't provide much information about how to set up init scripts for it however.

A quick Google searched turned up this example: https://gist.github.com/ohneda/1585636

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM