|
| 1 | +## Rug CLI Installation |
| 2 | + |
| 3 | +You can install the Rug command-line interface (CLI) using the |
| 4 | +standard developer packaging tools for your platform. We currently |
| 5 | +support installing the Rug CLI on GNU/Linux Deb and RPM distributions, |
| 6 | +Mac OS X/macOS using [Homebrew][brew], and MS Windows |
| 7 | +using [Chocolatey][choco]. |
| 8 | + |
| 9 | +[brew]: http://brew.sh/ |
| 10 | +[choco]: https://chocolatey.org/ |
| 11 | + |
| 12 | +### Install the Rug CLI on Mac OS X / macOS |
| 13 | + |
| 14 | +The easiest way to get start on a Mac is to install the Rug CLI using |
| 15 | +our [Homebrew][brew] [tap][] repository. |
| 16 | + |
| 17 | +[tap]: https://github.com/Homebrew/homebrew/tree/master/share/doc/homebrew#readme |
| 18 | + |
| 19 | +Once you have Homebrew installed, it is just two easy steps: |
| 20 | + |
| 21 | +``` |
| 22 | +$ brew tap atomist/tap |
| 23 | +$ brew install rug-cli |
| 24 | +``` |
| 25 | + |
| 26 | +### Install the RUG CLI on Linux |
| 27 | + |
| 28 | +We support installing via packages on Debian- and RPM-based GNU/Linux |
| 29 | +distributions. |
| 30 | + |
| 31 | +#### Debian/Ubuntu |
| 32 | + |
| 33 | +To install on a Debian-based distributions, follow the next instructions: |
| 34 | + |
| 35 | +1. Grab the public GPG key for the repository: |
| 36 | + |
| 37 | + $ wget -qO - 'https://atomist.jfrog.io/atomist/api/gpg/key/public' | apt-key add |
| 38 | + |
| 39 | +2. Add a new apt source entry: |
| 40 | + |
| 41 | + $ echo 'deb https://atomist.jfrog.io/atomist/debian $(lsb_release -c -s) main' | sudo tee /etc/apt/sources.list.d/atomist.list" |
| 42 | + |
| 43 | +3. Update the metadata: |
| 44 | + |
| 45 | + $ sudo apt-get update |
| 46 | + |
| 47 | +4. Install the CLI: |
| 48 | + |
| 49 | + $ sudo apt-get install rug-cli |
| 50 | + |
| 51 | +The only required dependency is the OpenJDK version 8 or later. |
| 52 | + |
| 53 | +#### RedHat/CentOS |
| 54 | + |
| 55 | +To install on a RedHat-based distributions, follow the next instructions: |
| 56 | + |
| 57 | +1. Add a new yum repository: |
| 58 | + |
| 59 | + $ cat <<EOF | sudo tee /etc/yum.repos.d/atomist.repo |
| 60 | + [Atomist] |
| 61 | + name=Atomist |
| 62 | + baseurl=https://atomist.jfrog.io/atomist/yum/ |
| 63 | + enabled=1 |
| 64 | + gpgcheck=0 |
| 65 | + EOF |
| 66 | + |
| 67 | +2. Install the CLI: |
| 68 | + |
| 69 | + $ sudo yum install rug-cli |
| 70 | + |
| 71 | +The only required dependency is the JDK version 8 or later. |
| 72 | + |
| 73 | +### Install the RUG CLI on Windows |
| 74 | + |
| 75 | +We used [Nuget][nuget] and [Chocolatey][choco] to package and |
| 76 | +distribute the CLI on Windows systems (actually wherever .NET and |
| 77 | +Powershell run). |
| 78 | + |
| 79 | +[nuget]: https://docs.nuget.org/ |
| 80 | + |
| 81 | +The following steps have been tested on Windows 10, your mileage may vary. |
| 82 | + |
| 83 | +1. Install Chocolatey on your host as per |
| 84 | + the [doc](https://chocolatey.org/install) |
| 85 | + |
| 86 | +2. Install the [jdk8](https://chocolatey.org/packages/jdk8) |
| 87 | + dependency using chocolatey as an Administrator: |
| 88 | + |
| 89 | + (admin) C:\ > choco install jdk8 |
| 90 | + |
| 91 | +3. Then, install the CLI using Chocolatey as an administrator: |
| 92 | + |
| 93 | + (admin) C:\ > choco install rug-cli -s "'https://atomist.jfrog.io/atomist/api/nuget/nuget'" |
| 94 | + |
| 95 | + The CLI will be installed in |
| 96 | + `%programdata%\Chocolatey\lib\rug-cli` and available to your |
| 97 | + `%PATH%`. You can now run as a normal user: |
| 98 | + |
| 99 | + (user) C:\ > rug --version |
| 100 | + rug 0.13.0 |
| 101 | + atomist/rug-cli.git (git revision 2cde8f5: last commit 2016-12-01) |
| 102 | + |
| 103 | + Notice, you will find the `.atomist` directory for settings and |
| 104 | + artifacts in `%USERPROFILE%\.atomist` |
| 105 | + |
| 106 | +You can keep your Rug CLI up to dat by regularly upgrading: |
| 107 | + |
| 108 | +``` |
| 109 | +(admin) C:\ > choco upgrade rug-cli -s "'https://atomist.jfrog.io/atomist/api/nuget/nuget'" |
| 110 | +``` |
| 111 | + |
| 112 | +You can remove the Rug CLI if you no longer want it installed: |
| 113 | + |
| 114 | +``` |
| 115 | +(admin) C:\ > choco uninstall rug-cli |
| 116 | +``` |
| 117 | + |
| 118 | +Files and directories in `%USERPROFILE%\.atomist` will not be |
| 119 | +removed. You can safely delete that directory manually if you don't |
| 120 | +intend to use the CLI any longer. |
| 121 | + |
| 122 | +### Manual installation |
| 123 | + |
| 124 | +If you are not on a supported platform, or just prefer to install the |
| 125 | +Rug CLI yourself, you can download the Rug CLI archive, unpack it, and |
| 126 | +simply put it its `bin` directory in your `PATH`. |
| 127 | + |
| 128 | +0. Make sure you have Java 8 or later installed. Run the following |
| 129 | + command in a terminal and make sure you get an output something |
| 130 | + like that shown. |
| 131 | + |
| 132 | + $ java -version |
| 133 | + java version "1.8.0_66" |
| 134 | + Java(TM) SE Runtime Environment (build 1.8.0_66-b17) |
| 135 | + Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode) |
| 136 | + |
| 137 | + If that command is unsuccessful, see [Installing Java][java] |
| 138 | + or [Installing OpenJDK][openjdk]. |
| 139 | + |
| 140 | +1. Download either the `.tar.gz` or `.zip` archive from the |
| 141 | + latest [Rug CLI release][releases]. |
| 142 | + |
| 143 | +2. Unpack the archive in an appropriate location. Replace `VERSION` |
| 144 | + with the version you downloaded. |
| 145 | + |
| 146 | + $ mkdir $HOME/opt |
| 147 | + $ cd $HOME/opt |
| 148 | + $ tar -x -z -f rug-cli-VERSION-bin.tar.gz |
| 149 | + $ ln -s rug-cli-VERSION rug-cli |
| 150 | + |
| 151 | + or |
| 152 | + |
| 153 | + $ mkdir $HOME/opt |
| 154 | + $ cd $HOME/opt |
| 155 | + $ unzip rug-cli-VERSION-bin.zip |
| 156 | + $ ln -s rug-cli-VERSION rug-cli |
| 157 | + |
| 158 | + On MS Windows, download the `.zip` and double-click it to extract |
| 159 | + its contents. |
| 160 | + |
| 161 | +3. Add the Rug CLI `bin` directory to your `PATH`. |
| 162 | + |
| 163 | + $ export PATH=$PATH:$HOME/opt/rug-cli/bin |
| 164 | + |
| 165 | + Add the above command to your shell startup script to ensure you |
| 166 | + always will have access to the Rug CLI. On MS Windows, |
| 167 | + see [How to Edit Your System Path][winpath], adding the `bin` |
| 168 | + directory of the archive you unpacked in the previous step. |
| 169 | + |
| 170 | +[java]: https://java.com/en/download/help/index_installing.xml?os=All+Platforms&j=8&n=20 |
| 171 | +[openjdk]: http://openjdk.java.net/install/ |
| 172 | +[releases]: https://github.com/atomist/rug-cli/releases |
| 173 | +[winpath]: http://www.howtogeek.com/118594/how-to-edit-your-system-path-for-easy-command-line-access/ |
0 commit comments