jprofiler9.1.1 安裝與配置


一、安裝部分

安裝包:

1、jprofiler_linux_9_1_1.rpm

2、jprofiler_windows-x64_9_1_1.exe

  • 需要注意的是,Linux 和 Windows 安裝的版本號必須一致

在 Linux 安裝 jprofiler9 完成;在 Windows 安裝 jprofiler9 完成;--安裝非常容易,在網上搜索一堆

二、配置部分

1、在 Win 中打開JP

1、Follow me:

以下都是簡單對照選擇,看到什么像就選擇:

3、Application Server:

查看系統、應用等所需要的相關信息可參考 -- http://www.cnblogs.com/snooper/p/8497170.html

4、Linux X86/AMD64

 5、JVM vendor

6、一會再連接

 7、填寫所需要監控的 Linux 服務器 IP地址(這里不需要填寫端口)

 

8、 找到 JP 在 Linux 中的安裝路徑

1 [root@test1 bin]# whereis jprofiler
2 jprofiler: /usr/local/bin/jprofiler /usr/local/jprofiler9.1 /opt/jprofiler9/bin/jprofiler.vmoptions /opt/jprofiler9/bin/jprofiler /opt/jprofiler9/bin/jprofiler.jar

填寫  JP 在 Linux 中 正確的安裝路徑

 

 9、這里填寫的是項目的啟動腳本地址,也就是說,這得先將 Linux 服務器上的項目啟動腳本下載到 Windows ,然后再指定:

記下這個路徑,后面還會用到;

如下:/usr/local/tomcat/tomcat_jdt/bin/startup.sh 就是所需要的腳本文件,將其下載到 Windows ;
 
        
 1 [root@test1 ~]# cd /usr/local/tomcat/tomcat_jdt/bin/
 2 [root@test1 bin]# ll
 3 total 1952
 4 -rw-r--r--. 1 root root   26826 Jan 18  2017 bootstrap.jar
 5 -rw-r--r--. 1 root root   13007 Jan 18  2017 catalina.bat
 6 -rwxr-xr-x  1 root root   20963 Jul  6  2017 catalina.sh
 7 -rwxr-xr-x. 1 root root   20837 Jan 18  2017 catalina.sh.bak
 8 -rw-r--r--. 1 root root    1647 Jan 18  2017 catalina-tasks.xml
 9 -rw-r--r--. 1 root root   24283 Jan 18  2017 commons-daemon.jar
10 -rw-r--r--. 1 root root  204944 Jan 18  2017 commons-daemon-native.tar.gz
11 -rw-r--r--. 1 root root    2040 Jan 18  2017 configtest.bat
12 -rwxr-xr-x. 1 root root    1922 Jan 18  2017 configtest.sh
13 -rwxr-xr-x. 1 root root    7888 Jan 18  2017 daemon.sh
14 -rw-r--r--. 1 root root    2091 Jan 18  2017 digest.bat
15 -rwxr-xr-x. 1 root root    1965 Jan 18  2017 digest.sh
16 -rw-r--r--. 1 root root 1159554 Jan 18  2017 EZHTTP.zip
17 -rw-r--r--. 1 root root    3430 Jan 18  2017 setclasspath.bat
18 -rwxr-xr-x. 1 root root    3547 Jan 18  2017 setclasspath.sh
19 -rw-r--r--. 1 root root    2020 Jan 18  2017 shutdown.bat
20 -rwxr-xr-x. 1 root root    1902 Jan 18  2017 shutdown.sh
21 -rw-r--r--. 1 root root    2022 Jan 18  2017 startup.bat
22 -rwxr-xr-x  1 root root    2159 Mar 10 17:47 startup_jprofiler.sh
23 -rwxr-xr-x. 1 root root    1904 Jan 18  2017 startup.sh
24 -rw-r--r--. 1 root root   38197 Jan 18  2017 tomcat-juli.jar
25 -rw-r--r--. 1 root root  388787 Jan 18  2017 tomcat-native.tar.gz
26 -rw-r--r--. 1 root root    4021 Jan 18  2017 tool-wrapper.bat
27 -rwxr-xr-x. 1 root root    5024 Jan 18  2017 tool-wrapper.sh
28 -rw-r--r--. 1 root root    2026 Jan 18  2017 version.bat
29 -rwxr-xr-x. 1 root root    1908 Jan 18  2017 version.sh

10、默認 

 11、一會再啟動

 

 12、完成后,就會加出一項了

13、到此,配置完成;但尚未可以啟動,還得繼續:

14、打開本機 D:\jp 會看到生成了一個新的文件 startup_jprofiler.sh

15、將 startup_jprofiler.sh 上傳到 Linux 服務器的項目應用的 /usr/local/tomcat/tomcat_jdt/bin 下,並授予可執行的權限

1 [root@test1 bin]# cd /usr/local/tomcat/tomcat_jdt/bin
2 [root@test1 bin]# chmod +x startup_jprofiler.sh

16、終極配置到此完成!

17、先關閉當前項目的 Tomcat ,然后 通過上傳的腳本文件 startup_jprofiler.sh 來啟動項目

1  [root@test1 bin]# cd /usr/local/tomcat/tomcat_jdt/bin
2  [root@test1 bin]# ./shutdown.sh
3  [root@test1 bin]# ./startup_jprofiler.sh

18、在 jprofiler 點擊 Start 啟動吧

 

連接成功示例圖

 

 

  •  遇到的問題:

最容易遇到的問題是點擊 Start 啟動時,報錯:

Could not find agent library /opt/jprofiler9/bin/linux-x86/libjprofilerti.so

解決方法:

 cd /usr/local/tomcat/tomcat_jdt/bin/startup_jprofiler.sh

找到

1 ...
2 # The following lines have been added by the
3 # application server integration wizard of JProfiler
4 
5 CATALINA_OPTS="-agentpath:/opt/jprofiler9/bin/linux-x86/libjprofilerti.so=port=8849,nowait $CATALINA_OPTS"
6 export CATALINA_OPTS
7 
8 # end of modifications
9 ...

將 linux-x86 修改為 linux-x64 ,修改完成后,應為:

1 ...
2 # The following lines have been added by the
3 # application server integration wizard of JProfiler
4 
5 CATALINA_OPTS="-agentpath:/opt/jprofiler9/bin/linux-x86/libjprofilerti.so=port=8849,nowait $CATALINA_OPTS"
6 export CATALINA_OPTS
7 
8 # end of modifications
9 ...

再次連接,OK,成功。

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM