折腾:
[已解决]为Flask的后台任务而在CentOS中安装Redis
时,出错:
(SIPEvents) ➜ redis-3.2.3 ls src adlist.c aof.o config.o endianconv.c latency.h multi.o quicklist.o redis-check-rdb rio.c setproctitle.c syncio.c util.h adlist.h asciilogo.h crc16.c endianconv.h latency.o networking.c rand.c redis-check-rdb.c rio.h setproctitle.o syncio.o util.o adlist.o bio.c crc16.o endianconv.o lzf_c.c networking.o rand.h redis-check-rdb.o rio.o sha1.c testhelp.h valgrind.sup ae.c bio.h crc64.c fmacros.h lzf_c.o notify.c rand.o redis-cli scripting.c sha1.h t_hash.c version.h ae_epoll.c bio.o crc64.h geo.c lzf_d.c notify.o rdb.c redis-cli.c scripting.o sha1.o t_hash.o ziplist.c ae_evport.c bitops.c crc64.o geo.h lzf_d.o object.c rdb.h redis-cli.o sdsalloc.h slowlog.c t_list.c ziplist.h ae.h bitops.o db.c geo.o lzf.h object.o rdb.o redis-sentinel sds.c slowlog.h t_list.o ziplist.o ae_kqueue.c blocked.c db.o help.h lzfP.h pqsort.c redisassert.h redis-server sds.h slowlog.o t_set.c zipmap.c ae.o blocked.o debug.c hyperloglog.c Makefile pqsort.h redis-benchmark redis-trib.rb sds.o solarisfixes.h t_set.o zipmap.h ae_select.c cluster.c debugmacro.h hyperloglog.o Makefile.dep pqsort.o redis-benchmark.c release.c sentinel.c sort.c t_string.c zipmap.o anet.c cluster.h debug.o intset.c memtest.c pubsub.c redis-benchmark.o release.h sentinel.o sort.o t_string.o zmalloc.c anet.h cluster.o dict.c intset.h memtest.o pubsub.o redis-check-aof release.o server.c sparkline.c t_zset.c zmalloc.h anet.o config.c dict.h intset.o mkreleasehdr.sh quicklist.c redis-check-aof.c replication.c server.h sparkline.h t_zset.o zmalloc.o aof.c config.h dict.o latency.c multi.c quicklist.h redis-check-aof.o replication.o server.o sparkline.o util.c |
(SIPEvents) ➜ redis-3.2.3 src/redis-server 7998:C 03 Sep 21:15:13.528 # Warning: no config file specified, using the default config. In order to specify a config file use src/redis-server /path/to/redis.conf 7998:M 03 Sep 21:15:13.531 # Creating Server TCP listening socket *:6379: unable to bind socket |
redis Warning: no config file specified, using the default config
The error run ‘redis-server’ in Redis 3.2.0 · Issue #3291 · antirez/redis
-》官网教程就说了:
推荐(下载最新版本的)源码并编译
而不推荐:从包管理器中安装
-》我之前此处的CentOS中,就是:
yum install redis
安装出来的就是旧版本2.4.10的
而最新都已经是3.2.3了。
-》之前的地址也可以换成:
wget http://download.redis.io/redis-stable.tar.gz |
|
(SIPEvents) ➜ redis-3.2.3 ll src/redis* -rw-rw-r– 1 root root 2.3K Aug 2 17:00 src/redisassert.h -rwxr-xr-x 1 root root 5.4M Sep 3 21:13 src/redis-benchmark -rw-rw-r– 1 root root 29K Aug 2 17:00 src/redis-benchmark.c -rw-r–r– 1 root root 68K Sep 3 21:13 src/redis-benchmark.o -rwxr-xr-x 1 root root 22K Sep 3 21:13 src/redis-check-aof -rw-rw-r– 1 root root 6.2K Aug 2 17:00 src/redis-check-aof.c -rw-r–r– 1 root root 21K Sep 3 21:13 src/redis-check-aof.o -rwxr-xr-x 1 root root 7.5M Sep 3 21:13 src/redis-check-rdb -rw-rw-r– 1 root root 13K Aug 2 17:00 src/redis-check-rdb.c -rw-r–r– 1 root root 50K Sep 3 21:13 src/redis-check-rdb.o -rwxr-xr-x 1 root root 5.5M Sep 3 21:13 src/redis-cli -rw-rw-r– 1 root root 88K Aug 2 17:00 src/redis-cli.c -rw-r–r– 1 root root 218K Sep 3 21:13 src/redis-cli.o -rwxr-xr-x 1 root root 7.5M Sep 3 21:13 src/redis-sentinel -rwxr-xr-x 1 root root 7.5M Sep 3 21:13 src/redis-server -rwxrwxr-x 1 root root 60K Aug 2 17:00 src/redis-trib.rb |
(SIPEvents) ➜ redis-3.2.3 make install cd src && make install make[1]: Entering directory `/root/tools/redis-3.2.3/src’ Hint: It’s a good idea to run ‘make test’ 😉 INSTALL install INSTALL install INSTALL install INSTALL install INSTALL install make[1]: Leaving directory `/root/tools/redis-3.2.3/src’ |
(SIPEvents) ➜ redis-3.2.3 ll /usr/local/bin/redis-* -rwxr-xr-x 1 root root 5.4M Sep 3 21:47 /usr/local/bin/redis-benchmark -rwxr-xr-x 1 root root 22K Sep 3 21:47 /usr/local/bin/redis-check-aof -rwxr-xr-x 1 root root 7.5M Sep 3 21:47 /usr/local/bin/redis-check-rdb -rwxr-xr-x 1 root root 5.5M Sep 3 21:47 /usr/local/bin/redis-cli lrwxrwxrwx 1 root root 12 Sep 3 21:47 /usr/local/bin/redis-sentinel -> redis-server -rwxr-xr-x 1 root root 7.5M Sep 3 21:47 /usr/local/bin/redis-server |
但是此时命令行中还没法显示出来redis的命令。
-》说了:
此处是,只是为了开发测试的话,不指定对应的配置文件,也是OK的。
但是生产环境的话,记得要加上对应的配置文件。
比如:
redis-server /etc/redis.conf |
-》那就等:涉及到生产环境时,再去折腾redis的配置文件。
目前开发期间,就暂不去折腾了。
[后记]
后来看到:
[已解决]运行redis-server出错:Creating Server TCP listening socket 6379 unable to bind socket
说明此处,还是需要用配置文件的。。。
否则没法启动服务器。。。
转载请注明:在路上 » [已解决]安装完毕redis后出错:Warning no config file specified using the default config