...
Download the CLI binary distribution (apache-stratos-cli-version-SNAPSHOT.zip)
and unzip it.
This can be done using any of the following methods:
Method 1 - Download the Stratos CLI binary distribution from Apache Download Mirrors and unzip it.
Methods 2 - Obtain the Stratos CLI binary distribution from the following directory in the Stratos source distribution and unzip it.
<STRATOS_SOURCE_HOME>/products/stratos-cli/distribution/target/
Note |
---|
The CLI binary distribution will only be available in the Stratos source distribution after Stratos is built from the source. |
.bash_profile
file
.On Linux you need to add the following to your .bashrc
file.
Code Block |
---|
export STRATOS_URL=https://<STRATOS-MANAGER-IP>:<PORT> |
For example:
Code Block |
---|
export STRATOS_URL=https://localhost:9443 |
Ensure that your Java home and Java path environmental variables have been set in your .bash_profile
(on Mac) or .bashrc
(on Linux) file.
Navigate to the apache-stratos-cli-version-SNAPSHOT/bin/
directory.
Code Block |
---|
cd apache-stratos-cli-<VERSION>-SNAPSHOT/bin |
Add execute permissions to the script.
Code Block |
---|
chmod +x ./stratos.sh |
Optionally, you can export your username and password as environment variables.
If you only export your username, you will be prompted to enter your password.
Code Block |
---|
export STRATOS_USERNAME=<username> export STRATOS_PASSWORD=<password> |
Log into the CLI tool using the following command:
Command | Scenario |
---|---|
./stratos.sh -u admin -p admin | If you have not exported your username and password. |
./stratos.sh -p admin | If you have only exported your username. |
./stratos.sh | If you have exported your username and password or if you wish to be prompted for your username and password later. |
For more information on how to use the CLI tool, see the CLI Tool Guide.