summaryrefslogtreecommitdiff
path: root/BUILD
diff options
context:
space:
mode:
authorIqram Mahmud <58055538+iqr4m@users.noreply.github.com>2019-11-22 10:36:14 -0800
committerdormando <dormando@rydia.net>2020-01-13 17:35:21 -0800
commit3b903699838c4cc9792d31dbe9c00d025340a0b4 (patch)
treea1d8b4804052c71594056a5b1772750976305ed0 /BUILD
parent4827237692d93986702cff051f03c19c2e318c80 (diff)
downloadmemcached-3b903699838c4cc9792d31dbe9c00d025340a0b4.tar.gz
Update the build documentation in BUILD file
The current instruction is 17 years old. memcached in the meantime moved to automake and has an easier way to locally build and locally test a new binary.
Diffstat (limited to 'BUILD')
-rw-r--r--BUILD47
1 files changed, 17 insertions, 30 deletions
diff --git a/BUILD b/BUILD
index d6ca4c4..8f84356 100644
--- a/BUILD
+++ b/BUILD
@@ -1,37 +1,24 @@
-Ideally, you want to make a static binary, otherwise the dynamic
-linker pollutes your address space with shared libs right in the
-middle. (NOTE: actually, this shouldn't matter so much anymore, now
-that we only allocate huge, fixed-size slabs)
+To build memcached in your machine from local repo you will have to install
+autotools, automake and libevent. In a debian based system that will look
+like this
-Make sure your libevent has epoll (Linux) or kqueue (BSD) support.
-Using poll or select only is slow, and works for testing, but
-shouldn't be used for high-traffic memcache installations.
+sudo apt-get install autotools-dev
+sudo apt-get install automake
+sudo apt-get install libevent-dev
-To build libevent with epoll on Linux, you need two things. First,
-you need /usr/include/sys/epoll.h . To get it, you can install the
-userspace epoll library, epoll-lib. The link to the latest version
-is buried inside
-http://www.xmailserver.org/linux-patches/nio-improve.html ; currently
-it's http://www.xmailserver.org/linux-patches/epoll-lib-0.9.tar.gz .
-If you're having any trouble building/installing it, you can just copy
-epoll.h from that tarball to /usr/include/sys as that's the only thing
-from there that libevent really needs.
+After that you can build memcached binary using automake
-Secondly, you need to declare syscall numbers of epoll syscalls, so
-libevent can use them. Put these declarations somewhere
-inside <sys/epoll.h>:
+cd memcached
+./autogen.sh
+./configure
+make test
+make
-#define __NR_epoll_create 254
-#define __NR_epoll_ctl 255
-#define __NR_epoll_wait 256
-
-After this you should be able to build libevent with epoll support.
-Once you build/install libevent, you don't need <sys/epoll.h> to
-compile memcache or link it against libevent. Don't forget that for epoll
-support to actually work at runtime you need to use a kernel with epoll
-support patch applied, as explained in the README file.
-
-BSD users are luckier, and will get kqueue support by default.
+It should create the binary in the same folder, which you can run
+./memcached
+You can telnet into that memcached to ensure it is up and running
+telnet 127.0.0.1 11211
+stats