|
| 1 | +# Installation |
| 2 | + |
| 3 | +Start with Monkey is pretty easy, you don't need to be a privileged system user, you can run it locally or install it in a generic path. |
| 4 | + |
| 5 | +## Requirements |
| 6 | + |
| 7 | +Monkey uses very low CPU and Memory consumption, it works fine on any x86, x86_64 platform without problems. |
| 8 | + |
| 9 | +Regarding to the software required to run Monkey successfully, you will need a Linux environment with Kernel version 2.6.29 (at least). The server is developed on top of the Kernel features, so use an older version can cause some buggy behaviors. |
| 10 | + |
| 11 | +Besides the kernel version, the core of Monkey just requires two basic libraries: pthreads and libc, if you use Linux, we are 99% sure that you should not care about this requirement. |
| 12 | + |
| 13 | +## Download |
| 14 | + |
| 15 | +Monkey is mainly distributed in a compressed tarball which contains the full source code, the available releases can be found in the official site http://monkey-project.com. At the moment of this document is written, the 1.0.0 version is available. You can find more details in the Downloads section. |
| 16 | + |
| 17 | +## Configure and compile |
| 18 | + |
| 19 | +Once you get the tarball you can use the following simple steps to configure and compile the source code: |
| 20 | + |
| 21 | +```shell |
| 22 | +$ tar zxfv monkey-1.5.0.tar.gz |
| 23 | +$ cd monkey-1.4.0 |
| 24 | +$ ./configure |
| 25 | +$ make |
| 26 | +``` |
| 27 | + |
| 28 | +## Specific configure options |
| 29 | + |
| 30 | +Monkey uses a similar autotools scripts to configure and set the proper enviroment. Also, you can configure Monkey with your specific paths, just run './configure -h' to get a full list of the available options as: |
| 31 | + |
| 32 | +```bash |
| 33 | +$ ./configure --help |
| 34 | +Usage: ./configure [OPTION]... [VAR=VALUE]... |
| 35 | + |
| 36 | +Optional Commands: |
| 37 | + --help Display this help and exit |
| 38 | + --version Display version information and exit |
| 39 | + |
| 40 | +Compiler and debug Features: |
| 41 | + --debug Compile Monkey with debugging symbols |
| 42 | + --trace Enable trace messages (do not use in production) |
| 43 | + --no-backtrace Disable backtrace feature |
| 44 | + --linux-trace Enable Linux Trace Toolkit |
| 45 | + --musl-mode Enable musl compatibility mode |
| 46 | + --uclib-mode Enable uClib compatibility mode |
| 47 | + --malloc-libc Use system default memory allocator (default is jemalloc) |
| 48 | + --platform=PLATFORM Target platform: 'generic' or 'android' (default: generic) |
| 49 | + |
| 50 | +Shared library options: |
| 51 | + --enable-shared Build Monkey as a shared library in addition to a stand-alone server |
| 52 | + --enable-relaxed-plugins Allow the application to make the library load arbitrary plugins. |
| 53 | + WARNING security risk, do not enable in distro packages! |
| 54 | + |
| 55 | +Installation Directories: |
| 56 | + --prefix=PREFIX Root prefix directory |
| 57 | + --bindir=BINDIR Binary files (executables) |
| 58 | + --libdir=LIBDIR Libraries |
| 59 | + --incdir=INCDIR Header install path |
| 60 | + --sysconfdir=SYSCONFDIR Configuration files |
| 61 | + --datadir=DATADIR Specific Monkey data files |
| 62 | + --mandir=MANDIR Manpages - documentation |
| 63 | + --logdir=LOGDIR Log files |
| 64 | + --plugdir=PLUGDIR Plugins directory path |
| 65 | + --systemddir[=DIR] Systemd directory path |
| 66 | + --enable-plugins=a,b Enable the listed plugins |
| 67 | + --disable-plugins=a,b Disable the listed plugins |
| 68 | + --only-accept Use only accept(2) |
| 69 | + --only-accept4 Use only accept4(2) (default and preferred) |
| 70 | + --safe-free Force Monkey to free resources before exit |
| 71 | + |
| 72 | +Override Server Configuration: |
| 73 | + --default-port=PORT Override default TCP port (default: 2001) |
| 74 | + --default-user=USER Override default web user (default: nobody) |
| 75 | +``` |
| 76 | + |
| 77 | + |
| 78 | +## Running Monkey web server |
| 79 | + |
| 80 | +Monkey configuration system is designed to let run the service from the local directory without an installation process unless you specify an installation directory in the configuration step using the --prefix option. |
| 81 | + |
| 82 | +If the compilation process has ended successfully, you are ready to run Monkey Web Server executing the following command: |
| 83 | + |
| 84 | +``` |
| 85 | +$ bin/monkey |
| 86 | +``` |
| 87 | + |
| 88 | +once the server has started up, you should get something like this in your console: |
| 89 | + |
| 90 | +``` |
| 91 | +$ bin/monkey |
| 92 | +Monkey HTTP Daemon 1.5.0 |
| 93 | +Built : Apr 30 2014 22:08:39 (gcc 4.8.2) |
| 94 | +Home : http://monkey-project.com |
| 95 | +[+] Process ID is 32659 |
| 96 | +[+] Server socket listening on Port 2001 |
| 97 | +[+] 1 threads, 508 client connections per thread, total 508 |
| 98 | +[+] Transport layer by liana in http mode |
| 99 | +[+] Linux Features: TCP_FASTOPEN SO_REUSEPORT TCP_AUTOCORKING |
| 100 | +``` |
| 101 | + |
| 102 | +by default, Monkey listen for incomming connections on TCP port 2001, give it a try using your favorite web browser at http://127.0.0.1:2001 |
0 commit comments