Skip to content

Commit f4c13b9

Browse files
committed
2 parents a8c2207 + f374479 commit f4c13b9

File tree

5 files changed

+94
-0
lines changed

5 files changed

+94
-0
lines changed

docs/build-yc-agent-alpine.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Build yCrash agent in Alpine
2+
3+
Coming Soon...

docs/build-yc-agent-centos.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Build yCrash agent in CentOS
2+
3+
Coming Soon...

docs/build-yc-agent-linux.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Build yCrash agent in Linux
2+
3+
1. [Ubuntu](https://github.com/ycrash/ycrash-agent/blob/main/docs/build-yc-agent-ubuntu.md)
4+
2. [CentOS](https://github.com/ycrash/ycrash-agent/blob/main/docs/build-yc-agent-centos.md)
5+
3. [Alpine](https://github.com/ycrash/ycrash-agent/blob/main/docs/build-yc-agent-alpine.md)
6+

docs/build-yc-agent-macos.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Build yCrash agent in MacOS
2+
3+
### Prerequisite
4+
1. Install Go
5+
6+
### Steps to build yCrash agent
7+
8+
1. Clone the ycrash-agent repository in your MacOS machine.
9+
2. Go to ```ycrash-agent/yc``` directory and execute the below command to compile and build yCrash agent.
10+
11+
```
12+
go build
13+
```
14+
3. Once the build is completed, you will find ```yc.sh``` file under ```ycrash-agent/yc``` directory.
15+
16+
You can find different yCrash agent arguments in the [official documentation](https://docs.ycrash.io/ycrash-agent/all-agent-arguments.html#all-arguments).

docs/build-yc-agent-ubuntu.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Build yCrash agent in Ubuntu
2+
3+
Please follow the below steps to compile and build yCrash agent in Ubuntu.
4+
5+
1. Install the below packages
6+
7+
```
8+
apt update \
9+
&& apt install -y \
10+
curl \
11+
gcc \
12+
make \
13+
git \
14+
wget \
15+
vim \
16+
&& apt clean \
17+
&& apt autoremove -y \
18+
&& rm -rf /var/lib/apt/lists/*
19+
```
20+
2. Create a new directory ```/opt/workspace/go``` to install Go.
21+
22+
```
23+
mkdir -p /opt/workspace/go
24+
```
25+
3. Download the Go and set the path
26+
27+
```
28+
cd /opt/workspace/go
29+
30+
curl -LSs https://dl.google.com/go/go1.16.4.linux-amd64.tar.gz -o go.tar.gz \
31+
&& tar -xvf go.tar.gz \
32+
&& rm -v go.tar.gz \
33+
&& mv go /usr/local \
34+
&& rm -rf /var/lib/apt/lists/*
35+
36+
PATH=${PATH}:/usr/local/go/bin
37+
```
38+
4. Download and install ```musl``` package.
39+
40+
```
41+
curl -LSs https://www.musl-libc.org/releases/musl-1.2.2.tar.gz -o musl-1.2.2.tar.gz \
42+
&& tar -xvf musl-1.2.2.tar.gz \
43+
&& cd musl-1.2.2 \
44+
&& ./configure \
45+
&& make \
46+
&& make install \
47+
&& cd .. \
48+
&& rm -rf musl*
49+
50+
CC=/usr/local/musl/bin/musl-gcc
51+
```
52+
5. Create a new directory for yCrash agent and clone the project.
53+
54+
```
55+
mkdir yc-agent-repo
56+
57+
git clone https://github.com/ycrash/ycrash-agent.git
58+
```
59+
7. Go to ```/opt/workspace/yc-agent-repo/ycrash-agent/yc``` directory and run the below command command to compile and build the yCrash agent
60+
61+
```
62+
go build -a -ldflags "-linkmode external -extldflags '-static' -s -w"
63+
```
64+
9. Once the build is completed, you will find ```yc.sh``` file inside ```/opt/workspace/yc-agent-repo/ycrash-agent/yc``` directory.
65+
66+
You can find different yCrash agent arguments in the [official documentation](https://docs.ycrash.io/ycrash-agent/all-agent-arguments.html#all-arguments).

0 commit comments

Comments
 (0)