-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL
69 lines (48 loc) · 1.16 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
Installation Guide
==================
1. Clone trafficserver's repository
```
$ git clone https://github.com/apache/trafficserver.git
```
2. Build and install trafficserver with atscppapi
How to build trafficserver, see the documents in its repository.
```
$ cd trafficserver
$ autoreconf -if
$ ./configure --enable-cppapi
$ make
$ make install
```
3. Clone mruby's repository
```
$ git clone https://github.com/mruby/mruby.git
```
4. (Optional) If you want to use mruby extentions in mrbgems, write build_config.rb as you wish
```
# in the ts_mruby root directory
$ vim build_config.rb
```
5. Configure for ts_mruby
```
$ autoreconf -if
$ ./configure --with-ts-prefix-root=/path/to/trafficserver/ --with-mruby-root=/path/to/mruby/
```
6. Build libmruby.a which is the static library of mruby
```
$ make build_mruby
```
7. Prepare ts_mruby.so
```
$ make
$ make install
```
8. Prepare mruby script
9. Configure plugin.config to load ts_mruby.so and your mruby script
```
$ vim /path/to/prefix/etc/trafficserver/plugin.config
# you should append below the line to the bottom of this file.
---
ts_mruby.so /path/to/script.rb
---
```
10. Run trafficserver and enjoy. :)