2021-12-22 19:39:15 +00:00
|
|
|
|
|
|
|
|
|
|
|
#############################################
|
|
|
|
kawipiko -- blazingly fast static HTTP server
|
|
|
|
#############################################
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Installation
|
|
|
|
============
|
|
|
|
|
|
|
|
.. contents::
|
|
|
|
:depth: 2
|
|
|
|
:local:
|
|
|
|
:backlinks: none
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-12-23 17:50:15 +00:00
|
|
|
--------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-12-22 19:39:15 +00:00
|
|
|
Download prebuilt executables
|
|
|
|
-----------------------------
|
|
|
|
|
2021-12-22 20:56:39 +00:00
|
|
|
|
2021-12-23 19:10:19 +00:00
|
|
|
See the `releases page on GitHub <https://github.com/volution/kawipiko/releases>`__.
|
2021-12-22 19:39:15 +00:00
|
|
|
|
2021-12-23 19:10:19 +00:00
|
|
|
As a shortcut, the following are the self-contained and statically linked
|
|
|
|
all-in-one server and archiver executables
|
|
|
|
(for x86_64 / amd64 processors):
|
2021-12-22 20:56:39 +00:00
|
|
|
|
2021-12-23 19:10:19 +00:00
|
|
|
* `<https://github.com/volution/kawipiko/releases/download/preview/kawipiko--linux>`__
|
|
|
|
* `<https://github.com/volution/kawipiko/releases/download/preview/kawipiko--freebsd>`__
|
|
|
|
* `<https://github.com/volution/kawipiko/releases/download/preview/kawipiko--openbsd>`__
|
|
|
|
* `<https://github.com/volution/kawipiko/releases/download/preview/kawipiko--darwin>`__
|
|
|
|
|
|
|
|
|
|
|
|
For example, assuming one wants the ``preview`` version,
|
|
|
|
one can run the following commands: ::
|
|
|
|
|
|
|
|
curl \
|
|
|
|
-s -S -f -L \
|
|
|
|
-o /tmp/kawipiko-server \
|
|
|
|
https://github.com/volution/kawipiko/releases/download/preview/kawipiko-server--linux \
|
|
|
|
#
|
|
|
|
|
|
|
|
curl \
|
|
|
|
-s -S -f -L \
|
|
|
|
-o /tmp/kawipiko-archiver \
|
|
|
|
https://github.com/volution/kawipiko/releases/download/preview/kawipiko-archiver--linux \
|
|
|
|
#
|
|
|
|
|
|
|
|
curl \
|
|
|
|
-s -S -f -L \
|
|
|
|
-o /tmp/kawipiko \
|
|
|
|
https://github.com/volution/kawipiko/releases/download/preview/kawipiko--linux \
|
|
|
|
#
|
|
|
|
|
|
|
|
chmod a=rx /tmp/kawipiko-server
|
|
|
|
chmod a=rx /tmp/kawipiko-archiver
|
|
|
|
chmod a=rx /tmp/kawipiko
|
|
|
|
|
|
|
|
|
|
|
|
One can replace ``preview`` with ``v0.x.y`` (see the releases page).
|
|
|
|
|
|
|
|
|
|
|
|
One can replace ``linux`` with ``freebsd``, ``openbsd`` or ``darwin``.
|
2021-12-22 19:39:15 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-12-23 17:50:15 +00:00
|
|
|
--------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-12-22 19:39:15 +00:00
|
|
|
Build from sources
|
|
|
|
------------------
|
|
|
|
|
|
|
|
|
2021-12-22 20:56:39 +00:00
|
|
|
|
|
|
|
|
2021-12-22 19:39:15 +00:00
|
|
|
Install the prerequisites
|
|
|
|
.........................
|
|
|
|
|
2021-12-22 20:56:39 +00:00
|
|
|
|
2021-12-22 19:39:15 +00:00
|
|
|
* Ubuntu / Debian: ::
|
|
|
|
|
|
|
|
apt-get install git-core
|
|
|
|
apt-get install golang
|
|
|
|
|
2021-12-22 20:56:39 +00:00
|
|
|
|
2021-12-22 19:39:15 +00:00
|
|
|
* OpenSUSE: ::
|
|
|
|
|
|
|
|
zypper install git-core
|
|
|
|
zypper install go
|
|
|
|
|
2021-12-22 20:56:39 +00:00
|
|
|
|
2021-12-22 19:39:15 +00:00
|
|
|
* other Linux / FreeBSD / OpenBSD / OSX:
|
|
|
|
|
2021-12-23 19:10:19 +00:00
|
|
|
* fetch and install Go from `<https://golang.org/dl>`__;
|
2021-12-22 19:39:15 +00:00
|
|
|
* add ``/usr/local/go/bin`` to your ``PATH``;
|
|
|
|
* install Git;
|
|
|
|
|
|
|
|
|
2021-12-22 20:56:39 +00:00
|
|
|
|
|
|
|
|
2021-12-22 19:39:15 +00:00
|
|
|
Prepare the environment
|
|
|
|
.......................
|
|
|
|
|
2021-12-22 20:56:39 +00:00
|
|
|
|
2021-12-22 19:39:15 +00:00
|
|
|
::
|
|
|
|
|
|
|
|
mkdir -- \
|
|
|
|
/tmp/kawipiko \
|
|
|
|
/tmp/kawipiko/bin \
|
|
|
|
/tmp/kawipiko/src \
|
|
|
|
/tmp/kawipiko/go \
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2021-12-22 20:56:39 +00:00
|
|
|
|
|
|
|
|
2021-12-22 19:39:15 +00:00
|
|
|
Fetch the sources
|
|
|
|
.................
|
|
|
|
|
2021-12-22 20:56:39 +00:00
|
|
|
|
2021-12-22 19:39:15 +00:00
|
|
|
Either clone the full Git repository: ::
|
|
|
|
|
|
|
|
git clone \
|
|
|
|
-b development \
|
|
|
|
git://github.com/volution/kawipiko.git \
|
|
|
|
/tmp/kawipiko/src \
|
|
|
|
#
|
|
|
|
|
2021-12-22 20:56:39 +00:00
|
|
|
|
2021-12-22 19:39:15 +00:00
|
|
|
Either fetch and extract the latest sources bundle: ::
|
|
|
|
|
|
|
|
curl \
|
|
|
|
-s -S -f \
|
|
|
|
-o /tmp/kawipiko/src.tar.gz \
|
|
|
|
https://codeload.github.com/volution/kawipiko/tar.gz/development \
|
|
|
|
#
|
|
|
|
|
|
|
|
tar \
|
|
|
|
-x -z -v \
|
|
|
|
-f /tmp/kawipiko/src.tar.gz \
|
|
|
|
-C /tmp/kawipiko/src \
|
|
|
|
--strip-components 1 \
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2021-12-22 20:56:39 +00:00
|
|
|
|
|
|
|
|
2021-12-22 19:39:15 +00:00
|
|
|
Build the dynamic executables
|
|
|
|
.............................
|
|
|
|
|
2021-12-22 20:56:39 +00:00
|
|
|
|
2021-12-22 19:39:15 +00:00
|
|
|
Compile the (dynamic) executables: ::
|
|
|
|
|
|
|
|
cd /tmp/kawipiko/src/sources
|
|
|
|
|
2021-12-23 19:10:19 +00:00
|
|
|
#### build `kawipiko` all-in-one dynamic executable
|
2021-12-22 19:39:15 +00:00
|
|
|
env \
|
|
|
|
GOPATH=/tmp/kawipiko/go \
|
|
|
|
go build \
|
|
|
|
-gcflags 'all=-l=4' \
|
2021-12-22 20:56:39 +00:00
|
|
|
-ldflags 'all=-s' \
|
|
|
|
-trimpath \
|
2021-12-22 19:39:15 +00:00
|
|
|
-o /tmp/kawipiko/bin/kawipiko \
|
|
|
|
./cmd/wrapper.go \
|
|
|
|
#
|
|
|
|
|
|
|
|
#### build `kawipiko-server` dynamic executable
|
|
|
|
env \
|
|
|
|
GOPATH=/tmp/kawipiko/go \
|
|
|
|
go build \
|
|
|
|
-gcflags 'all=-l=4' \
|
2021-12-22 20:56:39 +00:00
|
|
|
-ldflags 'all=-s' \
|
|
|
|
-trimpath \
|
2021-12-22 19:39:15 +00:00
|
|
|
-o /tmp/kawipiko/bin/kawipiko-server \
|
|
|
|
./cmd/server.go \
|
|
|
|
#
|
|
|
|
|
|
|
|
#### build `kawipiko-archiver` dynamic executable
|
|
|
|
env \
|
|
|
|
GOPATH=/tmp/kawipiko/go \
|
|
|
|
go build \
|
|
|
|
-gcflags 'all=-l=4' \
|
2021-12-22 20:56:39 +00:00
|
|
|
-ldflags 'all=-s' \
|
|
|
|
-trimpath \
|
2021-12-22 19:39:15 +00:00
|
|
|
-o /tmp/kawipiko/bin/kawipiko-archiver \
|
|
|
|
./cmd/archiver.go \
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2021-12-22 20:56:39 +00:00
|
|
|
|
|
|
|
|
2021-12-22 19:39:15 +00:00
|
|
|
Build the static executables
|
|
|
|
............................
|
|
|
|
|
2021-12-22 20:56:39 +00:00
|
|
|
|
2021-12-22 19:39:15 +00:00
|
|
|
Compile the (static) executables: ::
|
|
|
|
|
|
|
|
cd /tmp/kawipiko/src/sources
|
|
|
|
|
2021-12-23 19:10:19 +00:00
|
|
|
#### build `kawipiko` all-in-one static executable
|
2021-12-22 19:39:15 +00:00
|
|
|
env \
|
|
|
|
GOPATH=/tmp/kawipiko/go \
|
|
|
|
go build \
|
|
|
|
-tags 'netgo' \
|
|
|
|
-gcflags 'all=-l=4' \
|
|
|
|
-ldflags 'all=-s' \
|
|
|
|
-trimpath \
|
|
|
|
-o /tmp/kawipiko/bin/kawipiko \
|
|
|
|
./cmd/wrapper.go \
|
|
|
|
#
|
|
|
|
|
|
|
|
#### build `kawipiko-server` static executable
|
|
|
|
env \
|
|
|
|
GOPATH=/tmp/kawipiko/go \
|
|
|
|
go build \
|
|
|
|
-tags 'netgo' \
|
|
|
|
-gcflags 'all=-l=4' \
|
|
|
|
-ldflags 'all=-s' \
|
|
|
|
-trimpath \
|
|
|
|
-o /tmp/kawipiko/bin/kawipiko-server \
|
|
|
|
./cmd/server.go \
|
|
|
|
#
|
|
|
|
|
|
|
|
#### build `kawipiko-archiver` static executable
|
|
|
|
env \
|
|
|
|
GOPATH=/tmp/kawipiko/go \
|
|
|
|
go build \
|
|
|
|
-tags 'netgo' \
|
|
|
|
-gcflags 'all=-l=4' \
|
|
|
|
-ldflags 'all=-s' \
|
|
|
|
-trimpath \
|
2021-12-22 20:56:39 +00:00
|
|
|
-o /tmp/kawipiko/bin/kawipiko-archiver \
|
2021-12-22 19:39:15 +00:00
|
|
|
./cmd/archiver.go \
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2021-12-22 20:56:39 +00:00
|
|
|
|
|
|
|
|
2021-12-22 19:39:15 +00:00
|
|
|
Deploy the executables
|
|
|
|
......................
|
|
|
|
|
|
|
|
|
2021-12-22 20:56:39 +00:00
|
|
|
Just copy the two executables anywhere on the system, or any compatible remote system: ::
|
2021-12-22 19:39:15 +00:00
|
|
|
|
|
|
|
cp \
|
|
|
|
-t /usr/local/bin \
|
|
|
|
/tmp/kawipiko/bin/kawipiko-server \
|
|
|
|
/tmp/kawipiko/bin/kawipiko-archiver \
|
|
|
|
#
|
|
|
|
|