zheng-1:环境搭建及项目部署
1.环境搭建
1.1.Jdk的安装及配置(已安装跳过)
1.1.1下载jdk1.7及其以上,
解压到你所需要安装的磁盘中,例如我安装到C:\Program Files\jdk\jdk1.7.0_51
1.1.2配置JAVA_HOME:
右键计算机-属性然后按照下图方式配置对应的jdk环境变量

1.1.3配置CLASSPATH:
右键计算机-属性然后按照下图方式配置CLASSPATH
1.1.4接下来验证jdk是否配置成功
Win+r输入cmd回车在命令窗口中输入java –version 如下图则成功安装jdk
1.2.Mysql5.5安装(已安装跳过)
1.2.1下载mysql
这里下载你的系统对应的<a href="http://dev.mysql.com/downloads/mysql/5.5.html">mysql</a>版本 ,我这里下载的是windwos64位版本的安装过程如下(以5.1为例。当然5.5和5.1的安装界面存在区别。安装过程中需注意字符集选用utf-8)




















接着进入cmd 输入 mysql –uroot –proot进入如下界面证明mysql安装成功。

1.3.安装maven
1.3.1安装以三个工具

1.3.2配置MAVEN_HOME

1.3.3配置maven到path
在path最后加入;%MAVEN_HOME%\bin;验证maven是否安装成功,win+r输入cmd输入mvn –version出现这样的界面则安装成功。

1.3.4.配置maven的settings.xml,添加镜像

1.3.5.更改依赖包下载位置,添加aliyun的镜像

<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
1.4.安装git
Git安装建议安装客户端,这样方便后续idea不用安装。下载如下三个工具

1.4.1.先安装git2.8.2-64.exe

双击,全选下一步





1.4.2.然后安装TortoiseGit-2.1.0.0-64bit.msi






1.4.3.TortoiseGit-LanguagePack-2.1.0.0-64bit-zh_CN.msi这是个语言包,可装可不装。
1.4.4.安装好以后在任意盘符邮件,查看是否有git客户端



在这里查看配置git的帐号密码。

安装完可以通过oschina上找个一个开源的项目检出下看看能否顺利检出。
1.5.安装idea开发工具及相关配置
1.5.1.下载idea
在<a href="http://www.jetbrains.com/idea/">官网</a>下载idea
1.5.2.永久破解idea

由于我们是使用注册机永久激活,所以需要输入本机的注册机地址http://127.0.0.1:1017
该地址是在启动注册机后才能链接成功!

下载注册机,https://github.com/mengzhihoing/jbls/,根据自己的操作系统选择解压后的exe文件,然后双击打开!

点击ok,则注册成功!
1.5.3.配置idea
1.5.3.1.maven配置
配置idea的maven,file->settings

1.5.3.2.GIT配置

1.6.Redis安装
下载Redis-x64-3.2.100-windows.msi
https://github.com/MSOpenTech/redis/releases安装过程比较简单,一路next就可以了。
1.7.Zookeeper安装
下载:http://www.apache.org/dyn/closer.cgi/zookeeper/,这里我下载的是最新版本。
解压到对应的盘符,这里我解压到D盘根目录,进入到zookeeper的bin目录双击zkServer.cmd启动服务。(这里也许会遇到启动该文件一闪而过的情况,我们可以用文本编辑器打开该文件然后再末尾加pause,这样再启动就会看到错误,问度娘解决就可以了!!!)
1.8 ActiveMQ安装
下载http://activemq.apache.org/download-archives.html
解压到对应的目录,例如我解压到D盘根目录,进入MQ的bin目录D:\apache-activemq-5.9.0\bin\win64,双击activemq.bat
在浏览器中输入http://localhost:8161/admin/输入默认的admin admin ,出现这样的界面则MQ安装成功。

1.9.PowerDesigner安装
1.10.Idea代码检出、同步、编译及发布过程








待下载完成后会自动打开,如果未打开,则按下面操作:
选择下载的zheng目录,确认
找到每个项目的跟pom.xml添加maven的project。添加完后下载依赖。
下载依赖
看到这个过程代表在下载依赖。下载依赖的过程先运行zheng-common
build成功的结果
脚本导入
启动Navicat Premium,当然也可以通过cmd命令窗口登录到mysql数据库中新建数据库zheng 导入zheng.sql
成功登录到Navicat Premium,右键127.0.0.1新建数据库。
点击开始,先导入zheng.sql脚本,以及其他sql脚本(测试数据)。
添加jetty启动项目(web项目)
Zheng-upms-rpc-service(使用main方法启动)
Zheng-cms-admin启动成功
启动tomcat,tomcat中部署dubbo应用。访问tomcat的dubbo后台。
访问项目应用
1.11 常见错误总结
这个错误一定是idea的jdk没配置。
这样错误一般是git检出时出错了,出错的过程也是如下操作导致的
这样检出了。建议用客户端先检出后import。或许还有其它操作导致以上错误的
2 项目启动顺序的升级
2.1 说明
本次项目升级主要 zheng-admin改名为zheng-ui。
2.2 升级最新项目
2.3 编译项目,运行导入最新脚本(内含基础数据)
Git更新最新
编译zheng-common、zheng-ui、zheng-upms、zheng-cms这里有编译顺序。按照如上顺序编译。
跑最新脚本zheng.sql 在跑脚本之前请先删除zheng数据库的表。
2.4 启动
群主本次升级去掉了启动顺序的限制,启动不检查对方,等调用的时候才提示
这样不至于启动失败,为方便zheng项目的整体架构,建议启动顺序为:zheng-upms-rpc-service、
Zheng-cms-rpc-service
最后启动zheng-upms-server和zheng-cms-admin
2.5 访问
http://upms.zhangshuzheng.cn:1111/manage/index
默认帐号:admin 密码123456
2.6 项目进度
2.7 部分页面
扫描以下公众号关注小猿↓↓↓↓↓↓↓↓

更多资讯请在简书、微博、今日头条、掘金、CSDN都可以通过搜索“Share猿”找到小猿哦!!!