Run H2 as a server on linux

1,079 views
Skip to first unread message

moshi

unread,
Jan 6, 2010, 7:03:36 AM1/6/10
to H2 Database
Hi ,
I run H2 as a server on windows, using the "2_start_service.bat" file.
Does anyone know if I can run it as a server on Linux / Unix ?
Tnks.

Nitai @ Razuna

unread,
Jan 6, 2010, 7:12:59 AM1/6/10
to h2-da...@googlegroups.com
Sure. Just use h2.sh for that :-)

Kind Regards,
Nitai

On Wed, Jan 6, 2010 at 1:03 PM, moshi <mos...@gmail.com> wrote:
> I run H2 as a server on windows, using the "2_start_service.bat" file.
> Does anyone know if I can run it as a server on Linux / Unix ?

--
See for yourself how easy it is to manage files today. Join the revolution!

Razuna SaaS On-Demand - Hosted Digital Asset Management Solution
http://www.razuna.com/

Razuna - Open Source Digital Asset Management
http://www.razuna.org/

Follow us on Twitter
http://twitter.com/razunahq

Sergi Vladykin

unread,
Jan 6, 2010, 7:14:23 AM1/6/10
to H2 Database
Hi,
Try this
java -cp h2.jar org.h2.tools.Server <options here>
Options are case sensitive.
Supported options are:
[-help] or [-?] Print the list of options
[-web] Start the web server with the H2 Console
[-webAllowOthers] Allow other computers to connect - see below
[-webPort <port>] The port (default: 8082)
[-webSSL] Use encrypted (HTTPS) connections
[-browser] Start a browser and open a page to connect to the web
server
[-tcp] Start the TCP server
[-tcpAllowOthers] Allow other computers to connect - see below
[-tcpPort <port>] The port (default: 9092)
[-tcpSSL] Use encrypted (SSL) connections
[-tcpPassword <pwd>] The password for shutting down a TCP server
[-tcpShutdown "<url>"] Stop the TCP server; example: tcp://localhost:9094
[-tcpShutdownForce] Do not wait until all connections are closed
[-pg] Start the PG server
[-pgAllowOthers] Allow other computers to connect - see below
[-pgPort <port>] The port (default: 5435)
[-baseDir <dir>] The base directory for H2 databases; for all servers
[-ifExists] Only existing databases may be opened; for all servers
[-trace] Print additional trace information; for all servers

moshi

unread,
Jan 6, 2010, 9:14:50 AM1/6/10
to H2 Database
Hi,
what should I do with this h2.sh ? to run it on unix ?

On Jan 6, 2:12 pm, "Nitai @ Razuna" <ni...@razuna.com> wrote:
> Sure. Just use h2.sh for that :-)
>
> Kind Regards,
> Nitai
>

> On Wed, Jan 6, 2010 at 1:03 PM, moshi <mosh...@gmail.com> wrote:
> > I run H2 as a server on windows, using the "2_start_service.bat" file.
> > Does anyone know if I can run it as a server on Linux / Unix ?
>
> --
> See for yourself how easy it is to manage files today. Join the revolution!
>

> Razuna SaaS On-Demand - Hosted Digital Asset Management Solutionhttp://www.razuna.com/

Nitai @ Razuna

unread,
Jan 6, 2010, 9:23:04 AM1/6/10
to h2-da...@googlegroups.com
Wow, are you really sure you want to run anything on Linux? I mean,
you need some basic understanding of the OS in order to run any
service on it. But that is just me...

In order to run a sh script you issue the command "./h2.sh" in the
shell. This will start up the server.

Kind Regards,
Nitai

> --
> You received this message because you are subscribed to the Google Groups "H2 Database" group.
> To post to this group, send email to h2-da...@googlegroups.com.
> To unsubscribe from this group, send email to h2-database...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.
>
>
>
>

--
See for yourself how easy it is to manage files today. Join the revolution!

Razuna SaaS On-Demand - Hosted Digital Asset Management Solution
http://www.razuna.com/

Razuna - Open Source Digital Asset Management

Todd Stout

unread,
Jan 6, 2010, 9:37:41 AM1/6/10
to h2-da...@googlegroups.com
Take a look here: http://www.linux.com/news/enterprise/systems-management/8116-an-introduction-to-services-runlevels-and-rcd-scripts  This provides an intro into how services are implemented in Linux and most other unices.

Dario Fassi

unread,
Jan 6, 2010, 10:36:58 AM1/6/10
to h2-da...@googlegroups.com
Hi,

In my opinion, if you are not proficient in linux environment , the
best way to run H2 or any other java app, as a *nix service is to use
some Java Wrapper ( like excellent
http://wrapper.tanukisoftware.org/doc/english/launch-nix.html ).

Regards,
Dario

Reply all
Reply to author
Forward
0 new messages