Red Hat Linux

CrateDB maintains the official RPM repositories for:

Both of these work with RedHat Enterprise Linux, CentOS, and Scientific Linux.

Table of contents

Configure YUM

All CrateDB packages are signed with GPG.

To get started, you must import the CrateDB public key, like so:

sh$ sudo rpm --import https://cdn.crate.io/downloads/yum/RPM-GPG-KEY-crate

You must then install the CrateDB repository definition.

For Red Hat Enterprise Linux, run:

sh$ sudo rpm -Uvh https://cdn.crate.io/downloads/yum/7/x86_64/crate-release-7.0-1.x86_64.rpm

For CrateDB versions < 4.2.0, run:

sh$ sudo rpm -Uvh https://cdn.crate.io/downloads/yum/7/noarch/crate-release-7.0-1.noarch.rpm

The above commands will create the /etc/yum.repos.d/crate.repo configuration file.

CrateDB provides a stable and a testing release channel. At this point, you should select which one you wish to use.

By default, YUM (Red Hat’s package manager) will use the stable repository. This is because the testing repository’s configuration marks it as disabled.

If you would like to enable to testing repository, open the crate.repo file and set enabled=1 under the [crate-testing] section.

Install CrateDB

With everything set up, you can install CrateDB, like so:

yum install crate

CrateDB is now installed, but not running.

Running and controlling CrateDB

With Red Hat Enterprise Linux, you can control the crate service like so:

sh$ sudo systemctl COMMAND crate

Here, replace COMMAND with start, stop, restart, status and so on.

After you run the appropriate command with the start argument, 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.

Caution

Be sure to read the guide to rolling upgrades and full restart upgrades before attempting to upgrade a running cluster.

Configuration

Configuration files

The main CrateDB configuration files are located in the /etc/crate directory.

Environment

The CrateDB startup script sources environment variables from the /etc/sysconfig/crate file.

You can use this mechanism to configure CrateDB.

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

Customized setups

A full list of package files can be obtained with this command:

sh$ rpm -ql 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.

Feedback

How helpful was this page?