Difference between revisions of "Startup"

From BaseX Documentation
Jump to navigation Jump to search
Line 8: Line 8:
 
The official releases include the BaseX JAR file, libraries and optional [[Start Scripts]].
 
The official releases include the BaseX JAR file, libraries and optional [[Start Scripts]].
 
If you do not use the Windows version, we recommend to manually add the project’s
 
If you do not use the Windows version, we recommend to manually add the project’s
<code>bin</code> directory to your path environment; this way, you will be able to run
+
{{Mono|bin}} directory to your path environment; this way, you will be able to run
 
BaseX from everywhere in your shell/terminal.
 
BaseX from everywhere in your shell/terminal.
  
Line 32: Line 32:
 
The GUI can be started as follows (get more information on all [[Startup Options#BaseX GUI|Startup Options]]):
 
The GUI can be started as follows (get more information on all [[Startup Options#BaseX GUI|Startup Options]]):
  
* Double click on the <code>BaseX.jar</code> file.
+
* Double click on the {{Mono|BaseX.jar}} file.
* Run one of the <code>[[Start_Scripts#Linux.2FMac:_basex|basexgui]]</code>/<code>[[Start Scripts#Windows: basex.bat|basexgui.bat]]</code> scripts.
+
* Run one of the {{Mono|[[Start_Scripts#Linux.2FMac:_basex|basexgui]]}}/{{Mono|[[Start Scripts#Windows: basex.bat|basexgui.bat]]}} scripts.
* Execute the command: <code>java -cp BaseX.jar org.basex.BaseXGUI</code>.
+
* Execute the command: {{Mono|java -cp BaseX.jar org.basex.BaseXGUI}}.
 
* On ''Windows'': Double click on the '''BaseX GUI''' start icon.
 
* On ''Windows'': Double click on the '''BaseX GUI''' start icon.
* For [[Maven]] users: type in <code>mvn exec:java</code> in the main directory of the <code>basex</code> project.
+
* For [[Maven]] users: type in {{Mono|mvn exec:java}} in the main directory of the {{Mono|basex}} project.
  
 
==BaseX Standalone==
 
==BaseX Standalone==
Line 46: Line 46:
 
(get more information on all [[Startup Options#BaseX Standalone|Startup Options]]):
 
(get more information on all [[Startup Options#BaseX Standalone|Startup Options]]):
  
*Run one of the <code>[[Start_Scripts#Linux.2FMac:_basex|basex]]</code>/<code>[[Start Scripts#Windows: basex.bat|basex.bat]]</code> scripts
+
*Run one of the {{Mono|[[Start_Scripts#Linux.2FMac:_basex|basex]]}}/{{Mono|[[Start Scripts#Windows: basex.bat|basex.bat]]}} scripts
*Execute the command <code>java -cp BaseX.jar org.basex.BaseX</code>
+
*Execute the command {{Mono|java -cp BaseX.jar org.basex.BaseX}}
 
* On ''Windows'': Double click on the '''BaseX''' start icon
 
* On ''Windows'': Double click on the '''BaseX''' start icon
  
Line 55: Line 55:
 
provides [[User Management|user management]] and [[Logging|logs all user interactions]].
 
provides [[User Management|user management]] and [[Logging|logs all user interactions]].
  
By default, the server listens to the port <code>1984</code>.
+
By default, the server listens to the port {{Mono|1984}}.
 
There are several ways of starting the server
 
There are several ways of starting the server
 
(get more information on all [[Startup Options#BaseX Server|Startup Options]]):
 
(get more information on all [[Startup Options#BaseX Server|Startup Options]]):
  
* Run one of the <code>[[Start_Scripts#Linux.2FMac:_basex|basexserver]]</code>/<code>[[Start Scripts#Windows: basex.bat|basexserver.bat]]</code> scripts.
+
* Run one of the {{Mono|[[Start_Scripts#Linux.2FMac:_basex|basexserver]]}}/{{Mono|[[Start Scripts#Windows: basex.bat|basexserver.bat]]}} scripts.
* Execute the command <code>java -cp BaseX.jar org.basex.BaseXServer</code>.
+
* Execute the command {{Mono|java -cp BaseX.jar org.basex.BaseXServer}}.
 
* On ''Windows'': Double click on the '''BaseX Server''' start icon. This will also start the [[#BaseX HTTP Server|HTTP Server]].
 
* On ''Windows'': Double click on the '''BaseX Server''' start icon. This will also start the [[#BaseX HTTP Server|HTTP Server]].
  
Pressing <code>Ctrl+c</code> will close all connections and databases and shut down the server process.
+
Pressing {{Mono|Ctrl+c}} will close all connections and databases and shut down the server process.
  
 
==BaseX Client==
 
==BaseX Client==
Line 72: Line 72:
 
(get more information on all [[Startup Options#BaseX Client|Startup Options]]):
 
(get more information on all [[Startup Options#BaseX Client|Startup Options]]):
  
*Run one of the <code>[[Start_Scripts#Linux.2FMac:_basex|basexclient]]</code>/<code>[[Start Scripts#Windows: basex.bat|basexclient.bat]]</code> scripts
+
*Run one of the {{Mono|[[Start_Scripts#Linux.2FMac:_basex|basexclient]]}}/{{Mono|[[Start Scripts#Windows: basex.bat|basexclient.bat]]}} scripts
*Execute the command <code>java -cp BaseX.jar org.basex.BaseXClient</code>
+
*Execute the command {{Mono|java -cp BaseX.jar org.basex.BaseXClient}}
 
* On ''Windows'': Double click on the '''BaseX Client''' start icon
 
* On ''Windows'': Double click on the '''BaseX Client''' start icon
  
The default <code>admin</code> user can be used to connect to the server: <br/>
+
The default {{Mono|admin}} user can be used to connect to the server: <br/>
* <b>Username:</b> <code>admin</code>
+
* <b>Username:</b> {{Mono|admin}}
* <b>Password:</b> <code>admin</code>
+
* <b>Password:</b> {{Mono|admin}}
The password should be changed with the <code>[[Commands#PASSWORD|PASSWORD]]</code> command after the first login.<br/>
+
The password should be changed with the {{Mono|[[Commands#PASSWORD|PASSWORD]]}} command after the first login.<br/>
  
 
Please check out our little [[Server Tutorial]] for more details.
 
Please check out our little [[Server Tutorial]] for more details.
Line 85: Line 85:
 
==BaseX HTTP Server==
 
==BaseX HTTP Server==
  
<font color='orangered'>Introduced with {{Version|7.0}}</font>:<br/>
+
{{Mark|Introduced with Version 7.0}}:<br/>
 
The HTTP server is required to activate the [[REST]] and [[WebDAV]] services of BaseX.
 
The HTTP server is required to activate the [[REST]] and [[WebDAV]] services of BaseX.
 
It starts an instance of the [http://jetty.codehaus.org/jetty/ Jetty WebServer],
 
It starts an instance of the [http://jetty.codehaus.org/jetty/ Jetty WebServer],
which listens to the port <code>8984</code> by default, and the BaseX Server,
+
which listens to the port {{Mono|8984}} by default, and the BaseX Server,
which listens to <code>1984</code>.
+
which listens to {{Mono|1984}}.
  
 
The HTTP Server can be started as follows
 
The HTTP Server can be started as follows
 
(get more information on all [[Startup Options#BaseX HTTP Server|Startup Options]]):
 
(get more information on all [[Startup Options#BaseX HTTP Server|Startup Options]]):
  
* Run one of the <code>[[Start_Scripts#Linux.2FMac:_basexhttp|basexhttp]]</code>/<code>[[Start Scripts#Windows: basexhttp.bat|basexhttp.bat]]</code> scripts
+
* Run one of the {{Mono|[[Start_Scripts#Linux.2FMac:_basexhttp|basexhttp]]}}/{{Mono|[[Start Scripts#Windows: basexhttp.bat|basexhttp.bat]]}} scripts
 
* On ''Windows'': Double click on the '''BaseX Server''' start icon
 
* On ''Windows'': Double click on the '''BaseX Server''' start icon
* For [[Maven]] users: type in <code>mvn jetty:run</code> in the main directory of the <code>basex-api</code> project. The BaseX server needs to be manually started if the <code>org.basex.local</code> property is set to <code>false</code> (this is the default). Please have a look into the <code>pom.xml</code> file of the <code>basex-api</code> project for more options.
+
* For [[Maven]] users: type in {{Mono|mvn jetty:run}} in the main directory of the {{Mono|basex-api}} project. The BaseX server needs to be manually started if the {{Mono|org.basex.local}} property is set to {{Mono|false}} (this is the default). Please have a look into the {{Mono|pom.xml}} file of the {{Mono|basex-api}} project for more options.
  
Pressing <code>Ctrl+c</code> will close all connections and databases and shut down the server process.
+
Pressing {{Mono|Ctrl+c}} will close all connections and databases and shut down the server process.
  
 
==See also ==
 
==See also ==
 
[[Server Tutorial]], [[GUI Tutorial]], [[Standalone Tutorial]], [[Getting Started]]
 
[[Server Tutorial]], [[GUI Tutorial]], [[Standalone Tutorial]], [[Getting Started]]
 
[[Category:Beginner]]
 
[[Category:Beginner]]

Revision as of 22:58, 26 October 2011

This article is part of the Getting Started Guide. It tells you how to get BaseX running.

Requirements

BaseX

Please download the latest BaseX version from our homepage. The official releases include the BaseX JAR file, libraries and optional Start Scripts. If you do not use the Windows version, we recommend to manually add the project’s bin directory to your path environment; this way, you will be able to run BaseX from everywhere in your shell/terminal.

Java

A Runtime Environment of Java 1.6 (JRE) is needed to run BaseX. BaseX is platform independent and runs on any system that provides a Java Virtual Machine. BaseX has been tested on Windows (2000, XP, Vista, 7), Max OS X (10.x), Linux(SuSE xxx, Debian, Ubuntu) and OpenBSD (4.x).

GUI/Standalone vs. Client/Server

The standalone client and the GUI of BaseX are not synchronized with other BaseX instances. If you plan to concurrently write to the same database instances, the client/server architecture is mandatory! You may encounter unexpected behavior, and your databases might even get corrupt, if you use BaseX instances that run in different Java VMs.

BaseX GUI

The BaseX GUI is the visual interface to the features of BaseX. It can be used to create new databases, perform queries or interactively explore your XML data.

The GUI can be started as follows (get more information on all Startup Options):

  • Double click on the BaseX.jar file.
  • Run one of the basexgui/basexgui.bat scripts.
  • Execute the command: java -cp BaseX.jar org.basex.BaseXGUI.
  • On Windows: Double click on the BaseX GUI start icon.
  • For Maven users: type in mvn exec:java in the main directory of the basex project.

BaseX Standalone

The BaseX Standalone interface can be used to enter database commands, or execute automated database operations and queries, on command line.

The standalone version can be started as follows (get more information on all Startup Options):

  • Run one of the basex/basex.bat scripts
  • Execute the command java -cp BaseX.jar org.basex.BaseX
  • On Windows: Double click on the BaseX start icon

BaseX Server

The BaseX Server comes into play if BaseX is to be used by more than one user (client). It handles concurrent read and write transactions, provides user management and logs all user interactions.

By default, the server listens to the port 1984. There are several ways of starting the server (get more information on all Startup Options):

  • Run one of the basexserver/basexserver.bat scripts.
  • Execute the command java -cp BaseX.jar org.basex.BaseXServer.
  • On Windows: Double click on the BaseX Server start icon. This will also start the HTTP Server.

Pressing Ctrl+c will close all connections and databases and shut down the server process.

BaseX Client

The BaseX Client interface can be used to send commands and queries to the server instance on command line.

It can be started as follows (get more information on all Startup Options):

  • Run one of the basexclient/basexclient.bat scripts
  • Execute the command java -cp BaseX.jar org.basex.BaseXClient
  • On Windows: Double click on the BaseX Client start icon

The default admin user can be used to connect to the server:

  • Username: admin
  • Password: admin

The password should be changed with the PASSWORD command after the first login.

Please check out our little Server Tutorial for more details.

BaseX HTTP Server

Template:Mark:
The HTTP server is required to activate the REST and WebDAV services of BaseX. It starts an instance of the Jetty WebServer, which listens to the port 8984 by default, and the BaseX Server, which listens to 1984.

The HTTP Server can be started as follows (get more information on all Startup Options):

  • Run one of the basexhttp/basexhttp.bat scripts
  • On Windows: Double click on the BaseX Server start icon
  • For Maven users: type in mvn jetty:run in the main directory of the basex-api project. The BaseX server needs to be manually started if the org.basex.local property is set to false (this is the default). Please have a look into the pom.xml file of the basex-api project for more options.

Pressing Ctrl+c will close all connections and databases and shut down the server process.

See also

Server Tutorial, GUI Tutorial, Standalone Tutorial, Getting Started