一、系統環境
服務端
CentOS-7.3.1611 + jdk1.8.0_144 + Tomcat-8.5.30 + jprofiler_linux_10_1_2.rpm
客戶端
Win10 + jprofiler_windows-x64_10_1_2.exe
二、安裝部署
服務端安裝jprofiler10
rpm -ivh jprofiler_linux_10_1_2.rpm
安裝完成後目錄在/opt/jprofiler10/
配置環境變量
export LD_LIBRARY_PATH=:/opt/jprofiler10/bin/linux-x64
source /etc/profile 即刻生效變量
修改Tomcat catalina.sh,增加如下配置
CATALINA_OPTS="$CATALINA_OPTS $JPDA_OPTS -agentpath:/opt/jprofiler10/bin/linux-x64/libjprofilerti.so=port=8849,nowait"
啓動tomcat,netstat -ntl看到8849端口已經在監聽,說明服務端啓動成功
客戶端安裝jprofiler_windows-x64_10_1_2.exe
雙擊jprofiler_windows-x64_10_1_2.exe,按照提示逐步安裝,安裝完成後登入下面網站申請license
https://www.ej-technologies.com/download/jprofiler/trial/enter
三、客戶端連接服務端
打開軟件Start Center -> New Session -> New Remote Integration
選擇On a remote computer 下拉框選擇Linux X86/AMD64,點擊下一步
選擇JVM版本,下拉選擇Oracle和1.8.0,點擊下一步
選擇Wait for a connection from the JProfiler GUI,點擊下一步
輸入遠程服務端IP,點擊下一步
輸入遠程服務端安裝路徑,默認爲/opt/jrpofiler10,點擊下一步
默認端口爲8849,點擊下一步
確認配置,如果沒問題點擊下一步
選擇start the session and wait for the remote application,點擊完成
出現如下監控圖,說明連接成功