Skip to content

Instantly share code, notes, and snippets.

@1901
Last active October 8, 2019 04:35
Show Gist options
  • Save 1901/b591b6820ed06314de20437db4eeb883 to your computer and use it in GitHub Desktop.
Save 1901/b591b6820ed06314de20437db4eeb883 to your computer and use it in GitHub Desktop.
[Redis commands] #redis
# 如果是通过 apt-get 或 yum 安装的 redis
/etc/init.d/redis-server stop
/etc/init.d/redis-server start
/etc/init.d/redis-server restart
# 如果是通过源码安装的 redis
./redis-cli -h 127.0.0.1 -p 6379 shutdown
./redis-cli -a 密码 -h 127.0.0.1 -p 6379 shutdown # 如果有密码
# 启动 redis
./redis-server ../redis.conf
# check memory usage
info memory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment