CrateDB maintains packages for the following Ubuntu versions:
Note
CrateDB requires Java 8 or higher.
To run CrateDB on Ubuntu releases older than 16.04, you will need to install Java from a third-party repository. This can be done by adding the openjdk PPA:
sh$ sudo add-apt-repository ppa:openjdk-r/ppa sh$ sudo apt-get update sh$ apt-get install -y openjdk-11-jre-headless
Table of Contents
See also
The official CrateDB repository only contains CrateDB 2.1.0 or higher.
Consult the section for Older Versions if necessary.
Firstly, you will need to configure Apt (the Ubuntu package manager) to trust the CrateDB repository.
Download the CrateDB GPG key:
sh$ wget https://cdn.crate.io/downloads/deb/DEB-GPG-KEY-crate
And then add the key to Apt:
sh$ sudo apt-key add DEB-GPG-KEY-crate
CrateDB provides a stable release and a testing release channel. At this point, you should select which one you wish to use.
Create an Apt configuration file, like so:
sh$ sudo touch /etc/apt/sources.list.d/crate-CHANNEL.list
Here, replace CHANNEL
with stable
or testing
, depending on which
type of release channel you plan to use.
Then, edit it, and add the following:
deb https://cdn.crate.io/downloads/deb/CHANNEL/ CODENAME main
deb-src https://cdn.crate.io/downloads/deb/CHANNEL/ CODENAME main
Here, replace CHANNEL
as above, and then, additionally, replace
CODENAME
with the codename of your distribution, which can be round by
running:
sh$ source /etc/os-release && echo $UBUNTU_CODENAME
Once that is done, update Apt:
sh$ sudo apt-get update
You should see a success message. This indicates that the CrateDB release
channel is correctly configured and the crate
package has been registered
locally.
You can now install CrateDB.
Skip to Install CrateDB.
Note
This method of installation has been deprecated and does not support CrateDB 2.1.0 or higher.
For version of CrateDB older than 2.1.0, you will have to install from an official, but unmaintained, PPA repository.
Firstly, you will need to install package that allows you to add new PPA repositories:
sh$ sudo apt-get install python-software-properties
If you’re running Xenial Xerus (16.04) or higher, you will also need to install this package:
sh$ sudo apt-get install software-properties-common
CrateDB provides a stable and a testing release channel. At this point, you should select which one you wish to use.
Now, it will be possible to add the PPA repository, like so:
sh$ sudo add-apt-repository ppa:crate/CHANNEL
Here, replace CHANNEL
with stable
or testing
, depending on which
release channel you plan to use.
Once that is done, update Apt:
sh$ sudo apt-get update
You should see a success message. This indicates that the CrateDB release
channel is correctly configured and the crate
package has been registered
locally.
You can now install CrateDB.
With everything set up, you can install CrateDB, like so:
sh$ sudo apt-get install crate
After the installation is finished, the crate
service should be
up-and-running.
You should be able to access it by visiting:
http://localhost:4200/
See also
If you’re new to CrateDB, check out our our first use documentation.
With Xenial Xerus (15.04) and above, you can control the crate
service like
so:
sh$ sudo systemctl COMMAND crate
With Trusty Tahr (14.04), you should use:
sh$ sudo service crate COMMAND
In both instances, replace COMMAND
with start
, stop
, restart
,
status
, etc.
Caution
Be sure to read the guide to rolling upgrades and full restart upgrades before attempting to upgrade a running cluster.
The main CrateDB configuration files are located in the /etc/crate
directory.
The CrateDB startup script sources environment variables from the
/etc/default/crate
file.
Here’s one example:
# Heap Size (defaults to 256m min, 1g max)
CRATE_HEAP_SIZE=2g
# Maximum number of open files, defaults to 65535.
# MAX_OPEN_FILES=65535
# Maximum locked memory size. Set to "unlimited" if you use the
# bootstrap.mlockall option in crate.yml. You must also set
# CRATE_HEAP_SIZE.
MAX_LOCKED_MEMORY=unlimited
# Additional Java OPTS
# CRATE_JAVA_OPTS=
# Force the JVM to use IPv4 stack
CRATE_USE_IPV4=true
A full list of package files can be obtained with this command:
sh$ dpkg-query -L crate
If you want to deviate from the way that the crate
package integrates with
your system, we recommend that you go with a basic tarball installation.