依赖环境
- Java 8 SDK
- nodeJs
- Git 版本控制
jdk
jHipster 需要使用jdk 8 版本
JDK下载地址
nodeJs
nodejs.org 官方网站
v4.4.4 (WINDOWS) 下载
v6.2.0 (WINDOWS) 下载
下载上述任意安装包,根据提示逐步安装。
安装好之后我们就可以使用nodejs安装其他的依赖包了。
由于nodejs默认文件源在国外,直接使用npm安装依赖包的速度会很慢。
此处建议使用淘宝的源替换。
打开命令行
npm config set registry https://registry.npm.taobao.org
这时候nodejs就安装成功了
安装GIT
windows版本下载地址 https://git-for-windows.github.io/
# ubuntu系统安装方式
apt-get install git
# centos系统安装方式
yum install git
安装jHipster
npm install -g yo bower gulp-cli
安装jhipster
npm install -g generator-jhipster
以下是执行npm安装过程中出现的提示,大同小异
/usr/local/bin/yo -> /usr/local/lib/node_modules/yo/lib/cli.js
> yo@1.8.4 postinstall /usr/local/lib/node_modules/yo
> yodoctor
Yeoman Doctor
Running sanity checks on your system
✔ Global configuration file is valid
✔ NODE_PATH matches the npm root
✔ Node.js version
✔ No .bowerrc file in home directory
✔ No .yo-rc.json file in home directory
✔ npm version
Everything looks all right!
/usr/local/lib
└── yo@1.8.4
/usr/local/bin/bower -> /usr/local/lib/node_modules/bower/bin/bower
/usr/local/lib
└── bower@1.7.9
npm WARN deprecated graceful-fs@3.0.8: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN deprecated lodash@1.0.2: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.
npm WARN deprecated graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
/usr/local/bin/gulp -> /usr/local/lib/node_modules/gulp/bin/gulp.js
/usr/local/lib
└─┬ gulp@3.9.1
└─┬ gulp-util@3.0.7
└─┬ dateformat@1.0.12
└─┬ meow@3.7.0
└─┬ loud-rejection@1.4.1
└── currently-unhandled@0.4.1
npm WARN deprecated cross-spawn-async@2.2.4: cross-spawn no longer requires a build toolchain, use it instead!
npm WARN deprecated npmconf@2.1.2: this package has been reintegrated into npm and is now out of date with respect to npm
/usr/local/lib
└── generator-jhipster@3.4.0
以上就是整个jHipster安装过程所需要涉及到的操作(省略了一些常用软件jdk,nodejs的安装步骤,相信大家很容易在百度上搜索到)