Webdis on Fedora

February 1, 2013

I have a fedora machine that has redis installed, and I wanted to install webdis. The instructions for webdis are:

  • get source
  • run make
  • ./webdis &

This didn't work for me:

[drumcoder@drumcoder webdis]$ make
cc -c -O0 -ggdb -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o webdis.o webdis.c
In file included from webdis.c:1:0:
server.h:4:19: fatal error: event.h: No such file or directory
compilation terminated.
make: *** [webdis.o] Error 1

Turns out I needed to install libevent-devel:

[root@drumcoder webdis]# yum install libevent-devel
Loaded plugins: langpacks, presto, refresh-packagekit
Adding en_US to language list
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package libevent-devel.x86_64 0:1.4.14b-1.fc14 set to be installed
--> Finished Dependency Resolution

Dependencies Resolved

Package               Arch          Version                Repository     Size
libevent-devel        x86_64        1.4.14b-1.fc14         fedora        230 k

Transaction Summary
Install       1 Package(s)

Total download size: 230 k
Installed size: 1.1 M
Is this ok [y/N]: y
Downloading Packages:
Setting up and reading Presto delta metadata
Processing delta metadata
Package(s) data still to download: 230 k
libevent-devel-1.4.14b-1.fc14.x86_64.rpm                 | 230 kB     00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : libevent-devel-1.4.14b-1.fc14.x86_64                     1/1

  libevent-devel.x86_64 0:1.4.14b-1.fc14


Now make works fine:

[drumcoder@drumcoder webdis]$ make
cc -c -O0 -ggdb -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o webdis.o webdis.c
cc -c -O0 -ggdb -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o cmd.o cmd.c
cc -c -O0 -ggdb -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o worker.o worker.c
cc -c -O0 -ggdb -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o slog.o slog.c
cc -c -O0 -ggdb -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o server.o server.c
cc -c -O0 -ggdb -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o libb64/cencode.o libb64/cencode.c
cc -c -O0 -ggdb -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o acl.o acl.c
cc -c -O0 -ggdb -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o md5/md5.o md5/md5.c
cc -c -O0 -ggdb -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o sha1/sha1.o sha1/sha1.c
cc -c -O0 -ggdb -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o http.o http.c
cc -c -O0 -ggdb -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o client.o client.c
cc -c -O0 -ggdb -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o websocket.o websocket.c
cc -c -O0 -ggdb -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o pool.o pool.c
cc -c -O0 -ggdb -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o conf.o conf.c
cc -c -O0 -ggdb -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o formats/json.o formats/json.c
cc -c -O0 -ggdb -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o formats/raw.o formats/raw.c
cc -c -O0 -ggdb -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o formats/common.o formats/common.c
cc -c -O0 -ggdb -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o formats/custom-type.o formats/custom-type.c
cc -c -O0 -ggdb -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o hiredis/hiredis.o hiredis/hiredis.c
cc -c -O0 -ggdb -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o hiredis/sds.o hiredis/sds.c
cc -c -O0 -ggdb -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o hiredis/net.o hiredis/net.c
cc -c -O0 -ggdb -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o hiredis/async.o hiredis/async.c
cc -c -O0 -ggdb -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o jansson/src/dump.o jansson/src/dump.c
cc -c -O0 -ggdb -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o jansson/src/error.o jansson/src/error.c
cc -c -O0 -ggdb -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o jansson/src/hashtable.o jansson/src/hashtable.c
cc -c -O0 -ggdb -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o jansson/src/load.o jansson/src/load.c
cc -c -O0 -ggdb -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o jansson/src/strbuffer.o jansson/src/strbuffer.c
cc -c -O0 -ggdb -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o jansson/src/utf.o jansson/src/utf.c
cc -c -O0 -ggdb -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o jansson/src/value.o jansson/src/value.c
cc -c -O0 -ggdb -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o jansson/src/variadic.o jansson/src/variadic.c
cc -c -O0 -ggdb -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o http-parser/http_parser.o http-parser/http_parser.c
cc -o webdis webdis.o cmd.o worker.o slog.o server.o libb64/cencode.o acl.o md5/md5.o sha1/sha1.o http.o client.o wbsocket.o pool.o conf.o formats/json.o formats/raw.o formats/common.o formats/custom-type.o hiredis/hiredis.o hiredis/sds.o hiredis/net.o hiredis/async.o jansson/src/dump.o jansson/src/error.o jansson/src/hashtable.o jansson/src/load.o jansson/src/strbuffer.o jansson/src/utf.o jansson/src/value.o jansson/src/variadic.o http-parser/http_parser.o -levent -pthread

[drumcoder@drumcoder webdis]$ ./webdis &
[1] 23153

Using Webdis

http://localhost:7379/LIST/* lists all keys in Redis.

{"KEYS": {"KEYS":["key2","key","key1"]}

http://localhost:7379/GET/key returns the value of a key.


http://localhost:7379/DEL/key deletes a key


Tags: webdis redis