Skip to content

Commit

Permalink
Update to Redis 2.4.8
Browse files Browse the repository at this point in the history
  • Loading branch information
martijn committed Feb 27, 2012
1 parent ce221d4 commit 2d7fd6d
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 47 deletions.
9 changes: 4 additions & 5 deletions README.markdown
Expand Up @@ -14,13 +14,12 @@ Perform the following on a build box as root.

## Download Redis

cd /tmp
wget http://redis.googlecode.com/files/redis-2.2.12.tar.gz
cp redis-2.2.12.tar.gz ~/rpmbuild/SOURCES/
wget http://redis.googlecode.com/files/redis-2.4.8.tar.gz
cp redis-2.4.8.tar.gz ~/rpmbuild/SOURCES/

## Get Necessary System-specific Configs

git clone git://github.com/shamil/redis-centos.git
git clone git://github.com/bluerail/redis-centos.git
cp redis-centos/conf/* ~/rpmbuild/SOURCES/
cp redis-centos/spec/* ~/rpmbuild/SPECS/

Expand All @@ -31,7 +30,7 @@ Perform the following on a build box as root.

The resulting RPM will be:

~/rpmbuild/RPMS/x86_64/redis-2.2.12-1.x86_64.rpm
~/rpmbuild/RPMS/x86_64/redis-2.4.8-1.x86_64.rpm

## Credits

Expand Down
36 changes: 11 additions & 25 deletions conf/redis-conf.patch
@@ -1,7 +1,7 @@
diff -uNr redis-2.0.0-rc4__orig/redis.conf redis-2.0.0-rc4/redis.conf
--- redis-2.0.0-rc4__orig/redis.conf 2010-07-01 18:36:31.000000000 +0000
+++ redis-2.0.0-rc4/redis.conf 2010-08-03 14:46:23.000000000 +0000
@@ -14,11 +14,11 @@
diff -uNr redis-2.4.8__orig/redis.conf redis-2.4.8/redis.conf
--- redis-2.4.8__orig/redis.conf 2012-02-27 14:59:44.000000000 +0100
+++ redis-2.4.8/redis.conf 2012-02-27 15:00:23.000000000 +0100
@@ -14,7 +14,7 @@

# By default Redis does not run as a daemon. Use 'yes' if you need it.
# Note that Redis will write a pid file in /var/run/redis.pid when daemonized.
Expand All @@ -10,21 +10,16 @@ diff -uNr redis-2.0.0-rc4__orig/redis.conf redis-2.0.0-rc4/redis.conf

# When running daemonized, Redis writes a pid file in /var/run/redis.pid by
# default. You can specify a custom pid file location here.
-pidfile /var/run/redis.pid
+pidfile /var/run/redis/redis.pid

# Accept connections on the specified port, default is 6379
port 6379
@@ -26,7 +26,7 @@
@@ -27,7 +27,7 @@
# If you want you can bind a single interface, if the bind option is not
# specified all the interfaces will listen for incoming connections.
#
-# bind 127.0.0.1
+bind 127.0.0.1

# Close the connection after a client is idle for N seconds (0 to disable)
timeout 300
@@ -37,12 +37,12 @@
# Specify the path for the unix socket that will be used to listen for
# incoming connections. There is no default, so Redis will not listen
@@ -45,12 +45,12 @@
# verbose (many rarely useful info, but not a mess like the debug level)
# notice (moderately verbose, what you want in production probably)
# warning (only very important / critical messages are logged)
Expand All @@ -37,9 +32,9 @@ diff -uNr redis-2.0.0-rc4__orig/redis.conf redis-2.0.0-rc4/redis.conf
-logfile stdout
+logfile /var/log/redis/redis.log

# Set the number of databases. The default database is DB 0, you can select
# a different one on a per-connection basis using SELECT <dbid> where
@@ -86,7 +86,7 @@
# To enable logging to the system logger, just set 'syslog-enabled' to yes,
# and optionally update the other syslog parameters to suit your needs.
@@ -104,7 +104,7 @@
# Also the Append Only File will be created inside this directory.
#
# Note that you must specify a directory here, not a file name.
Expand All @@ -48,12 +43,3 @@ diff -uNr redis-2.0.0-rc4__orig/redis.conf redis-2.0.0-rc4/redis.conf

################################# REPLICATION #################################

@@ -220,7 +220,7 @@
# *** WARNING *** if you are using a shared hosting the default of putting
# the swap file under /tmp is not secure. Create a dir with access granted
# only to Redis user and configure Redis to create the swap file there.
-vm-swap-file /tmp/redis.swap
+# vm-swap-file /var/lib/redis/redis.swp

# vm-max-memory configures the VM to use at max the specified amount of
# RAM. Everything that deos not fit will be swapped on disk *if* possible, that
49 changes: 32 additions & 17 deletions spec/redis.spec
@@ -1,15 +1,15 @@
%define pid_dir %{_localstatedir}/run/redis
%define pid_file %{pid_dir}/redis.pid
%define redis_ver 2.2.14
%define redis_ver 2.4.8
%define redis_rel 1

Summary: redis is a key-value database like memcached
Summary: Redis is an open source, advanced key-value store
Name: redis
Version: %{redis_ver}
Release: %{redis_rel}
License: BSD
Group: Applications/Multimedia
URL: http://redis.io/
Group: Applications/Databases
URL: http://redis.io

Source0: redis-%{redis_ver}.tar.gz
Source2: redis.init
Expand All @@ -24,20 +24,30 @@ Requires(postun): /sbin/service
Provides: redis

%description
Redis is a key-value database. It is similar to memcached but the dataset is
not volatile, and values can be strings, exactly like in memcached, but also
lists and sets with atomic operations to push/pop elements.
Redis is an open source, advanced key-value store. It is often referred to as a
data structure server since keys can contain strings, hashes, lists, sets and
sorted sets.

In order to be very fast but at the same time persistent the whole dataset is
taken in memory and from time to time and/or when a number of changes to the
dataset are performed it is written asynchronously on disk. You may lose the
last few queries that is acceptable in many applications but it is as fast
as an in memory DB (beta 6 of Redis includes initial support for master-slave
replication in order to solve this problem by redundancy).
You can run atomic operations on these types, like appending to a string;
incrementing the value in a hash; pushing to a list; computing set intersection,
union and difference; or getting the member with highest ranking in a sorted
set.

Compression and other interesting features are a work in progress. Redis is
written in ANSI C and works in most POSIX systems like Linux, *BSD, Mac OS X,
and so on. Redis is free software released under the very liberal BSD license.
In order to achieve its outstanding performance, Redis works with an in-memory
dataset. Depending on your use case, you can persist it either by dumping the
dataset to disk every once in a while, or by appending each command to a log.

Redis also supports trivial-to-setup master-slave replication, with very fast
non-blocking first synchronization, auto-reconnection on net split and so forth.

Other features include a simple check-and-set mechanism, pub/sub and
configuration settings to make Redis behave like a cache.

You can use Redis from most programming languages out there.

Redis is written in ANSI C and works in most POSIX systems like Linux, *BSD,
OS X and Solaris without external dependencies. There is no official support
for Windows builds, although you may have some options.

%prep
%setup -n %{name}-%{redis_ver}
Expand Down Expand Up @@ -88,7 +98,6 @@ fi

%files
%defattr(-, root, root, 0755)
%doc doc/*.html
%{_sbindir}/redis-server
%{_bindir}/redis-benchmark
%{_bindir}/redis-cli
Expand All @@ -100,6 +109,12 @@ fi
%dir %attr(0755,redis,redis) %{_localstatedir}/run/redis

%changelog
* Fri Feb 27 2012 Martijn Storck <martijn@bluerail.nl> 2.4.8-1
- Upgrade to 2.4.8
- Update description
- Update redis.conf patch
- Removed documentation as it's no longer included in the source

* Fri Sep 23 2011 Martijn Storck <martijn@bluerail.nl> 2.2.14-1
- Upgrade to 2.2.14
- Update website URL
Expand Down

0 comments on commit 2d7fd6d

Please sign in to comment.