Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redis 实用操作一 (安装篇) #16

Open
QC-L opened this issue Mar 22, 2018 · 0 comments
Open

Redis 实用操作一 (安装篇) #16

QC-L opened this issue Mar 22, 2018 · 0 comments

Comments

@QC-L
Copy link
Owner

QC-L commented Mar 22, 2018

安装

下载,解压,编译:

$ wget http://download.redis.io/releases/redis-4.0.8.tar.gz
$ tar xzf redis-4.0.8.tar.gz
$ cd redis-4.0.8
$ make

使用 make 编译后,可以使用以下命令进行验证

$ make test

二进制文件是编译完成后在 src 目录下,通过下面的命令启动 Redis 服务:

$ src/redis-server

你可以使用内置的客户端命令redis-cli进行使用:

$ src/redis-cli
redis> set foo bar
OK
redis> get foo
"bar"

深度安装

安装到 /usr/local/bin 目录下:

$ make install

需要进到 ./utils目录下,执行 :

$ cd ./utils
$ sudo ./install_server.sh // 该文件会生成 redis 所需的所有配置文件

注意:在执行该命令时,需要获取最高权限!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant