Cat Monitoring Platform Environment setup

Source: Internet
Author: User

Project Address: Https://github.com/dianping/cat

Compile steps:

This project is a bit of an alternative, putting the required jar packages into Git branch Mvn-repo, and the official documentation gives the wrong command prompt:

 git [email protected]:dianping/cat.git mvn-repo

When you paste this command directly into the terminal, the command is not valid and the correct posture is as follows:

1. Install JDK 1.7 First

This is important, the CAT project development time is relatively early, at that time estimated jdk8 not yet, in 1.8 compile although can succeed, but last run the error.

Note: For a Mac that already has jdk1.8 installed, you can refer to the Mac to install multiple versions of the JDK at the same time, if you get multiple versions of the JDK switch, do not add $java_home/bin in the path variable, otherwise the alias switch only switches java_home, But the value in path does not change.

2. Copy the jar package under branch Mvn-repo to the native Maven repository

123456 git clone https://github.com/dianping/cat.gitcdcatgit checkout mvn-repocp -R * ~/.m2/repositorygit checkout mastermvn clean install-DskipTests

And then compile it again, again: If you have multiple versions of the JDK installed, switch the JDK version to JDK 1.7 before compiling (including the JDK 1.7 environment when compiling successfully)

Deployment steps:

1 mvn cat:install

During the installation process, you will be prompted to enter the MySQL connection address, input format strictly according to jdbc:mysql://127.0.0.1:3306 this format, do not add some additional parameters, and then enter the user name, password (the user to have the permission to create DATABASE), The cat database is then automatically created in MySQL and then a bunch of tables are created.

12 cdcat-homemvn jetty:run

If the boot process is error-free, you can see the legendary cat interface.

  

Considerations under Windows:

Windows is on the system run disk/data/appdatas/cat and/data/applogs/cat have read and Write permissions//This place to specifically explain, if there is a cat source file on the E disk, the relevant configuration file should be placed in the e:/ data/appdatas/cat/below



Other operating modes:
command to enter the Cat-home directory under Cat
Execute command
mvn jetty:run, start cat service


After success, the browser opens Http://localhost:2281/cat to see the Cat monitoring interface
or enter MVN Eclipse:clean eclipse:eclipse in the Cat directory and import the project into Eclipse and run the Cat-home project with ' Com.dianping.cat.TestServer ' to start cat.

Cat Monitoring Platform Environment setup

Exception resolution:

To follow the requirements of the Readme, compile the war with jdk1.8 below. Otherwise, there is the following error:

[ERROR] [Servletholder] Servlet initializing failed. Org.unidal.lookup.LookupException:Component (org.unidal.web.lifecycle.RequestLifecycle) lookup failure. Details:unable to Lookup component ' org.unidal.web.lifecycle.RequestLifecycle ', it could isn't be started.

Role:org.unidal.web.lifecycle.RequestLifecycle
Rolehint:mvc

MAVEN uses a different JDK environment than I compiled, and MAVEN relies on Javahome

http://www.oschina.net/question/1463652_2152237

To change the Tomcat JDK:

After testing, changing the Catalina.bat settings can also

@echo offset Java_home=c:\program files\java\jdk1. 7 . 0_13set jre_home=c:\program files\java\jre7

1、windows下: 修改 tomcat /bin/setclasspath .bat rem Otherwise either JRE or JDK are fine 之前加上 set JAVA_HOME = C:\....   jdk路径 set JRE_HOME = C:\....\jre  Jre路径 2、linux环境下 修改tomcat /bin/setclasspath .sh # First clear out the user classpath CLASSPATH= 下面添加上 export JAVA_HOME= /home/tool/jdk1 .6.0_18  --jdk路径 export JRE_HOME= /home/tool/jdk1 .6.0_18 /jre --jre路径 保存,重新启动tomcat

Cat Monitoring Platform Environment setup

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.