-
Notifications
You must be signed in to change notification settings - Fork 0
Install
Ryo Okubo edited this page Nov 30, 2016
·
2 revisions
I privide 3 cases of installation way.
$ git clone https://github.com/apache/trafficserver.git
How to build trafficserver, see the documents in its repository.
$ cd trafficserver
$ autoreconf -if
# If you use trafficserver-7.0.0+, remove '--enable-cppapi' option.
$ ./configure --enable-cppapi
$ make
$ make install
$ git clone https://github.com/syucream/ts_mruby.git
$ git submodule init
$ git submodule update
# in the ts_mruby root directory
$ vim build_config.rb
$ autoreconf -if
$ ./configure --with-ts-prefix-root=/path/to/trafficserver/
$ make build_mruby
$ make
$ make install
$ 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
---
- Example docker image has already published to Docker Hub. The image contains a test script(simply responds by ATS::echo), so you can test ts_mruby quickly:
$ docker pull syucream/ts_mruby
$ docker run docker run -it syucream/ts_mruby /bin/bash
root@ad7a82be8a65:/opt# trafficserver start
root@ad7a82be8a65:/opt# curl http://localhost:8080/
ts_mruby test
$ brew install https://raw.githubusercontent.com/syucream/ts_mruby/master/Formula/trafficserver-atscppapi.rb
$ brew install --HEAD https://raw.githubusercontent.com/syucream/ts_mruby/master/Formula/ts_mruby.rb