一、直接部署
1. 下载taokeeper.sql,初始化数据库(Mysql).
2. 下载taokeeper-monitor.war文件,解压到tomcat的webapps目前下,确保最后目录结构如下: %TOMCAT_HOME%\webapps\taokeeper-monitor.war
3. 下载 taokeeper-monitor-config.properties文件,存放到一个指定目录,比如
E:\tools\zookeeper\taokeeper\config\taokeeper-monitor-config.properties, 其中内容如下,根据需要自己修改下
---------------------------------------------------------------- #Daily-TB systemInfo.envName=DAILY-TB #DBCP dbcp.driverClassName=com.mysql.jdbc.Driver dbcp.dbJDBCUrl=jdbc:mysql://localhost:3306/taokeeper dbcp.characterEncoding=GBK dbcp.username=root dbcp.password=123456 dbcp.maxActive=30 dbcp.maxIdle=10 dbcp.maxWait=10000 #SystemConstant SystemConstent.dataStoreBasePath=E:/tools/zookeeper/taokeeper/ZookeeperStore #连接远程服务器的用户名和密码 SystemConstant.userNameOfSSH=root SystemConstant.passwordOfSSH=123456 #Optional #SystemConstant.configOfMsgCenter= #log #LOG_HOME=E:/tools/zookeeper/taokeeper/apache-tomcat-7.0.61/webapps/taokeeper-monitor/logs/ #LOG_LEVEL=DEBUG ------------------------------------------------------------------
4. 在tomcat启动脚本中catalina.bat中(大概在186行下面)添加JAVA_OPTS:
windows上:
set JAVA_OPTS=-DconfigFilePath="E:\tools\zookeeper\taokeeper\config\taokeeper-monitor-config.properties"
linux上:
JAVA_OPTS=-DconfigFilePath="/home/kobe/taokeeper-monitor/config/taokeeper-monitor-config.properties"
5. 启动tomcat服务器 %TOMCAT_HOME%\bin\startup.bat
6. 正常启动后,访问:http://127.0.0.1:8080/taokeeper-monitor
参考:http://jm-blog.aliapp.com/?p=1450
时间: 2024-10-11 05:11:09