可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
I would like to use the H2 database on Ubuntu 12.10, and went to the website and got the platform independent install file.
The installation instructions are quite literally, "To install the software, run the installer or unzip it to a directory of your choice."
I'm not a Linux novice, so I've used many of the usual install procedures before, but I have no idea what I am supposed to do here. There are no configure or makefiles that I can find, and the documentation doesn't mention anything, and there I can't find anything using google.
I don't know if I am missing something obvious. Can anybody help please?
回答1:
this bash script start the server:
#!/bin/bash java -cp h2*.jar org.h2.tools.Server
you need the h2-version.jar in the current directory as well
回答2:
A shell script to start the H2 server and browser GUI is included. I don't have Ubuntu right now, but the steps should be:
- Download the H2 zip file (for example
h2-2013-07-28.zip
). - Open a terminal window
And then run:
cd <download directory> unzip h2*.zip cd h2/bin chmod +x h2.sh ./h2.sh
This should start the H2 server tool and open a browser window that lets you connect to a database.
The content of the h2.sh
script is relatively simple, it is:
#!/bin/sh dir=$(dirname "$0") java -cp "$dir/h2-1.3.173.jar:$H2DRIVERS:$CLASSPATH" org.h2.tools.Console "$@"
What you can also do is double click the h2*.jar
file (if double click is configured to start java), or run this on a command line:
java -jar h2-1.3.173.jar
回答3:
If you're using Maven to download h2 database, then try to find out where does it saves (~/.m2/repository/com/h2database/h2/.../h2-version.jar). Since h2 dependency has all downloaded for you, then you just doubleclick on jar file (the web browser should open h2 GUI or look for h2 icon on system tray). And yes, GUI is the same as Standalone package has.
Update: as long as icon displays on tray - h2 will be launched. To disable it - right mouse click -> Exit
回答4:
Download h2 from here http://www.h2database.com/h2-2015-01-16.zip, then once the download has completed, unzip in home directory and run the following:
cd (directory path ). cd h2/bin. chmod +x h2.sh. ./h2.sh.