Install SRM from ZIP or TAR archives.
Create a home directory for SRM. Cloudera recommends
/opt/streams-replication-manager/
.
mkdir -p /opt/streams-replication-manager/
Extract the files from the downloaded archive.
Use the
unzip
or
tar
command or any other archive
manager to extract the archives. For
example:
tar -xzvf [ARCHIVE_PATH] -C /opt/streams-replication-manager/ unzip -o [ARCHIVE_PATH] -d /opt/streams-replication-manager/ Replace
[ARCHIVE_PATH] with the path to the archive you have downloaded. For
example, /root/streams-replication-manager-0.0.1.1.0.0.0-42.tgz
.
Verify that the directories have correct file permissions. If not assign
them.
chmod -R 755 /opt/streams-replication-manager/
Set environment variables:
Navigate to the SRM config directory. For example,
/opt/streams-replication-manager/[ARCHIVE_NAME] /config
. Replace
[ARCHIVE_NAME] with the full name of the archive that you have
downloaded. For example,
streams-replication-manager-0.0.1.1.0.0.0-42
.
Open srm-env.sh
with an editor of your choice and add the
following environment variables:
export SRM_HOME=/opt/streams-replication-manager/[ARCHIVE_NAME]
export SRM_BIN_DIR=${SRM_HOME}/bin
export SRM_CONF_DIR=${SRM_HOME}/config
export SRM_LOG_DIR=${SRM_HOME}/logs
export SRM_PID_DIR=${SRM_HOME}/run
Optional: Specify an alternate temporary-file directory for RocksDB.
This step is only required if you have mounted
/tmp
with
the
noexec
option. In this case you have to specify an alternate
tmp
directory for RocksDB. You can achieve this by adding the
following environment variable to
srm-env.sh
:
export ROCKSDB_SHAREDLIB_DIR=/root/tmp/srmrocksdb
note
Verify that the specified directory exists and that the users running SRM have
read, write and execute permissions. If the directory does not exist, create it and
assign the correct permissions.
Optional: Add the SRM bin
directory to your
PATH
environment variable. For example:
export PATH=/opt/streams-replication-manager/[ARCHIVE_NAME] /bin:$PATH
SRM is installed on the
host. Use the command line tools provided with SRM to start the driver and service.