http://redis.io/topics/quickstart

make test 时的问题:

问题:gcc: Command not found

解决:yum install gcc

[root@VM_7_88_centos redis-stable]# yum install gcc
Loaded plugins: fastestmirror, langpacks
epel | 4.3 kB ::
extras | 3.4 kB ::
os | 3.6 kB ::
updates | 3.4 kB ::
Determining fastest mirrors
Resolving Dependencies
--> Running transaction check
---> Package gcc.x86_64 :4.8.-.el7 will be installed
--> Processing Dependency: libgomp = 4.8.-.el7 for package: gcc-4.8.-.el7.x86_64
--> Processing Dependency: cpp = 4.8.-.el7 for package: gcc-4.8.-.el7.x86_64
--> Processing Dependency: libgcc >= 4.8.-.el7 for package: gcc-4.8.-.el7.x86_64
--> Processing Dependency: libmpfr.so.()(64bit) for package: gcc-4.8.-.el7.x86_64
--> Processing Dependency: libmpc.so.()(64bit) for package: gcc-4.8.-.el7.x86_64
--> Running transaction check
---> Package cpp.x86_64 :4.8.-.el7 will be installed
---> Package libgcc.i686 :4.8.-.el7 will be updated
---> Package libgcc.x86_64 :4.8.-.el7 will be updated
---> Package libgcc.i686 :4.8.-.el7 will be an update
---> Package libgcc.x86_64 :4.8.-.el7 will be an update
---> Package libgomp.x86_64 :4.8.-.el7 will be updated
---> Package libgomp.x86_64 :4.8.-.el7 will be an update
---> Package libmpc.x86_64 :1.0.-.el7 will be installed
---> Package mpfr.x86_64 :3.1.-.el7 will be installed
--> Finished Dependency Resolution Dependencies Resolved ==============================================================================================================================================================
Package Arch Version Repository Size
==============================================================================================================================================================
Installing:
gcc x86_64 4.8.-.el7 os M
Installing for dependencies:
cpp x86_64 4.8.-.el7 os 5.9 M
libmpc x86_64 1.0.-.el7 os k
mpfr x86_64 3.1.-.el7 os k
Updating for dependencies:
libgcc i686 4.8.-.el7 os k
libgcc x86_64 4.8.-.el7 os k
libgomp x86_64 4.8.-.el7 os k Transaction Summary
==============================================================================================================================================================
Install Package (+ Dependent packages)
Upgrade ( Dependent packages) Total download size: M
Is this ok [y/d/N]: y
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
(/): cpp-4.8.-.el7.x86_64.rpm | 5.9 MB ::
(/): libgcc-4.8.-.el7.i686.rpm | kB ::
(/): libgcc-4.8.-.el7.x86_64.rpm | kB ::
(/): libgomp-4.8.-.el7.x86_64.rpm | kB ::
(/): libmpc-1.0.-.el7.x86_64.rpm | kB ::
(/): mpfr-3.1.-.el7.x86_64.rpm | kB ::
(/): gcc-4.8.-.el7.x86_64.rpm | MB ::
--------------------------------------------------------------------------------------------------------------------------------------------------------------
Total MB/s | MB ::
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : mpfr-3.1.-.el7.x86_64 /
Installing : libmpc-1.0.-.el7.x86_64 /
Installing : cpp-4.8.-.el7.x86_64 /
Updating : libgcc-4.8.-.el7.x86_64 /
Updating : libgomp-4.8.-.el7.x86_64 /
Installing : gcc-4.8.-.el7.x86_64 /
Updating : libgcc-4.8.-.el7.i686 /
Cleanup : libgcc-4.8.-.el7 /
Cleanup : libgcc-4.8.-.el7 /
Cleanup : libgomp-4.8.-.el7.x86_64 /
Verifying : libgcc-4.8.-.el7.i686 /
Verifying : libgomp-4.8.-.el7.x86_64 /
Verifying : gcc-4.8.-.el7.x86_64 /
Verifying : cpp-4.8.-.el7.x86_64 /
Verifying : libgcc-4.8.-.el7.x86_64 /
Verifying : mpfr-3.1.-.el7.x86_64 /
Verifying : libmpc-1.0.-.el7.x86_64 /
Verifying : libgcc-4.8.-.el7.i686 /
Verifying : libgcc-4.8.-.el7.x86_64 /
Verifying : libgomp-4.8.-.el7.x86_64 / Installed:
gcc.x86_64 :4.8.-.el7 Dependency Installed:
cpp.x86_64 :4.8.-.el7 libmpc.x86_64 :1.0.-.el7 mpfr.x86_64 :3.1.-.el7 Dependency Updated:
libgcc.i686 :4.8.-.el7 libgcc.x86_64 :4.8.-.el7 libgomp.x86_64 :4.8.-.el7 Complete!

补充:

[root@VM_7_88_centos redis-stable]# yum -h
Loaded plugins: fastestmirror, langpacks
Usage: yum [options] COMMAND List of Commands: check Check for problems in the rpmdb
check-update Check for available package updates
clean Remove cached data
deplist List a package's dependencies
distribution-synchronization Synchronize installed packages to the latest available versions
downgrade downgrade a package
erase Remove a package or packages from your system
fs Creates filesystem snapshots, or lists/deletes current snapshots.
fssnapshot Creates filesystem snapshots, or lists/deletes current snapshots.
groups Display, or use, the groups information
help Display a helpful usage message
history Display, or use, the transaction history
info Display details about a package or group of packages
install Install a package or packages on your system
langavailable Check available languages
langinfo List languages information
langinstall Install appropriate language packs for a language
langlist List installed languages
langremove Remove installed language packs for a language
list List a package or groups of packages
load-transaction load a saved transaction from filename
makecache Generate the metadata cache
provides Find what package provides the given value
reinstall reinstall a package
repo-pkgs Treat a repo. as a group of packages, so we can install/remove all of them
repolist Display the configured software repositories
search Search package details for the given string
shell Run an interactive yum shell
swap Simple way to swap packages, instead of using shell
update Update a package or packages on your system
update-minimal Works like upgrade, but goes to the 'newest' package match which fixes a problem that affects your system
updateinfo Acts on repository update information
upgrade Update packages taking obsoletes into account
version Display a version for the machine and/or available repos. Options:
-h, --help show this help message and exit
-t, --tolerant be tolerant of errors
-C, --cacheonly run entirely from system cache, don't update cache
-c [config file], --config=[config file]
config file location
-R [minutes], --randomwait=[minutes]
maximum command wait time
-d [debug level], --debuglevel=[debug level]
debugging output level
--showduplicates show duplicates, in repos, in list/search commands
-e [error level], --errorlevel=[error level]
error output level
--rpmverbosity=[debug level name]
debugging output level for rpm
-q, --quiet quiet operation
-v, --verbose verbose operation
-y, --assumeyes answer yes for all questions
--assumeno answer no for all questions
--version show Yum version and exit
--installroot=[path] set install root
--enablerepo=[repo] enable one or more repositories (wildcards allowed)
--disablerepo=[repo] disable one or more repositories (wildcards allowed)
-x [package], --exclude=[package]
exclude package(s) by name or glob
--disableexcludes=[repo]
disable exclude from main, for a repo or for
everything
--disableincludes=[repo]
disable includepkgs for a repo or for everything
--obsoletes enable obsoletes processing during updates
--noplugins disable Yum plugins
--nogpgcheck disable gpg signature checking
--disableplugin=[plugin]
disable plugins by name
--enableplugin=[plugin]
enable plugins by name
--skip-broken skip packages with depsolving problems
--color=COLOR control whether color is used
--releasever=RELEASEVER
set value of $releasever in yum config and repo files
--downloadonly don't update, just download
--downloaddir=DLDIR specifies an alternate directory to store packages
--setopt=SETOPTS set arbitrary config and repo options
--bugfix Include bugfix relevant packages, in updates
--security Include security relevant packages, in updates
--advisory=ADVS, --advisories=ADVS
Include packages needed to fix the given advisory, in
updates
--bzs=BZS Include packages needed to fix the given BZ, in
updates
--cves=CVES Include packages needed to fix the given CVE, in
updates
--sec-severity=SEVS, --secseverity=SEVS
Include security relevant packages matching the
severity, in updates Plugin Options:

问题:/bin/sh: cc: command not found

///////////////////////////////////////////////////////////////////////////////////////////////////////////////

上网查找问题过程中,恍然,还没看README

Where to find complete Redis documentation?
------------------------------------------- This README is just a fast "quick start" document. You can find more detailed
documentation at http://redis.io Building Redis
-------------- Redis can be compiled and used on Linux, OSX, OpenBSD, NetBSD, FreeBSD.
We support big endian and little endian architectures. It may compile on Solaris derived systems (for instance SmartOS) but our
support for this platform is "best effort" and Redis is not guaranteed to
work as well as in Linux, OSX, and *BSD there. It is as simple as: % make You can run a 32 bit Redis binary using: % make 32bit After building Redis is a good idea to test it, using: % make test Fixing build problems with dependencies or cached build options
—--------
Redis has some dependencies which are included into the "deps" directory.
"make" does not rebuild dependencies automatically, even if something in the
source code of dependencies is changes. When you update the source code with `git pull` or when code inside the
dependencies tree is modified in any other way, make sure to use the following
command in order to really clean everything and rebuild from scratch: make distclean This will clean: jemalloc, lua, hiredis, linenoise. Also if you force certain build options like 32bit target, no C compiler
optimizations (for debugging purposes), and other similar build time options,
those options are cached indefinitely until you issue a "make distclean"
command. Fixing problems building 32 bit binaries
--------- If after building Redis with a 32 bit target you need to rebuild it
with a 64 bit target, or the other way around, you need to perform a
"make distclean" in the root directory of the Redis distribution. In case of build errors when trying to build a 32 bit binary of Redis, try
the following steps: * Install the packages libc6-dev-i386 (also try g++-multilib).
* Try using the following command line instead of "make 32bit": make CFLAGS="-m32 -march=native" LDFLAGS="-m32" Allocator
--------- Selecting a non-default memory allocator when building Redis is done by setting
the `MALLOC` environment variable. Redis is compiled and linked against libc
malloc by default, with the exception of jemalloc being the default on Linux
systems. This default was picked because jemalloc has proven to have fewer
fragmentation problems than libc malloc. To force compiling against libc malloc, use: % make MALLOC=libc To compile against jemalloc on Mac OS X systems, use: % make MALLOC=jemalloc Verbose build
------------- Redis will build with a user friendly colorized output by default.
If you want to see a more verbose output use the following: % make V=1 Running Redis
------------- To run Redis with the default configuration just type: % cd src
% ./redis-server If you want to provide your redis.conf, you have to run it using an additional
parameter (the path of the configuration file): % cd src
% ./redis-server /path/to/redis.conf It is possible to alter the Redis configuration passing parameters directly
as options using the command line. Examples: % ./redis-server --port 9999 --slaveof 127.0.0.1 6379
% ./redis-server /etc/redis/6379.conf --loglevel debug All the options in redis.conf are also supported as options using the command
line, with exactly the same name. Playing with Redis
------------------ You can use redis-cli to play with Redis. Start a redis-server instance,
then in another terminal try the following: % cd src
% ./redis-cli
redis> ping
PONG
redis> set foo bar
OK
redis> get foo
"bar"
redis> incr mycounter
(integer) 1
redis> incr mycounter
(integer) 2
redis> You can find the list of all the available commands here: http://redis.io/commands Installing Redis
----------------- In order to install Redis binaries into /usr/local/bin just use: % make install You can use "make PREFIX=/some/other/directory install" if you wish to use a
different destination. Make install will just install binaries in your system, but will not configure
init scripts and configuration files in the appropriate place. This is not
needed if you want just to play a bit with Redis, but if you are installing
it the proper way for a production system, we have a script doing this
for Ubuntu and Debian systems: % cd utils
% ./install_server.sh The script will ask you a few questions and will setup everything you need
to run Redis properly as a background daemon that will start again on
system reboots. You'll be able to stop and start Redis using the script named
/etc/init.d/redis_<portnumber>, for instance /etc/init.d/redis_6379. Code contributions
--- Note: by contributing code to the Redis project in any form, including sending
a pull request via Github, a code fragment or patch via private email or
public discussion groups, you agree to release your code under the terms
of the BSD license that you can find in the COPYING file included in the Redis
source distribution. Please see the CONTRIBUTING file in this source distribution for more
information. Enjoy!

解决:make MALLOC=libc

如下:

[root@VM_7_88_centos redis-stable]# make MALLOC=libc
cd src && make all
make[]: Entering directory `/opt/redis/redis-stable/src'
rm -rf redis-server redis-sentinel redis-cli redis-benchmark redis-check-dump redis-check-aof *.o *.gcda *.gcno *.gcov redis.info lcov-html
(cd ../deps && make distclean)
make[]: Entering directory `/opt/redis/redis-stable/deps'
(cd hiredis && make clean) > /dev/null || true
(cd linenoise && make clean) > /dev/null || true
(cd lua && make clean) > /dev/null || true
(cd jemalloc && [ -f Makefile ] && make distclean) > /dev/null || true
(rm -f .make-*)
make[]: Leaving directory `/opt/redis/redis-stable/deps'
(rm -f .make-*)
echo STD=-std=c99 -pedantic >> .make-settings
echo WARN=-Wall -W >> .make-settings
echo OPT=-O2 >> .make-settings
echo MALLOC=libc >> .make-settings
echo CFLAGS= >> .make-settings
echo LDFLAGS= >> .make-settings
echo REDIS_CFLAGS= >> .make-settings
echo REDIS_LDFLAGS= >> .make-settings
echo PREV_FINAL_CFLAGS=-std=c99 -pedantic -Wall -W -O2 -g -ggdb -I../deps/hiredis -I../deps/linenoise -I../deps/lua/src >> .make-settings
echo PREV_FINAL_LDFLAGS= -g -ggdb -rdynamic >> .make-settings
(cd ../deps && make hiredis linenoise lua)
make[]: Entering directory `/opt/redis/redis-stable/deps'
(cd hiredis && make clean) > /dev/null || true
(cd linenoise && make clean) > /dev/null || true
(cd lua && make clean) > /dev/null || true
(cd jemalloc && [ -f Makefile ] && make distclean) > /dev/null || true
(rm -f .make-*)
(echo "" > .make-cflags)
(echo "" > .make-ldflags)
MAKE hiredis
cd hiredis && make static
make[]: Entering directory `/opt/redis/redis-stable/deps/hiredis'
cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb net.c
cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb hiredis.c
cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb sds.c
cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb async.c
ar rcs libhiredis.a net.o hiredis.o sds.o async.o
make[]: Leaving directory `/opt/redis/redis-stable/deps/hiredis'
MAKE linenoise
cd linenoise && make
make[]: Entering directory `/opt/redis/redis-stable/deps/linenoise'
cc -Wall -Os -g -c linenoise.c
make[]: Leaving directory `/opt/redis/redis-stable/deps/linenoise'
MAKE lua
cd lua/src && make all CFLAGS="-O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL " MYLDFLAGS="" AR="ar rcu"
make[]: Entering directory `/opt/redis/redis-stable/deps/lua/src'
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -c -o lapi.o lapi.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -c -o lcode.o lcode.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -c -o ldebug.o ldebug.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -c -o ldo.o ldo.c
ldo.c: In function 'f_parser':
ldo.c::: warning: unused variable 'c' [-Wunused-variable]
int c = luaZ_lookahead(p->z);
^
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -c -o ldump.o ldump.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -c -o lfunc.o lfunc.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -c -o lgc.o lgc.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -c -o llex.o llex.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -c -o lmem.o lmem.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -c -o lobject.o lobject.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -c -o lopcodes.o lopcodes.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -c -o lparser.o lparser.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -c -o lstate.o lstate.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -c -o lstring.o lstring.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -c -o ltable.o ltable.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -c -o ltm.o ltm.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -c -o lundump.o lundump.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -c -o lvm.o lvm.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -c -o lzio.o lzio.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -c -o strbuf.o strbuf.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -c -o fpconv.o fpconv.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -c -o lauxlib.o lauxlib.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -c -o lbaselib.o lbaselib.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -c -o ldblib.o ldblib.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -c -o liolib.o liolib.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -c -o lmathlib.o lmathlib.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -c -o loslib.o loslib.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -c -o ltablib.o ltablib.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -c -o lstrlib.o lstrlib.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -c -o loadlib.o loadlib.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -c -o linit.o linit.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -c -o lua_cjson.o lua_cjson.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -c -o lua_struct.o lua_struct.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -c -o lua_cmsgpack.o lua_cmsgpack.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -c -o lua_bit.o lua_bit.c
ar rcu liblua.a lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o lundump.o lvm.o lzio.o strbuf.o fpconv.o lauxlib.o lbaselib.o ldblib.o liolib.o lmathlib.o loslib.o ltablib.o lstrlib.o loadlib.o linit.o lua_cjson.o lua_struct.o lua_cmsgpack.o lua_bit.o # DLL needs all object files
ranlib liblua.a
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -c -o lua.o lua.c
cc -o lua lua.o liblua.a -lm
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -c -o luac.o luac.c
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -c -o print.o print.c
cc -o luac luac.o print.o liblua.a -lm
make[]: Leaving directory `/opt/redis/redis-stable/deps/lua/src'
make[]: Leaving directory `/opt/redis/redis-stable/deps'
CC adlist.o
CC ae.o
CC anet.o
CC dict.o
CC redis.o
CC sds.o
CC zmalloc.o
CC lzf_c.o
CC lzf_d.o
CC pqsort.o
CC zipmap.o
CC sha1.o
CC ziplist.o
CC release.o
CC networking.o
CC util.o
CC object.o
CC db.o
CC replication.o
CC rdb.o
CC t_string.o
CC t_list.o
CC t_set.o
CC t_zset.o
CC t_hash.o
CC config.o
CC aof.o
CC pubsub.o
CC multi.o
CC debug.o
CC sort.o
CC intset.o
CC syncio.o
CC cluster.o
CC crc16.o
CC endianconv.o
CC slowlog.o
CC scripting.o
CC bio.o
CC rio.o
CC rand.o
CC memtest.o
CC crc64.o
CC bitops.o
CC sentinel.o
CC notify.o
CC setproctitle.o
CC blocked.o
CC hyperloglog.o
CC latency.o
CC sparkline.o
LINK redis-server
INSTALL redis-sentinel
CC redis-cli.o
LINK redis-cli
CC redis-benchmark.o
LINK redis-benchmark
CC redis-check-dump.o
LINK redis-check-dump
CC redis-check-aof.o
LINK redis-check-aof Hint: It's a good idea to run 'make test' ;) make[]: Leaving directory `/opt/redis/redis-stable/src'

运行 make test 出现问题:

[root@VM_7_88_centos redis-stable]# make test
cd src && make test
make[]: Entering directory `/opt/redis/redis-stable/src'
You need tcl 8.5 or newer in order to run the Redis test
make[]: *** [test] Error
make[]: Leaving directory `/opt/redis/redis-stable/src'
make: *** [test] Error

解决办法:yum install tcl

[root@VM_7_88_centos src]# yum install tcl
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package tcl.x86_64 :8.5.-.el7 will be installed
--> Finished Dependency Resolution Dependencies Resolved ==============================================================================================================================================================
Package Arch Version Repository Size
==============================================================================================================================================================
Installing:
tcl x86_64 :8.5.-.el7 os 1.9 M Transaction Summary
==============================================================================================================================================================
Install Package Total download size: 1.9 M
Installed size: 4.4 M
Is this ok [y/d/N]: y
Downloading packages:
tcl-8.5.-.el7.x86_64.rpm | 1.9 MB ::
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : :tcl-8.5.-.el7.x86_64 /
Verifying : :tcl-8.5.-.el7.x86_64 / Installed:
tcl.x86_64 :8.5.-.el7 Complete!

再次 make test

Execution time of different units:
seconds - unit/printver
seconds - unit/scan
seconds - unit/multi
seconds - unit/quit
seconds - unit/auth
seconds - unit/protocol
seconds - unit/expire
seconds - unit/type/list
seconds - unit/other
seconds - unit/type/list-
seconds - unit/type/hash
seconds - integration/logging
seconds - unit/pubsub
seconds - integration/convert-zipmap-hash-on-load
seconds - integration/aof
seconds - integration/rdb
seconds - unit/slowlog
seconds - unit/introspection
seconds - unit/limits
seconds - unit/type/set
seconds - unit/dump
seconds - unit/aofrw
seconds - unit/scripting
seconds - unit/type/zset
seconds - integration/replication-
seconds - unit/sort
seconds - unit/bitops
seconds - unit/maxmemory
seconds - unit/basic
seconds - unit/memefficiency
seconds - unit/type/list-
seconds - integration/replication-
seconds - integration/replication-
seconds - unit/hyperloglog
seconds - integration/replication-psync
seconds - integration/replication
seconds - unit/obuf-limits \o/ All tests passed without errors! Cleanup: may take some time... OK

运行:

cd src

./redis-server

[root@VM_7_88_centos src]# ./redis-server
:C Mar ::33.741 # Warning: no config file specified, using the default config. In order to specify a config file use ./redis-server /path/to/redis.conf
_._
_.-``__ ''-._
_.-`` `. `_. ''-._ Redis 3.0. (/) bit
.-`` .-```. ```\/ _.,_ ''-._
( ' , .-` | `, ) Running in standalone mode
|`-._`-...-` __...-.``-._|'` _.-'| Port:
| `-._ `._ / _.-' | PID: 24864
`-._ `-._ `-./ _.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' | http://redis.io
`-._ `-._`-.__.-'_.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' |
`-._ `-._`-.__.-'_.-' _.-'
`-._ `-.__.-' _.-'
`-._ _.-'
`-.__.-' :M Mar ::33.742 # WARNING: The TCP backlog setting of cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of .
:M Mar ::33.742 # Server started, Redis version 3.0.
:M Mar ::33.742 # WARNING overcommit_memory is set to ! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
:M Mar ::33.742 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
:M Mar ::33.742 * The server is now ready to accept connections on port

后台运行 ./redis-server &

测试:

./redis-cli ping

[root@VM_7_88_centos src]# ./redis-cli ping
PONG

进入客户端模式

[root@VM_7_88_centos src]# ./redis-cli
127.0.0.1:> ping
PONG
127.0.0.1:> set mykey
OK
127.0.0.1:> get mykey
""
127.0.0.1:>

关闭redis服务器

[root@VM_7_88_centos src]# ./redis-cli
127.0.0.1:> SHUTDOWN
:M Mar ::23.255 # User requested shutdown...
:M Mar ::23.255 * Saving the final RDB snapshot before exiting.
:M Mar ::23.295 * DB saved on disk
:M Mar ::23.295 # Redis is now ready to exit, bye bye...
not connected>

安全机制待续。。。

Redis Quick Start [遇到问题解决问题版]的更多相关文章

  1. 开源作品-PHP写的Redis管理工具(单文件绿色版)-SuRedisAdmin_PHP_1_0

    前言:项目开发用到了Redis,但是在调试Redis数据的时候,没有一款通用的可视化管理工具.在网络找了一些,但是感觉功能上都不尽人意,于是决定抽出一点时间,开发一个用起来顺手的Redis管理工具.秉 ...

  2. 使用 Redis 源码编译发布 Windows 版 Redis For Windows 发行包

    Redis 是个高性能的键值数据库,现在日常项目开发过程中,目前个人开发项目基本都会用到 Redis,主要是用来做 缓存 和 分布式锁 的底层支持,个人喜欢用 .NET 技术体系,所以一般部署也是用 ...

  3. Redis Quick Start [熟练版]

    一.下载解压 wget http://download.redis.io/redis-stable.tar.gztar xvzf redis-stable.tar.gzcd redis-stable ...

  4. Redis入门指南(第2版) Redis设计思路学习与总结

    https://www.qcloud.com/community/article/222 宋增宽,腾讯工程师,16年毕业加入腾讯,从事海量服务后台设计与研发工作,现在负责QQ群后台等项目,喜欢研究技术 ...

  5. Keepalived+Redis高可用部署(第二版)

    更新 20150625 脚本由5个减少为4个,sh脚本指令做了精简. 修改了另外3个脚本,在日志里增加了日期显示. 新增redis数据类型,持久化,主从同步简介. 新增hiredis简介. 新增c语言 ...

  6. 《Redis入门指南》第2版 读书笔记

    读第二遍了,感觉和几年前读时的收获不一样了.送上门来当树洞的独自承担一切 Redis以简洁为美Redis通信协议是Redis客户端与Redis之间交流的语言,通信协议规定了命令和返回值的格式.Redi ...

  7. Redis&PHP的使用安装-windows版

    Redis是一个Key-value的数据结构存储系统,可以以数据库的形式,缓存系统,消息处理器使用,它支持的存储value类型很多,例如,string.list(链表).set(集合).zset(so ...

  8. Redis集群分布(Windows版)

    Redis系列 作者Mr.Chen,转载请注明博客出处:http://www.cnblogs.com/cjh-notes/ 第一步:下载安装redis windows版的下载地址:https://gi ...

  9. 案例:用Redis来存储关注关系(php版)

    Redis提供了丰富的数据类型,比起关系型数据库或者简单的Key-Value存储(比如Memcached)来,Redis的数据模型与实际应用的数据模型更相近.比如下面说到的好友关系的存储,原作者使用了 ...

随机推荐

  1. VBox 安装 macOS 10.12

    安装步骤⑴ 下载及解压 macOS 10.12 Sierra Final by TechReviews.rar ⑵ 下载及双击安装 VirtualBox-5.1.6-110634-Win.exe ,默 ...

  2. C# 获取textbox行数

    当textbox为多行时,获取它的行数:int count = this.txtMsgInfo.Lines.GetUpperBound(0);

  3. websoket

    http://blog.csdn.net/xueling022/article/details/52902358

  4. poj3616(LIS简单变式)

    题目链接:http://poj.org/problem?id=3616 思路: 我的第一反应是背包,因为每个interval要么选择要么不选,后来发现状态方程很难写出来.后来想一想发现就是LIS的简单 ...

  5. svn: authentication cancelled

    从svn 下程序时用户名和密码输入正确后报如图错误! 控制台输出: svn: authentication cancelled    svn: authentication cancelled    ...

  6. JAVA序列化和反序列化 对象<=>IO流 对象<=>字节数组

    http://developer.51cto.com/art/201202/317181.htm http://blog.csdn.net/earbao/article/details/4691440 ...

  7. ECMAScript5之JSON对象属性的遍历顺序

    测试浏览器 Chrome.Safari 一 键可以用parseInt解析成整数的,按数值升序顺序. var intObj = { '3.3' : 3.3, '2' : 222, '1' :111 } ...

  8. Redis网络协议

    Redis网络协议较为简单,易于阅读. 命令或数据已\r\n结尾,但除了状态回复,其他数据都是二进制安全的(包含长度) 头部如下: + 正确的状态信息,具体信息是当前行+后面的字符. -  一条错误信 ...

  9. swift - 封装 GCDTimer 和 NSTimer

    封装的类代码 import UIKit /// 控制定时器的类 class ZDTimerTool: NSObject { /// 定时器 // private var timer: Timer? / ...

  10. Parallel.Foreach的基础知识

    微软的并行运算平台(Microsoft’s Parallel Computing Platform (PCP))提供了这样一个工具,让软件开发人员可以有效的使用多核提供的性能. Visual Stud ...