提交 7ca1dd18 编写于 作者: H heyanlong

mv agent

上级 e3e0fbd4
#!/bin/bash
GOOS=darwin GOARCH=amd64 go build -o sky-php-agent-darwin-x64 agent/cmd/main.go
GOOS=darwin GOARCH=386 go build -o sky-php-agent-darwin-x86 agent/cmd/main.go
GOOS=linux GOARCH=amd64 go build -o sky-php-agent-linux-x64 agent/cmd/main.go
GOOS=linux GOARCH=386 go build -o sky-php-agent-linux-x86 agent/cmd/main.go
GOOS=linux GOARCH=arm go build -o sky-php-agent-linux-arm86 agent/cmd/main.go
GOOS=linux GOARCH=arm64 go build -o sky-php-agent-linux-arm64 agent/cmd/main.go
......@@ -2,4 +2,4 @@
* Quick Start
* [Quick start](quick-start.md)
* [Install php agent](install-agent.md)
* [Install agent](install-agent.md)
When building directly from Git sources or after custom modifications you might also need:
* php 7+
* golang 1.13
* SkyWalking Collector
......@@ -7,25 +8,30 @@ When building directly from Git sources or after custom modifications you might
You can run the following command to install the SkyWalking PHP Agent in your computer.
```shell
// install php extension
## Install PHP Extension
```shell script
git clone https://github.com/SkyAPM/SkyAPM-php-sdk.git
cd SkyAPM-php-sdk
phpize && ./configure && make && make install
```
## Install sky-php-agent (download or build)
### Download sky-php-agent
Go to [release](https://github.com/SkyAPM/SkyAPM-php-sdk/releases) page to download the sky-php-agent required by your platform. Currently there are Linux (amd64, arm64) and Mac versions.
// download sky-php-agent
// e.g. 3.2.0
wget https://github.com/SkyAPM/SkyAPM-php-sdk/releases/download/3.2.0/sky-php-agent-linux-x64
mv sky-php-agent-linux-x64 sky-php-agent
### Build
```shell script
cd SkyAPM-php-sdk
go build -o sky-php-agent agent/cmd/main.go
chmod +x sky-php-agent
cp sky-php-agent /usr/bin
```
# How to use
## How to use
php.ini
### Add skywalking config to php.ini and restart php-fpm
```shell
```shell script
; Loading extensions in PHP
extension=skywalking.so
......@@ -39,15 +45,11 @@ skywalking.version = 6
skywalking.app_code = MyProjectName
```
Run `sky-php-agent` to send PHP generated log information to `SkyWalking collector`
```shell
### Run `sky-php-agent` to send PHP generated log information to `SkyWalking collector`
```shell script
// sky-php-agent [collector grpc address]
// e.g.
sky-php-agent --grpc 127.0.0.1:11800
```
Show help
```bash
sky-php-agent -h
```
\ No newline at end of file
### ⚠️⚠️⚠️ Warning *Make sure PHP has read and write permissions on the socks file*
\ No newline at end of file
# todo
See [Install php agent](install-agent.md)
\ No newline at end of file
See [Install agent](install-agent.md)
\ No newline at end of file
#!/bin/bash
GOOS=darwin GOARCH=amd64 go build -o sky-php-agent-darwin-x64 .
GOOS=darwin GOARCH=386 go build -o sky-php-agent-darwin-x86 .
GOOS=linux GOARCH=amd64 go build -o sky-php-agent-linux-x64 .
GOOS=linux GOARCH=386 go build -o sky-php-agent-linux-x86 .
GOOS=linux GOARCH=arm go build -o sky-php-agent-linux-arm86 .
GOOS=linux GOARCH=arm64 go build -o sky-php-agent-linux-arm64 .
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册