日期:2014-05-16  浏览次数:20700 次

JProfiler安装配置(windows客户端,linux服务器端tomcat)

一、部署环境

客户端:windows xp,安装的是jprofiler_windows_5_1_4.exe

服务器端:centos,tomcat,安装的是jprofiler_linux_5_1_4.sh

JProfiler5.1.4破解码:L-Larry_Lau@163.com#83192-56yozpwn6v3n#174

?

二、安装:

1.客户端的安装

安装过程这里略去.不过安装完后,jprofiler客户端会给出一段文本提示:

Integration type: [Generic application]
Selected JVM: Sun 1.6.0 (hotspot)
Startup mode: Wait for JProfiler GUI

(1) Please insert

-agentlib:jprofilerti=port=8849  -Xbootclasspath/a:/usr/local/jprofiler5/bin/agent.jar

into the start command of your remote application right after the java command.

(2) Please add

/opt/jprofiler4/bin/linux-x64
?to the environment variable LD_LIBRARY_PATH.

A remote session named Remote application on ***。***。***。** will be created that connects to a running instance of the remote application that 

?

2.服务器端JProfiler的安装。

chmod +x jprofiler_linux_5_1_4.sh
./jprofiler_linux_5_1_4.sh -c
#开始安装

?以下是安装截图(根据提示操作,这里不做解释):

?

?

?

三.安装完毕,接下来进行配置。

#配置环境变量(如果是32位服务器,把linux-x64换成linux-x86换成)
echo export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/jprofiler5/bin/linux-x64 >>/etc/profile
#使之生效
source /etc/profile

#将jprofiler配置在tomcat启动文件中,参看下图(其中的选中部分是新增内容)
vi /usr/local/tomcat/bin/catalina.sh 

#最后一步,为了安全起见,配置防火墙,从而使8849端口只给jprofiler客户端访问。


?

用客户端连接服务器端 进行测试:

先启动tomcat(startup.sh),jprfiler服务器端将会随之启动。



?

?点击ok 即可连接服务器。

?

另外,本人原来是用jprofiler客户端 连接服务器域名 ,但是tomcat总是启动到一半就停住了,在初始化缓存的地方卡住,后来经过多次尝试,发现如果换成服务器ip ,就可以顺利启动tomcat。

?

装上后,启动tomcat,访问tomcat总是超时,但是看服务器的cpu和内存 貌似正常。难道jp对tomcat影响如此之厉害?最后索性放弃在服务器上的安装了。有遇到同样情况的同学,欢迎给我留言、探讨。