Outdated Version

You are viewing an older version of this section. View current production version.

Deploy MemSQL Offline

Download MemSQL Files

Download the memsql-client, memsql-toolbox, memsql-server, and memsql-studio files onto the main deployment machine.

To obtain the latest version of each file, use the following:

curl https://release.memsql.com/production/index/<memsql-file>/latest.json

Replace <memsql-file> with memsqlclient, memsqltoolbox, memsqlserver, and memsqlstudio to download the list of available file types.

The JSON you receive contains relative file paths in the following format.

Red Hat Distribution

"Path": "production/rpm/x86_64/<memsql-file>-<version>-<commit-hash>.x86_64.rpm"

Debian Distribution

"Path": "production/debian/pool/<memsql-file>_<version>_<commit-hash>_amd64.deb"

Tarball Files

"Path": "production/tar/x86_64/<memsql-file>-<version>-<commit-hash>.x86_64.tar.gz"

Use wget to download the file by copying, pasting, and appending the path (minus the quotes) to https://release.memsql.com/. Examples are shown below.

Red Hat Distribution

wget https://release.memsql.com/production/rpm/x86_64/<memsql-file>-<version>-<commit-hash>.x86_64.rpm

Debian Distribution

wget https://release.memsql.com/production/debian/pool/<memsql-file>_<version>_<commit-hash>_amd64.deb

Tarball Files

wget https://release.memsql.com/production/tar/x86_64/<memsql-file>-<version>-<commit-hash>.x86_64.tar.gz

Alternatively, click on the desired file type below and click each button to download these files to your computer.

memsql-client memsql-toolbox memsql-server memsql-studio
memsql-client memsql-toolbox memsql-server memsql-studio
memsql-client memsql-toolbox memsql-server memsql-studio

Transfer MemSQL Files

Transfer the memsql-client, memsql-toolbox, memsql-server, and memsql-studio files onto the main deployment machine to a dedicated memsql directory that sudo users (.rpm and .deb files) and non-sudo users (.tar.gz files) can access.

Install MemSQL

Note: For the remainder of this document, <version>-<commit-hash> will be written simply as <version>.

For .rpm and .deb files, install memsql-client, memsql-toolbox, and memsql-studio.

Red Hat Distribution

sudo rpm -ivh memsql-client-<version>.x86_64.rpm
sudo rpm -ivh memsql-toolbox-<version>.x86_64.rpm
sudo rpm -ivh memsql-studio-<version>.x86_64.rpm

Debian Distribution

sudo dpkg -i memsql-client<memsql-file>_<version>_amd64.deb
sudo dpkg -i memsql-toolbox<memsql-file>_<version>_amd64.deb
sudo dpkg -i memsql-studio<memsql-file>_<version>_amd64.deb

Tarball Files

For .tar.gz files, unpack memsql-client, memsql-toolbox, and memsql-studio into the memsql directory.

tar xzvf memsql-client-<version>.tar.gz
tar xzvf memsql-toolbox-<version>.tar.gz
tar xzvf memsql-studio-<version>.tar.gz

Note: You do not need to install or unpack memsql-server as it will be installed during deployment.

Deploy MemSQL

Run the following command on the main deployment machine.

Red Hat and Debian Distributions

memsql-deploy setup-cluster -i <id_rsa-file-including-path> \
--license <memsql-license-from-portal.memsql.com> \
--master-host <master-aggregator-ip-or-hostname> \
--aggregator-hosts <child-aggregator-ip-or-hostname>\
--leaf-hosts <leaf-1-ip-or-hostname>,<leaf-2-ip-or-hostname> \
--password <desired-memsql-password,blank-if-none> \
--file-path <memsql-server-file-including-path>

Note the inclusion of the --file-path option.

Tarball Files

  1. Change to the memsql-toolbox- directory.

    cd memsql-toolbox-<version>
    
  2. Deploy MemSQL.

    ./memsql-deploy setup-cluster -i <id_rsa-file-including-path> \
    --license <memsql-license-from-portal.memsql.com> \
    --master-host <master-aggregator-ip-or-hostname> \
    --aggregator-hosts <child-aggregator-ip-or-hostname> \
    --leaf-hosts <leaf-1-ip-or-hostname>,<leaf-2-ip-or-hostname> \
    --password <desired-memsql-password,blank-if-none> \
    --file-path <memsql-server-file-including-path> \
    --force-package-format tar
    

    Note the inclusion of both the --file-path and --force-package-format tar options.

Interact with Your Cluster

On your main deployment machine, run the following command to use MemSQL Studio to monitor and interact with your cluster.

Red Hat and Debian Distributions

  1. Recommended: Enable the MemSQL Studio service to start MemSQL Studio at system boot.

    sudo systemctl enable memsql-studio
    ****
    Created symlink from /etc/systemd/system/multi-user.target.wants/memsql-studio.service to /usr/lib/systemd/system/memsql-studio.service.
    
  2. Start MemSQL Studio.

    sudo systemctl start memsql-studio
    

Tarball Files

  1. Change to the memsql-studio-<version> directory.

    cd memsql-studio-<version>
    
  2. Start MemSQL Studio from the command line. Use nohup to prevent memsql-studio from terminating when you close your terminal session.

    nohup ./memsql-studio > studio.stdout 2> studio.stderr < /dev/null &