Installing ybtools on Linux

Make sure that Java 1.8 64-bit is installed on your client system. See Installing the Java Runtime Environment.

Follow these steps to install the client tools on an Ubuntu, Debian, or CentOS Linux client system:

  1. Download the package for your client operating system from the SMC. Go to Configure > Drivers and Tools > Client Tools.
  2. If necessary, copy the downloaded package to the client system.
  3. From the client directory where the download file was copied, run the appropriate installation commands, which must be run as sudo:
    • Ubuntu 16.04 LTS: Install the ybtools package:
      $ sudo apt-get install ./ybtools-4.0.0.1234.ubuntu.16.04.x86_64.deb

      where the package name is ybtools-4.0.0.1234.ubuntu.16.04.x86_64.deb in this example.

    • Ubuntu 18.04 LTS: Install the ybtools package:
      $ sudo apt-get install ./ybtools-4.0.0.1234.ubuntu.18.04.x86_64.deb

      where the package name is ybtools-4.0.0.1234.ubuntu.18.04.x86_64.deb in this example.

    • RHEL/CentOS 6.0 or 7.0:
      1. Remove the old version of ybtools:
        $ sudo yum remove ybtools
      2. Install the new ybtools package:
        $ sudo yum install ybtools-4.0.0.1234-1.el6.x86_64.rpm

        where the package name is ybtools-4.0.0.1234-1.el6.x86_64.rpm in this RHEL 6.0 example.

For example, the following installation was run on an Ubuntu 16 client system:
$ sudo apt-get install ./ybtools-4.0.0.1473.ubuntu.16.04.x86_64.deb
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'ybtools' instead of './ybtools-4.0.0.1473.ubuntu.16.04.x86_64.deb'
The following packages were automatically installed and are no longer required:
  bsh libasm3-java libganymed-ssh2-java libisl13 libjackrabbit-java libjline-java libjna-java libjna-jni libjna-platform-java
  libjsch-agent-proxy-java libjsoncpp0v5 liblldb-3.8 libllvm3.8 libmaven-scm-java libnetbeans-cvsclient-java libruby2.2 libsisu-guice-java llvm-3.8
  llvm-3.8-dev llvm-3.8-runtime nagios-plugins-common python3-bcdoc ruby2.1-dev
Use 'sudo apt autoremove' to remove them.
The following packages will be upgraded:
  ybtools
1 upgraded, 0 newly installed, 0 to remove and 330 not upgraded.
Need to get 0 B/72.2 MB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 /home/brumsby/ybtools-4.0.0.1473.ubuntu.16.04.x86_64.deb ybtools amd64 4.0.0.1473 [72.2 MB]
(Reading database ... 153992 files and directories currently installed.)
Preparing to unpack .../ybtools-4.0.0.1473.ubuntu.16.04.x86_64.deb ...
Unpacking ybtools (4.0.0.1473) over (4.0.0.1464) ...
Setting up ybtools (4.0.0.1473) ...
update-alternatives: using /opt/ybtools/bin/ybbackup to provide /usr/bin/ybbackup (ybbackup) in auto mode
update-alternatives: using /opt/ybtools/bin/ybbackup-list-old to provide /usr/bin/ybbackup-list-old (ybbackup-list-old) in auto mode
update-alternatives: using /opt/ybtools/bin/ybbackup-old to provide /usr/bin/ybbackup-old (ybbackup-old) in auto mode
update-alternatives: using /opt/ybtools/bin/ybbackupctl to provide /usr/bin/ybbackupctl (ybbackupctl) in auto mode
update-alternatives: using /opt/ybtools/bin/ybdumproles to provide /usr/bin/ybdumproles (ybdumproles) in auto mode
update-alternatives: using /opt/ybtools/bin/ybdumpschema to provide /usr/bin/ybdumpschema (ybdumpschema) in auto mode
update-alternatives: using /opt/ybtools/bin/ybload to provide /usr/bin/ybload (ybload) in auto mode
update-alternatives: using /opt/ybtools/bin/ybrelay to provide /usr/bin/ybrelay (ybrelay) in auto mode
update-alternatives: using /opt/ybtools/bin/ybrestore to provide /usr/bin/ybrestore (ybrestore) in auto mode
update-alternatives: using /opt/ybtools/bin/ybrestore-old to provide /usr/bin/ybrestore-old (ybrestore-old) in auto mode
update-alternatives: using /opt/ybtools/bin/ybsql to provide /usr/bin/ybsql (ybsql) in auto mode
update-alternatives: using /opt/ybtools/bin/ybunload to provide /usr/bin/ybunload (ybunload) in auto mode
update-alternatives: using /opt/ybtools/config/ybrelay-init to provide /usr/bin/ybrelay-init (ybrelay-init) in auto mode
On Linux clients, the tools are installed in /opt/ybtools. For example:
$ cd /opt/ybtools
me@yb:/opt/ybtools$ ls
bin  config  integrations  lib  license.txt
If the locale on the client system is not compatible with the locale set for the database, you may see an error of the following form when you connect to a database with the ybsql client:
$ ybsql -d yellowbrick -h vm100.yb.io -U yellowbrick
Password for user yellowbrick: 
ybsql: FATAL:  conversion between LATIN1 and LATIN9 is not supported
Make sure your client locale is consistent with the database locale. You can use the locale command to return client settings:
$ locale
LANG="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
...

To check which locales are installed on your client system, use the locale -a command.