Difference between revisions of "Startup"
m (Text replace - "{{Mono|" to "{{Code|") |
|||
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 an installer, we recommend to manually add the project’s | If you do not use an installer, we recommend to manually add the project’s | ||
− | {{ | + | {{Code|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 33: | Line 33: | ||
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 {{ | + | * Double click on the {{Code|BaseX.jar}} file. |
− | * Run one of the {{ | + | * Run one of the {{Code|[[Start_Scripts#Linux.2FMac:_basex|basexgui]]}} or {{Code|[[Start Scripts#Windows: basex.bat|basexgui.bat]]}} scripts. |
− | * Execute the following command: {{ | + | * Execute the following command: {{Code|java -cp BaseX.jar org.basex.BaseXGUI}} |
* On ''Windows'': Double click on the '''BaseX GUI''' icon. | * On ''Windows'': Double click on the '''BaseX GUI''' icon. | ||
− | * For [[Maven]] users: type in {{ | + | * For [[Maven]] users: type in {{Code|mvn exec:java}} in the main directory of the {{Code|basex}} project. |
==BaseX Standalone== | ==BaseX Standalone== | ||
Line 45: | Line 45: | ||
(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 {{ | + | * Run one of the {{Code|[[Start_Scripts#Linux.2FMac:_basex|basex]]}} or {{Code|[[Start Scripts#Windows: basex.bat|basex.bat]]}} scripts. |
− | * Execute the following command: {{ | + | * Execute the following command: {{Code|java -cp BaseX.jar org.basex.BaseX}} |
* On ''Windows'': Double click on the '''BaseX''' icon. | * On ''Windows'': Double click on the '''BaseX''' icon. | ||
Line 54: | Line 54: | ||
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 {{ | + | By default, the server listens to the port {{Code|1984}}. |
There are several ways of starting and stopping the server | There are several ways of starting and stopping 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 {{ | + | * Run one of the {{Code|[[Start_Scripts#Linux.2FMac:_basex|basexserver]]}} or {{Code|[[Start Scripts#Windows: basex.bat|basexserver.bat]]}} scripts. Add the {{Code|stop}} keyword to gracefully shut down the server. |
− | * Execute the following command: {{ | + | * Execute the following command: {{Code|java -cp BaseX.jar org.basex.BaseXServer}}. Again, the {{Code|stop}} keyword will ensure a graceful shutdown. |
* On ''Windows'': Double click on the '''BaseX Server''' icon, which will also start the [[#BaseX HTTP Server|HTTP Server]], or the '''BaseX Server (stop)''' icon. | * On ''Windows'': Double click on the '''BaseX Server''' icon, which will also start the [[#BaseX HTTP Server|HTTP Server]], or the '''BaseX Server (stop)''' icon. | ||
− | Pressing {{ | + | Pressing {{Code|Ctrl+c}} will close all connections and databases and shut down the server process. |
==BaseX Client== | ==BaseX Client== | ||
Line 71: | Line 71: | ||
(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 {{ | + | * Run one of the {{Code|[[Start_Scripts#Linux.2FMac:_basex|basexclient]]}} or {{Code|[[Start Scripts#Windows: basex.bat|basexclient.bat]]}} scripts. |
− | * Execute the following command: {{ | + | * Execute the following command: {{Code|java -cp BaseX.jar org.basex.BaseXClient}} |
* On ''Windows'': Double click on the '''BaseX Client''' icon. | * On ''Windows'': Double click on the '''BaseX Client''' icon. | ||
− | The default {{ | + | The default {{Code|admin}} user can be used to connect to the server: <br/> |
− | * <b>Username:</b> {{ | + | * <b>Username:</b> {{Code|admin}} |
− | * <b>Password:</b> {{ | + | * <b>Password:</b> {{Code|admin}} |
− | The password should be changed with the {{ | + | The password should be changed with the {{Code|[[Commands#PASSWORD|PASSWORD]]}} command after the first login.<br/> |
Please check out the article on the [[Database Server]] for more details. | Please check out the article on the [[Database Server]] for more details. | ||
Line 86: | Line 86: | ||
The HTTP Server gives access to the [[REST]], [[RESTXQ]] and [[WebDAV]] Services of BaseX. | The HTTP Server gives access to the [[REST]], [[RESTXQ]] and [[WebDAV]] Services of BaseX. | ||
By default, it starts an instance of the [http://jetty.codehaus.org/jetty/ Jetty Web Server], | By default, it starts an instance of the [http://jetty.codehaus.org/jetty/ Jetty Web Server], | ||
− | which listens to the port {{ | + | which listens to the port {{Code|8984}}, and the BaseX Server, which listens to {{Code|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 {{ | + | * Run one of the {{Code|[[Start_Scripts#Linux.2FMac:_basexhttp|basexhttp]]}} or {{Code|[[Start Scripts#Windows: basexhttp.bat|basexhttp.bat]]}} scripts. Add the {{Code|stop}} keyword to gracefully shut down the server. |
* On ''Windows'': Double click on the '''BaseX Server''' or '''BaseX Server (stop)''' icon. | * On ''Windows'': Double click on the '''BaseX Server''' or '''BaseX Server (stop)''' icon. | ||
− | * For [[Maven]] users: type in {{ | + | * For [[Maven]] users: type in {{Code|mvn jetty:run}} in the main directory of the {{Code|basex-api}} project, and press {{Code|Ctrl+c}} to shut down the process. |
* You may also want to deploy BaseX as a [[Web Application]]. | * You may also want to deploy BaseX as a [[Web Application]]. | ||
Revision as of 15:13, 26 May 2012
This article is part of the Getting Started Guide. It tells you how to get BaseX running.
Contents
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 an installer, 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).
Synchronization
If you plan to concurrently read and write your data, you need to resort to the client/server architecture. This is because the GUI, the standalone client and the client/server architecture of BaseX all work in different JVMs (Java virtual machines) and are not synchronized among each other. You should be aware that, in the worst case, databases might get corrupt if you use BaseX instances in different JVMs and try to enforce updates.
BaseX GUI
The 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
orbasexgui.bat
scripts. - Execute the following command:
java -cp BaseX.jar org.basex.BaseXGUI
- On Windows: Double click on the BaseX GUI icon.
- For Maven users: type in
mvn exec:java
in the main directory of thebasex
project.
BaseX Standalone
The Standalone Mode 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
orbasex.bat
scripts. - Execute the following command:
java -cp BaseX.jar org.basex.BaseX
- On Windows: Double click on the BaseX icon.
BaseX Server
The Database 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 and stopping the server
(get more information on all Startup Options):
- Run one of the
basexserver
orbasexserver.bat
scripts. Add thestop
keyword to gracefully shut down the server. - Execute the following command:
java -cp BaseX.jar org.basex.BaseXServer
. Again, thestop
keyword will ensure a graceful shutdown. - On Windows: Double click on the BaseX Server icon, which will also start the HTTP Server, or the BaseX Server (stop) icon.
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
orbasexclient.bat
scripts. - Execute the following command:
java -cp BaseX.jar org.basex.BaseXClient
- On Windows: Double click on the BaseX Client 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 the article on the Database Server for more details.
BaseX HTTP Server
The HTTP Server gives access to the REST, RESTXQ and WebDAV Services of BaseX.
By default, it starts an instance of the Jetty Web Server,
which listens to the port 8984
, 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
orbasexhttp.bat
scripts. Add thestop
keyword to gracefully shut down the server. - On Windows: Double click on the BaseX Server or BaseX Server (stop) icon.
- For Maven users: type in
mvn jetty:run
in the main directory of thebasex-api
project, and pressCtrl+c
to shut down the process. - You may also want to deploy BaseX as a Web Application.
Changelog
Version 7.0
- Updated: the BaseXJAXRX has been replaced with BaseXHTTP