Ubuntu: Install Pivotal GemFire from a Debian Package
Ubuntu: Install Pivotal GemFire from a Debian Package
If your operating system is Ubuntu, you can install Pivotal GemFire from a Debian package.
- Confirm that your system meets the hardware and software requirements described in Pivotal GemFire Supported Configurations.
- If you have not already done so, download and install a compatible JDK on the Ubuntu computer or VM.
- From the Pivotal GemFire product page, locate Downloads.
- Download the Debian package pivotal-gemfire_8.0.0-1_all.deb.
- From the Ubuntu computer on which you will install
GemFire, log in as the root user (or as an unprivileged user who has sudo
privileges) and start a terminal. Note: If you are not logged in as the root user, you must use the sudo command to run the commands in the following steps.
- In the terminal window, change directories to the directory where you downloaded the Debian package.
- Execute the following
$ dpkg -i pivotal-gemfire_8.0.0-1_all.debIf necessary, use sudo to run the preceding command if you are not logged in as the root user:
$ sudo dpkg -i pivotal-gemfire_8.0.0-1_all.deb
The dpkg command begins the install process, resolves dependencies, and displays the packages it will install. The GemFire software is installed into the /opt/pivotal/gemfire/Pivotal_GemFire_NNN directory where NNN corresponds to the version of Pivotal GemFire that you installed.If necessary, the install process creates a gemfire non-interactive user in the pivotal group. This user owns the installed GemFire directories and files, including any disk store files that you create later.Note: You cannot log in directly as the gemfire user because interactive login has been disabled. Rather, you must first log in as the root user or as a user with sudo privileges. You can then execute commands as the gemfire user by using sudo -u gemfire command_name.
- If you have not already done so, download and install a compatible JDK or JRE on the computer or VM.
- Configure the JAVA_HOME environment variable. If you will be using the gfsh command-line utility or managing servers and locators with the ServerLauncher and LocatorLauncher APIs, then you must set JAVA_HOME to a JDK installation. For example:
JAVA_HOME=/usr/java/jdk1.6.0_38 export JAVA_HOME
- Add GemFire scripts to your the PATH environment variable. For
PATH=$PATH:$JAVA_HOME/bin:/opt/pivotal/Pivotal_GemFire_800/bin export PATH
- The following step only applies to environments where
you are running GemFire processes or GemFire client applications outside of gfsh. The gfsh (as
well as the deprecated cacheserver) script sets these environment variable for you. If you are
running GemFire processes or applications outside of gfsh, then configure the following
environment variables for GemFire.
- Set the GEMFIRE environment variable to point to
your GemFire installation top-level directory. (You should see bin,
lib, dtd, and other directories under GEMFIRE.) The
following variables definitions are examples; your installation path may vary depending on
where you install GemFire and the version you are installing.
GEMFIRE=/opt/pivotal/Pivotal_GemFire_800 export GEMFIRE
- Configure your GF_JAVA environment variables as
shown in these examples. GF_JAVA must point to the java executable file
under your JAVA_HOME. (If you have not done so already, you should also set your JAVA_HOME
variable to a supported Java installation.)
GF_JAVA=$JAVA_HOME/bin/java export GF_JAVA
- Set the GEMFIRE environment variable to point to your GemFire installation top-level directory. (You should see bin, lib, dtd, and other directories under GEMFIRE.) The following variables definitions are examples; your installation path may vary depending on where you install GemFire and the version you are installing.
- Type gfsh version at the command line and verify that the output lists the
version of Pivotal GemFire that you wished to install. For
# gfsh v8.0.0If you want more detailed version information such as the date of the build, build number and JDK version being used, type gfsh version --full.
- If deploying GemFire to a production environment, purchase production licenses from your sales representative. See Understanding Pivotal GemFire Licensing.
- Repeat this procedure for every virtual or physical machine on which you will run Pivotal GemFire.
Optional cacheserver Script Configuration
- Specify that the cacheserver
process should automatically start when the operating system starts by running the following
chkconfig --level 35 cacheserver on
- Specify the configuration of the
cacheserver process by editing the file
/etc/sysconfig/cacheserver, which is the file sourced by the script that
you will later use to start the GemFire server process
(/etc/init.d/cacheserver.) The /etc/sysconfig/cacheserver file includes many comments to help you decide whether you need to modify it. Here are additional pointers:
If you do not modify the /etc/sysconfig/cacheserver file but simply use the one installed by default, the cacheserver process starts up a server instance in a multicast configuration.
If you want the cacheserver process to start up using a locator-based configuration, change the LOCATOR property in the /etc/sysconfig/cacheserver file to local, as shown:
This configuration allows a local locator process to start along with a local server instance. To add additional remote locators, add their IP address and port to the LOCATOR_IP_STRING as shown in the configuration file as a commented-out example.
If you want to start up only a local locator process and not a local server instance, set the LOCATOR property to locator_only. This sets up a redundant locator configuration; be sure you add the locator IP addresses and port numbers to the LOCATOR_IP_STRING; an example is shown in the configuration file.
Finally, set the LOCATOR property to remote if you want to start a local server instance that relies on having locator processes running on one or more remote hosts. Specify these remote hosts using the LOCATOR_IP_STRING property.
- Start the cacheserver processes associated with
GemFire by running the following command:
By default, the process uses an evaluation license. The installation process creates a skeleton gemfire.properties file to get you started.
- To stop, restart, and get status about the processes,
pass the stop, restart, and status parameters, respectively, to the