How to install redis under the main speakers.
Official website
Official website address https://redis.io/
Ali cloud server to download
> http://download.redis.io/releases/redis-4.0.11.tar.gz
wget http://download.redis.io/releases/redis-4.0.11.tar.gz
* Ready to work
yum install -y gcc-c++
installation
tar -zxvf redis-4.0.11.tar.gz cd redis-4.0.11 pwd ll
redis compile directory
> compile spend relatively long time to wait for a while. About 5 more minutes.
make
redis installation
> to start the installation, set the installation directory
make install PREFIX=/usr/local/redis
redis run
> foreground
cd /usr/local/redis/ ls cd bin ./redis-server
Foreground can not be closed, to close the direct service to shut down. By modifying the configuration file
# Unzip into the directory cd /home/redis-4.0.11/ cp redis.conf / usr / local / Redis / bin /
Modify the configuration file
the redis.conf
bind 127.0.0.1 modified to bind 0.0.0.0
Remote Accessdaemonize no 修改成 daemonize yes
后台运行port 6379 修改成 port <自己定义的端口>
远程访问的端口requirepass foobared 修改成requirepass <远程密码>
远程访问的密码
项目启动
./redis-server redis.conf
./redis-cli -p 6379 -a liming set hello helloworld get hello
客户端工具 redis desktop manager
> 这个客户端工具下载windows
PS:这就是我们linux下安装redis的,并用redis desktop连接。并测试了redis成功的安装。