Difference between revisions of "Startup"
(→BaseX) |
|||
Line 83: | Line 83: | ||
==BaseX HTTP Server== | ==BaseX HTTP Server== | ||
− | The HTTP | + | 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], | |
− | which listens to the port {{Mono|8984}} | + | which listens to the port {{Mono|8984}}, and the BaseX Server, which listens to {{Mono|1984}}. |
− | 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 {{Mono|[[Start_Scripts#Linux.2FMac:_basexhttp|basexhttp]]}} or {{Mono|[[Start Scripts#Windows: basexhttp.bat|basexhttp.bat]]}} scripts | + | * Run one of the {{Mono|[[Start_Scripts#Linux.2FMac:_basexhttp|basexhttp]]}} or {{Mono|[[Start Scripts#Windows: basexhttp.bat|basexhttp.bat]]}} scripts. Add the {{Mono|stop}} keyword to stop the server. |
− | * On ''Windows'': Double click on the '''BaseX Server''' | + | * On ''Windows'': Double click on the '''BaseX Server''' or '''BaseX Server (stop)''' Icon |
− | * For [[Maven]] users: type in {{Mono|mvn jetty:run}} in the main directory of the {{Mono|basex-api}} project | + | * For [[Maven]] users: type in {{Mono|mvn jetty:run}} in the main directory of the {{Mono|basex-api}} project, and press {{Mono|Ctrl+c}} to shut down the process. |
− | + | In many cases, it may be more interesting to deploy BaseX as a [[Web Application]]. | |
=Changelog= | =Changelog= |
Revision as of 03:13, 23 March 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).
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 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 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 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 command
java -cp BaseX.jar org.basex.BaseX
- On Windows: Double click on the BaseX start 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 the server
(get more information on all Startup Options):
- Run one of the
basexserver
orbasexserver.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
orbasexclient.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 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 stop 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.
In many cases, it may be more interesting to deploy BaseX as a Web Application.
Changelog
Version 7.0
- Updated: the BaseXJAXRX has been replaced with BaseXHTTP