Summary: Connect to Redis and perform command-line operations under Linux (set Redis password)

Source: Internet
Author: User
Tags benchmark sha1

[[Email protected] ~]# CD/
[[email protected]/]# ls
Bin Boot Dev etc home lib lib64 lost+found media mnt opt proc root sbin selinux SRV sys tmp usr var
[Email protected]/]# CD usr
[[email protected] usr]# ls
Bin etc Games include Lib Lib64 libexec local sbin share src tmp
[Email protected] usr]# CD Local
[[email protected] local]# ls
Aegis Bin etc Games include Lib Lib64 libexec Redis redis-2.8.12.tar.gz sbin share src
[[Email protected] local]# CD Redis
[[email protected] redis]# ls
00-releasenotes contributing Deps INSTALL MANIFESTO redis.conf runtest-sentinel src utils
BUGS COPYING dump.rdb Makefile README runtest sentinel.conf tests
[[Email protected] redis]# CD src
[[email protected] src]# ls
adlist.c aof.o db.o intset.h mkreleasehdr.sh rand.c redis-check-dump replication.o sha1.h t_list.o ZIPLIST.O
Adlist.h asciilogo.h debug.c intset.o multi.c rand.h redis-check-dump.c rio.c sha1.o t_set.c zipmap.c
ADLIST.O bio.c debug.o lzf_c.c multi.o rand.o redis-check-dump.o rio.h slowlog.c t_set.o zipmap.h
ae.c bio.h dict.c lzf_c.o networking.c rdb.c redis-cli rio.o slowlog.h t_string.c ZIPMAP.O
AE_EPOLL.C bio.o dict.h lzf_d.c networking.o rdb.h redis-cli.c scripting.c slowlog.o t_string.o zmalloc.c
ae_evport.c bitops.c dict.o lzf_d.o notify.c rdb.o redis-cli.o scripting.o solarisfixes.h t_zset.c zmalloc.h
Ae.h bitops.o endianconv.c lzf.h notify.o redisassert.h redis.h sds.c sort.c t_zset.o ZMALLOC.O
ae_kqueue.c config.c endianconv.h lzfP.h object.c redis-benchmark redis.o sds.h sort.o util.c
AE.O config.h endianconv.o Makefile object.o redis-benchmark.c redis-sentinel sds.o syncio.c util.h
ae_select.c config.o fmacros.h makefile.dep pqsort.c redis-benchmark.o redis-server sentinel.c syncio.o UTIL.O
anet.c crc64.c help.h memtest.c pqsort.h redis.c release.c sentinel.o testhelp.h valgrind.sup
Anet.h crc64.h hyperloglog.c memtest.o pqsort.o redis-check-aof release.h setproctitle.c t_hash.c version.h
ANET.O crc64.o hyperloglog.o migrate.c pubsub.c redis-check-aof.c release.o setproctitle.o t_hash.o ziplist.c
AOF.C db.c intset.c migrate.o pubsub.o redis-check-aof.o replication.c sha1.c t_list.c ziplist.h

[Email protected] src]#./redis-cli
127.0.0.1:6379> Get Name
"Tanglei1234"
127.0.0.1:6379> Config Get Requirepass
1) "Requirepass"
2) ""
127.0.0.1:6379> Config set Requirepass newpsw
Ok
127.0.0.1:6379> Config Get Requirepass
(Error) Noauth Authentication required.
127.0.0.1:6379> Auth NEWPSW
Ok
127.0.0.1:6379> Get Name
"Tanglei1234"
127.0.0.1:6379>
Connection closed by foreign host.

Summary: Connect to Redis and perform command-line operations under Linux (set Redis password)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.