VoltDB is distributed as a compressed tar archive for each of the supported platforms. The best way to install VoltDB is to unpack the distribution kit as a folder in the home directory of your personal account, like so:
$ tar -zxvf voltdb-3.2.tar.gz -C $HOME/
Installing into your personal directory gives you full access to the software and is most useful for development.
If you are installing VoltDB on a production server where the database will be run, you may want to install the
software into a standard system location so that the database cluster can be started with the same commands on all nodes.
The following shell commands install the VoltDB software in the folder
$ sudo tar -zxvf voltdb-3.2.tar.gz -C /opt $ cd /opt $ sudo mv voltdb-3.2 voltdb
Note that installing as root using the sudo command makes the installation folders read-only for non-privileged accounts. Which is why installing in $HOME is recommended for running the sample applications and other development activities.
If you are upgrading an existing installation of VoltDB, you have two choices:
You can unpack the new version as a separate installation. VoltDB does this by default, since the tar file contains the version number in the folder name. Note that if you do install new versions alongside an existing installation, any existing Ant build files or shell scripts you have for building and running VoltDB applications will continue to use the older version.
You can replace your existing installation with the new version. To do this, you need to delete the folder with your current installation and then follow the instructions for unpacking the new kit. For example, the following shell commands unpack the new version under the user's home directory, delete an old installation, and replace it:
$ tar -zxvf voltdb-3.2.tar.gz -C $HOME $ cd $HOME $ rm -R voltdb/ $ mv voltdb-3.2 voltdb
If you plan on using VoltDB on Ubuntu or another Debian-based Linux system, there is a Debian package available to simplify the installation process. Using the Debian package installs VoltDB in the system directories, making VoltDB available to all users of the system without them having to individually configure their PATH variable.
To install the Debian package, download the package from the VoltDB web site. Then, from an account with root access issue the following command:
$ sudo dpkg -i voltdb_3.2-1_amd64.deb
The advantages of using the Debian install package are:
The installation is completed in a single command. No additional set up is required.
VoltDB becomes available to all system users.
Upgrades are written to the same location. You do not need to modify your application scripts or move files after each upgrade.
However, there are a few changes to behavior that you should be aware of if you install VoltDB using the Debian package:
The VoltDB libraries are installed in /usr/lib/voltdb. When compiling stored procedures, you must include this location in your Java classpath.
The sample applications are installed into the directory
Because this is a system directory, users cannot run the samples directly in that location. Instead, first copy the
folder containing the sample application you want to run and paste a copy into your home directory structure. Then run
the sample from your copy. For example:
$ cp -r /usr/share/voltdb/examples/voter ~/ $ cd ~/voter $ ./run.sh
If you want to build the VoltDB software from source (for example, if you want to test recent development changes), you must first fetch the VoltDB source files. The VoltDB sources are stored in a GitHub repository accessible from the VoltDB community web site.
The VoltDB sources are designed to build and run on 64-bit Linux-based or 64-bit Macintosh platforms. However, the build process has not been tested on all possible configurations. Attempts to build the sources on other operating systems may require changes to the build files and possibly to the sources as well.
Once you obtain the sources, use Ant 1.7 or later to build a new distribution kit for the current platform:
$ ant dist
The resulting distribution kit is created as
n.n.nn identifies the current version and build numbers. Use this file to install VoltDB according to
the instructions in Section 2.2, “Installing VoltDB”.