GVM tool

目录:

  1. 概述
  2. 安装配置
  3. 基本应用

[一]、概述

GVM是用于管理大多数基于Unix系统上的多个并行版本的软件开发工具包的一个工具。它提供了一个的命令行界面可以方便快捷地安装,切换,删除和查看各个版本。

它的作用和Ruby的RVM很相似。目前GVM可以运行再如下平台:

  • Linux
  • Mac OSX
  • Cygwin
  • Solaris
  • FreeBSD (with bash installed)

更多信息参见官网:http://gvmtool.net/

[二]、安装配置

ps:本文是在 Mac OSX 10.8.3的系统上安装演示的

打开终端输入如下命令:

1 curl -s get.gvmtool.net | bash

回车正常会看到如下信息:

micmiu-mbp:~ micmiu$ curl -s get.gvmtool.net | bash

Thanks for using                                                     

_____/\\\\\\\\\\\\__/\\\________/\\\__/\\\\____________/\\\\_
 ___/\\\//__\/\\\_______\/\\\_\/\\\\\\________/\\\\\\_
  __/\\\_____________\//\\\______/\\\__\/\\\//\\\____/\\\//\\\_
   _\/\\\____/\\\\\\\__\//\\\____/\\\___\/\\\\///\\\/\\\/_\/\\\_
    _\/\\\___\/\\\___\//\\\__/\\\____\/\\\__\///\\\/___\/\\\_
     _\/\\\_______\/\\\____\//\\\/\\\_____\/\\\____\///_____\/\\\_
      _\/\\\_______\/\\\_____\//\\\\\______\/\\\_____________\/\\\_
       _\//\\\\\\\\\\\\/_______\//\\\_______\/\\\_____________\/\\\_
        __\__________\///________\///______________\///__

                                       Will now attempt installing...

Looking for a previous installation of GVM...
Looking for unzip...
Looking for curl...
Looking for sed...
Installing gvm scripts...
Create distribution directories...
Create candidate directories...
Prime the config file...
Download script archive...
Extract script archive...
Install scripts...
Make init script executable...
Attempt update of bash profiles...
Updated existing /Users/micmiu/.profile
Created and initialised /Users/micmiu/.bashrc
Attempt update of zsh profiles...
Created and initialised /Users/micmiu/.zshrc

All done!

Please open a new terminal, or run the following in the existing one:

    source "/Users/micmiu/.gvm/bin/gvm-init.sh"

Then issue the following command:

    gvm help

Enjoy!!!

安装后,重新打开一个终端输入如下命令验证是否安装成功:

1 gvm help

安装成功,回车会看到如下信息:

micmiu-mbp:~ micmiu$ gvm help

Usage: gvm <command> <candidate> [version]

   command    :  install, uninstall, list, use, current, version, default, selfupdate, broadcast or help
   candidate  :  groovy, grails, griffon, gradle, lazybones, vertx
   version    :  optional, defaults to latest stable if not provided

eg: gvm install groovy

[三]、基本应用

1. install 命令

安装当前默认groovy版本只需输入如下命令:

1 gvm install groovy

回车安装完成显示如下信息:

micmiu-mbp:~ micmiu$ gvm install groovy

Downloading: groovy 2.1.3

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 27.2M  100 27.2M    0     0  41617      0  0:11:25  0:11:25 --:--:-- 83111

Installing: groovy 2.1.3
Done installing!

Do you want groovy 2.1.3 to be set as default? (Y/n): Y

Setting groovy 2.1.3 as default.

如果需要安装指定版本的groovy ,只需要输入:

1 gvm install groovy 2.0.0

2. use 命令

切换到指定版本命令如下:

1 gvm use groovy 2.1.3

3. default 命令

设定默认版本命令如下:

1 gvm default groovy 2.1.3

4. current 命令

查看当前所有的软件配置:

1 gvm current

查看到当前指定软件的配置:

1 gvm current groovy

5. list 命令

查看软件所有的版本清单:

1 gvm list groovy

6. Uninstall 命令

卸载指定版本的软件:

1 gvm uninstall groovy 2.0.0

7. version 命令

查看当前gvm的版本:

1 gvm version

转载于:https://my.oschina.net/dongwq/blog/170765

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值