From a1228f6e3c0810b83f2aeb99cbb482a34da6592b Mon Sep 17 00:00:00 2001 From: LHearen Date: Tue, 18 Sep 2018 14:09:10 +0800 Subject: [PATCH] installation_in --- site/src/site/sphinx/en/install-detail.md | 93 +++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 site/src/site/sphinx/en/install-detail.md diff --git a/site/src/site/sphinx/en/install-detail.md b/site/src/site/sphinx/en/install-detail.md new file mode 100644 index 000000000..a87ff808a --- /dev/null +++ b/site/src/site/sphinx/en/install-detail.md @@ -0,0 +1,93 @@ +Arthas Install +============== + +## Linux/Unix/Mac + +You can install Arthas in one single line as: + +```bash +curl -L https://alibaba.github.io/arthas/install.sh | sh +``` + +The command line above will download the booting script `as.sh` to the current directory and you can then start Arthas by `./as.sh`, for more help info you can use `./as.sh -h` to check the details. + +By the way, you can also add the absolute path of the script `as.sh` to `$PATH` to make it available globally. + +## Windows + +Latest Version: [![Arthas](https://img.shields.io/maven-central/v/com.taobao.arthas/arthas-packaging.svg?style=flat-square "Arthas")](http://search.maven.org/classic/#search%7Cga%7C1%7Cg%3A%22com.taobao.arthas%22%20AND%20a%3A%22arthas-packaging%22) + +Download the latest `bin.zip`, unzip the package and you can find the `as.bat`. For now this script will only take one argument `pid` which means you can only diagnose the local Java process. (Welcome any bat script expert to make it better :heart:) + +```bash +as.bat +``` + +A small tip: + +If you are asking for better UX, you can start the Arthas Server locally by `as.bat ` and then use `./as.sh @:`in another Linux/Unix/Mac machine. + + +Another tip: + +If in Windows, the color is not working as expect. You can try [conemu](https://sourceforge.net/projects/conemu) to get it to work. + +## Manual Installation + +[Manual Installation](manual-install.md) + +## Advanced Manual Boot + +If you cannot boot Arthas, try to pass in all the critical options manually as the following steps: + +### 1. locate the java for JVM: +- Linux/Unix/Mac: `ps aux | grep java` +- Windows: open the Process Monitor to search java + +### 2. Concatenate the command +Let's suppose we are using `/opt/jdk1.8/bin/java`, then the command should be: + +```bash + /opt/jdk1.8/bin/java -Xbootclasspath/a:/opt/jdk1.8/lib/tools.jar \ + -jar /tmp/arthas-packaging/arthas-core.jar \ + -pid 15146 \ + -target-ip 127.0.0.1 -telnet-port 3658 -http-port 8563 \ + -core /tmp/arthas-packaging/arthas-core.jar \ + -agent /tmp/arthas-packaging/arthas/arthas-agent.jar +``` + + * `-Xbootclasspath` add tools.jar + * `-jar /tmp/arthas-packaging/arthas-core.jar` specify main entry + * `-pid 15146` specify the target java process pid + * `-target-ip 127.0.0.1` specify the IP + * `-telnet-port 3658 -http-port 8563` specify telnet and http ports + * `-core /tmp/arthas-packaging/arthas-core.jar -agent /tmp/arthas-packaging/arthas/arthas-agent.jar` specify core/agent jar package + + +But if you are using JDK 1.9 or aboveļ¼Œthen you do not need to add `tools.jar` in option `-Xbootclasspath`. + +F.Y.I the booting log will be printed to `~/logs/arthas/arthas.log`. + +### 3. Connect via telnet + +When attached successfully, you can connect it with + +```bash +telnet localhost 3658 +``` + +## Offline Help Documentation + +Latest Version:[![Arthas](https://img.shields.io/maven-central/v/com.taobao.arthas/arthas-packaging.svg?style=flat-square "Arthas")](http://search.maven.org/classic/#search%7Cga%7C1%7Cg%3A%22com.taoba) + +## Uninstall + +### Linux/Unix/Mac + +```bash +rm -rf ~/.arthas/ ~/.arthas_history +``` + +### Windows + +Directly delete the `zip` and unzipped files.