SingleStore DB

SingleStore Client Installation
Install SingleStore Client
Online Installation

For online installations where you can access the SingleStore YUM repository, run the following steps.

Note: These steps are also provided in the self-managed SingleStore Tools deployment guides.

  1. Add the SingleStore repository to your repository list.

    sudo yum-config-manager --add-repo https://release.memsql.com/production/rpm/x86_64/repodata/memsql.repo
    
  2. Verify that the SingleStore repo information is listed under repolist.

    sudo yum repolist
    
  3. Verify you have the which package installed. This is used during the install process to identify the correct package type for your installation.

    rpm -q which
    

    If which is not installed, you must install it before proceeding. If you cannot install which, you will have to specify the correct package during the deployment phase covered in the respective deployment guide.

    sudo yum install -y which
    
  4. To install Client, run the following:

    sudo yum install -y singlestore-client 
    
Offline Installation

For clusters that must be deployed in an environment without Internet access, download the following SingleStore package onto a device with access to the main deployment host.

singlestore-client

Copy and install singlestore-client onto the main deployment host.

sudo rpm -ivh /tmp/singlestore-client-<version>.x86_64.rpm
Online Installation

For online installations where you can access the SingleStore APT repository, run the following steps.

Note: These steps are also provided in the self-managed SingleStore Tools deployment guides.

  1. SingleStore packages are signed to ensure integrity, so the GPG key needs to be added to this host. When done, verify that the SingleStore signing key has been added using apt-key list.

    wget -O - 'https://release.memsql.com/release-aug2018.gpg'  2>/dev/null | sudo apt-key add - && apt-key list
    
  2. Verify you have apt-transport-https installed.

    apt-cache policy apt-transport-https
    

    If apt-transport-https is not installed, you must install it before proceding. user-shell sudo apt -y install apt-transport-https

  3. Add the SingleStore repository to retrieve its packages.

    echo "deb [arch=amd64] https://release.memsql.com/production/debian memsql main" | sudo tee /etc/apt/sources.list.d/memsql.list
    
  4. To install Client, run the following:

    sudo apt update && sudo apt -y install singlestore-client 
    
Offline Installation

For clusters that must be deployed in an environment without Internet access, download the following SingleStore package onto a device with access to the main deployment host.

singlestore-client

Copy and install singlestoredb-client onto the main deployment host.

sudo dpkg -i /tmp/singlestore-client_<version>_amd64.deb
Download SingleStore DB Files

Download the following SingleStore tarball file onto a device with access to the main deployment host.

singlestore-client

Transfer SingleStore DB Files

Transfer the singlestore-client tarball file into a dedicated memsql directory that has been configured so that non-sudo users can access on the main deployment host, such as /home/<user>/singlestore or /opt/singlestore.

Unpack SingleStore DB Files

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

Unpack singlestore-client into the singlestore directory.

tar xzvf singlestore-client-<version>.tar.gz 
Upgrade SingleStore Client

To upgrade the singlestore-client package, follow the same basic steps that you would perform to update any RPM package.

Online

sudo yum update -y singlestore-client

Offline

sudo rpm -Uvh /tmp/singlestore-client-<version>.x86_64.rpm

To upgrade the singlestore-client package, follow the same basic steps that you would perform to update any Debian package.

Online

sudo apt update && sudo apt install -y singlestore-client

Offline

sudo dpkg -i /tmp/singlestore-client<version>_amd64.deb

To upgrade the SingleStore Client tarball, you need to replace the currently installed SingleStore Client binaries with new binaries. Using symbolic links is one way to achieve this action and the instructions are as follows.

  1. Navigate to the directory that contains the unpacked SingleStore Client tarball and create a symbolic link pointing to the SingleStore Client currently installed. Name this symlink singlestore-client.

    ln -s singlestore-client-<version>-<commit-hash> singlestore-client

    Run ls -l to verify that the symlink is created.

  2. Obtain the latest version of singlestore-client using the following command.

    curl https://release.memsql.com/production/index/memsqlclient/latest.json

    The JSON you receive contains a relative path to the memsql-client-tar file in the following format.

    "Path": "production/tar/x86_64/singlestore-client-<version>-<commit-hash>.x86_64.tar.gz"
  3. Use wget to download the file by copying, pasting, and appending the path (minus the quotes) to https://release.memsql.com/. Example is shown below.

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

    As an alternative to steps 2 and 3, you can download the latest version of SingleStore Client tarball file using the following link.

    singlestore-client

  4. Transfer the tarball file to the main deployment host where the earlier version of SingleStore Client is available.

  5. Unpack the SingleStore Client file by running the following command.

    tar xzvf singlestore-client-<version>-<commit-hash>.tar.gz

    Now the directory contains both versions of SingleStore Client.

  6. Remove the singlestore-client symlink by running the following command.

    rm singlestore-client
  7. Recreate the symlink by pointing it to the new version of SingleStore Client downloaded and unpacked in steps 2 and 4.

    ln -s singlestore-client-<version>-<commit-hash>/ singlestore-client

    The upgrade is complete. If you encounter any issues and need to downgrade, you can simply point the symlink back to the old version for SingleStore Client.

  8. After successful validation, you can remove the old version of SingleStore Client by running the following command.

    rm -rf singlestore-client-<version>-<commit-hash>

Note

Using symbolic links is optional in the SingleStore Client tarball upgrade. To perform the upgrade, you need to replace the old SingleStore Client binaries with new binaries with or without symbolic links.

As an alternative to using symbolic links for the upgrade, you can update the PATH environment variable with the path to the folder where the new version of SingleStore Client tarball is unpacked, as shown below.

export PATH=<Folder-with-new-binaries>/singlestore-client-<version>-<commit-hash>/:$PATH
Uninstall SingleStore Client

You can either uninstall Client as a standalone task or remove it while uninstalling SingleStore DB. If you want to completely uninstall SingleStore DB and its related tools packages, first uninstall SingleStore DB from your nodes by using the sdb-deploy uninstall command. This will remove the singlestoredb-server package for that version of SingleStore DB (all versions of SingleStore DB can be uninstalled using the --all-versions flag).

Important

The remove command and -e flag will only remove the binaries in the package and not remove any configuration files.

As part of the removal process, or to simply remove Client, perform the following operation:

Online

sudo yum remove singlestore-client

Offline

sudo rpm -e singlestore-client

You can either uninstall Client as a standalone task or remove it while uninstalling SingleStore DB. If you want to completely uninstall SingleStore DB and its related tools packages, first uninstall SingleStore DB from your nodes by using the sdb-deploy uninstall command. This will remove the singlestoredb-server package for that version of SingleStore DB (all versions of SingleStore DB can be uninstalled using the --all-versions flag).

As part of the removal process, or to simply remove Client, perform the following operation:

Important

The purge command and -P flag will remove the binaries in the package as well as any configuration files. If you want to keep the configuration files, use the remove command or -r flag instead.

Online

sudo apt purge singlestore-client

Offline

sudo dpkg -P /tmp/singlestore-client_<version>_amd64.deb