Difference between revisions of "Startup"

From BaseX Documentation
Jump to navigation Jump to search
Line 65: Line 65:
  
 
'''Important''': If you plan to concurrently access your databases (especially for write transactions),
 
'''Important''': If you plan to concurrently access your databases (especially for write transactions),
the BaseX Server is mandatory. You may encounter unexpected behavior and possibly even corrupt databases
+
the BaseX Server mode is mandatory. You may encounter unexpected behavior and possibly even corrupt databases
 
if you use any other standalone/GUI BaseX instances to access databases which are also opened by the server.
 
if you use any other standalone/GUI BaseX instances to access databases which are also opened by the server.
  

Revision as of 15:49, 29 September 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).

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 here):

  • 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.

Important: The BaseX GUI is not synchronized with other BaseX instances. You should avoid accessing the same database from the GUI and the server, esp. if updates are performed.

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 here):

  • 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

Important: The Standalone client is not synchronized with other BaseX instances. You should avoid accessing the same database from the standalone client and the server, esp. if updates are performed.

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 here):

  • 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) start icon. This will also start the JAX-RX (HTTP) server.

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

Important: If you plan to concurrently access your databases (especially for write transactions), the BaseX Server mode is mandatory. You may encounter unexpected behavior and possibly even corrupt databases if you use any other standalone/GUI BaseX instances to access databases which are also opened by the server.

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 here):

  • 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

Introduced with Version 6.8:
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 here):

  • Run one of the basexhttp/basexhttp.bat scripts
  • On Windows: Double click on the BaseX Server (Start) 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.

Important: If you plan to concurrently access your databases (especially for write transactions), the BaseX Server mode is mandatory. You may encounter unexpected behavior and possibly even corrupt databases if you use any other standalone/GUI BaseX instances to access databases which are also opened by the server.

BaseX JAX-RX Server

Deprecated from Version 6.8: The JAX-RX (REST) server can be started as follows (get more information here):

See also

Server Tutorial, GUI Tutorial, Standalone Tutorial, Getting Started