2.2 下载安装Grails - Reference Documentation
Authors: Graeme Rocher, Peter Ledbrook, Marc Palmer, Jeff Brown, Luke Daley, Burt Beckwith
Version: null
2.2 下载安装Grails
The first step to getting up and running with Grails is to install the distribution. To do so follow these steps:
首先需要下载Grails的发行包并进行安装,执行步骤如下:
- Download a binary distribution of Grails and extract the resulting zip file to a location of your choice
- Set the GRAILS_HOME environment variable to the location where you extracted the zip
- On Unix/Linux based systems this is typically a matter of adding something like the following
export GRAILS_HOME=/path/to/grailsto your profile - On Windows this is typically a matter of setting an environment variable under
My Computer/Advanced/Environment Variables - Then add the
bindirectory to yourPATHvariable: - On Unix/Linux based systems this can be done by adding
export PATH="$PATH:$GRAILS_HOME/bin"to your profile - On Windows this is done by modifying the
Pathenvironment variable underMy Computer/Advanced/Environment Variables
grails -version in the terminal window and see output similar to this:
Grails version: 2.0.0
- 下载 Grails二进制发行包并解压到指定的文件目录下
- 在环境变量中添加GRAILS_HOME,值为上一步解压的文件目录。
- Unix/Linux系统中,通常将
export GRAILS_HOME=/path/to/grails追加到到用户的启动配置文件中(通常是.profile或者.bashrc等-译者注) - Windows系统上右击“我的电脑”/“属性”/“高级”/“环境变量”,点击新建。
- 将GRAILS_HOME的
bin目录追加到系统的PATH变量中: - Unix/Linux系统中,通常将
export PATH="$PATH:$GRAILS_HOME/bin"追加到到用户的启动配置文件中(同上) - Windows系统上右击“我的电脑”/“属性”/“高级”/“环境变量”,修改PATH变量的值。
grails -version 如果屏幕上显示如下提示则说明安装成功:
Grails version: 2.0.0

