服务器环境: 64位centos7, jdk1.8
Linux服务器安装
上传到/opt目录下并解压.
本地安装
参考网上的教程即可
配置
服务端配置
修改/etc/profile文件, 添加:
export INSTALL4J_JAVA_HOME=/steve/java/jdk8/jre #jre安装目录
export LD_LIBRARY_PATH=/opt/jprofiler11.1.3/bin/linux-x64 #jprofiler的目录
退出并source.
2. 启动测试
进入/opt/jprofiler11.1.3/bin目录, 运行: jpenable
# cd /opt/jprofiler11.1.3/bin
# jpenable
出现这个说明已经成功了, 输入后面的编号就代表需要监控的Java程序. 之后输入端口, 在阿里云的安全组中一定要打开这个端口.
[root@nengkerui bin]# jpenable
Select a JVM:
本地配置
参考引用的地址就好, 特别注意一点:
1. 一定要将本地的jprofiler_config.xml上传到服务器jprofiler安装目录.
2. springboot启动命令后面添加-agentpath:/opt/jprofiler11.1.3\bin\windows-x64\jprofilerti.dll=port=<前面输入的端口>,nowait
3. 在项目启动之后才可以在本地打开jprofiler进行连接.