Installing XS CLI Client
How to install the XS advanced client-tools bundle.
The server machine
in these instructions refers to the machine on which SAP HANA 2.0, express edition is installed, while client machine
refers to your local machine. You do not need to install the two on the same machine or VM.
- Step 1
The XS advanced
client-tools
bundle (xs.onpremise.runtime.client_<platform>-<version>.zip
) also includes theJavascript
bundle (xs_javascript-1.3.0-bundle.tar.gz
), which includes a selection of mandatoryNode.js
packages developed by SAP for use with theNode.js
applications running XS Advanced runtime.You can use the XS command line client to perform a wide variety of developer- and administrator-related tasks. For example, in the role of a developer, you can use the XS CLI to connect to the XS Advanced runtime installed on the server machine, log on as a specific user, and deploy and manage your applications.
- Step 2
Install the Download Manager to your client machine and download the client package.
-
Save the Download Manager installation files to your client machine and open it. For instructions on downloading and running the Download Manager, see either the Installing SAP HANA 2.0, express edition (Binary Installer Method) or Installing SAP HANA 2.0, express edition (Virtual Machine Method) tutorials, or go straight to the SAP HANA, express edition registration page.
-
In Download Manager, in the
Image
pull-down, select eitherVirtual Machine
orBinary Installer
. -
Click
Browse
and select a directory where your client package will be saved. -
Select the
Clients
package that matches the machine you will be installing the clients on. Clear the Select boxes of all other packages. -
Click
Download
. Thehdb_client_<OS>.tgz
file, orclients_windows.zip
for Windows, downloads to your save directory. -
Extract the compressed clients file:
-
For Windows and Mac machines, use a compression utility.
-
For Linux machines, navigate to the directory in which you wish to extract the client files and use the
tar
command:
-
cd <preferred_filepath>Copysudo tar -xzf <download_filepath>/clients_<OS>.tgz
These files are extracted:
clients_linux_x86_64.tgz
-
hdb_client_linux_x86_64.tgz
-
xs.onpremise.runtime.client_linuxx86_64.zip
clients_linux_ppc64.le.tgz
-
hdb_client_linux_ppc64le.tgz
-
xs.onpremise.runtime.client_linuxx86_64.zip
clients_windows.zip
-
hdb_client_windows_x86_32.tgz
-
hdb_client_windows_x86_64.tgz
-
xs.onpremise.runtime.client_ntamd64.zip
clients_mac.tgz
-
hdb_client_mac.tgz
-
xs.onpremise.runtime.client_darwinintel64.zip
-
- Step 3
Use a compression utility to extract the file you downloaded for your platform:
-
(Windows)
xs.onpremise.runtime.client_ntamd64.zip
-
(Mac)
xs.onpremise.runtime.client_darwinintel64.zip
-
(Linux)
xs.onpremise.runtime.client_linuxx86_64.zip
-
(PowerPC)
xs.onpremise.runtime.client_linuxppc64le.zip
The system creates this folder:
bashCopyxs.onpremise.runtime.client_<version>
-
- Step 4
- (Windows) In the Environment Variables dialog:
-
Edit System variables > Path
-
Add
<extracted_filepath>\bin
-
Restart the command line application for your new environment variable settings to take effect.
-
- (Mac) Run
export PATH=$PATH:/<extracted_filepath>/bin
-
(Linux) Run
export PATH=$PATH:/<extracted_filepath>/bin
-
(Power PC) Run
export PATH=$PATH:/<extracted_filepath>/bin
- (Windows) In the Environment Variables dialog:
- Step 5
Enter the following URL into your Web browser:
bashCopyhttps://<hana_hostname>:3<instance_number>30/v2/info
For example:
bashCopyhttps://my.hana.server:39030/v2/info
The response displayed in the Web browser is a JSON string with details that indicate whether there was a successful connection to the XSA controller. The connection must exists before you can connect from within the API command.
- Step 6
On your client machine, open a command window and run the following.
bashCopyxs help xs -v
On Linux, run these as
<sid>adm
.You see the
Client Version
in the output. If not, you cannot connect to XS Advanced runtime on SAP HANA to deploy your XS Advanced applications. - Step 7
Specify the URL of the API end point on the SAP HANA server you want to connect to:
bashCopyxs api https://<hostname>:3<instance_number>30
Note:
If this step fails, it may be due to a missing SSL certificate. Continue on to the next step to add the SSL certificate, otherwise skip the next step. - Step 8
Open a command session on the server machine or open a PuTTY session to the server machine. From the command prompt, log in as
sudo
and go to the certificatedefault.root.crt.pem
, which is typically located here:bashCopy<installation_path>/<SID>/xs/controller_data/controller/ssl-pub/router
For example, where
<installation_path>
is/hana/shared
and<SID>
isHXE
the certificate location would be:bashCopy/hana/shared/HXE/xs/controller_data/controller/ssl-pub/router/default.root.crt.pem
Copy the certificate to a folder on the server where you can easily access it. Using an FTP client or the
scp
command, send a copy of the certificate from your server machine to a safe location on your client machine.FTP:
bashCopy/<path>/default.root.crt.pem
scp
:bashCopyscp <server_machine_user>@<ip_address_server>:<file_destination>/default.root.crt.pem <client_machine_user>@<ip_address_client>:<your_desired_filepath>\
Exit your FTP and PuTTY sessions and return to your client machine. Try the previous command again, but use the
-cacert
option and specify the local certificate you just copied:bashCopyxs api https://<hostname>:3<instance_number>30 - cacert "<copied_filepath>/default.root.crt.pem"
Log on to the SAP HANA instance specified in the API end point that you set in a previous step. SAP HANA provides the default
XSA_ADMIN
user with administrator permissions. Although you can use this user ID to test the connection, you should create a new user with more limited permissions to use for developer tasks.To log on, run the following:
bashCopyxs login -u XSA_ADMIN -p "<password>"
Note:
A password is assigned to theXSA_ADMIN
user during SAP HANA 2.0, express edition installation. - Step 9
To test your connection to XS Advanced by running the following command on the SAP HANA 2.0, express edition server:
bashCopyxs apps
- XS CLI client info.
- Download the client package.
- Install the XS CLI client.
- Add the bin folder to the PATH environment variable.
- Verify XS Advanced runtime is installed.
- Confirm XS Advanced is Available
- Connect to XS Advanced controller.
- Add SSL certificate to connect to the server.
- Test the XS Advanced connection.