Linux Redis installed (with video)

Crazy maker culture circle Java [one hundred million concurrent high flow chat room] actual combat series [ blog park entrance total ]

Architect interview growth + high concurrency essential foundation books [ Netty Zookeeper Redis high concurrency combat ]


Crazy maker culture circle high concurrency environment video, one after another on-line:

  • Windows Redis installed (with video)
  • Linux Redis installed (with video)
  • Windows Zookeeper installation (with video)
  • Linux Zookeeper installation (with video)
  • Linux RabbitMQ installation (with video)

Small video and tools needed to Baidu network disk link , see the crazy maker culture circle high concurrency community blog

Step 1: Preparation Redis desktop management tools

Recommended desktop management tools: Redis Desktop Manager

Download Redis Desktop Manager

Download as https://redisdesktop.com/download

Crazy maker culture circle of small tools and video sharing network disk, has been downloaded version

Here Insert Picture Description

Install Redis Desktop Manager

Download to local after clicking all the way to complete the installation. Compare fool.

Here Insert Picture Description

Step 2: Install dependencies tcl

Linux source code in the installation process, will depend to tcl tool.

tcl is a scripting language created by John Ousterhout, very powerful, is used for aspects of rapid prototyping, scripting, GUI and testing.

// use the following command to install the tcl Kit Online

yum install tcl -y

// Use the following command to check the version of tcl

[root@localhost redis-5.0.2]# rpm -qa |grep tcl
tcl-8.5.13-8.el7.x86_64
targetcli-2.1.fb34-1.el7.noarch

Step Four: Download Redis version you want to install, download the source package here

1, redis source code Download:

http://download.redis.io/releases/redis-5.0.2.tar.gz

Test used here is the redis-5.0.4.tar.gz version.

2 疯狂创客圈 小视频和工具 共享网盘,已经有下载好的版本

第五步: 将安装包上传到Linux,并且解压

上传到Linux服务器,创建Redis解压缩目录,将Redis源码压缩包解压到目标目录。

mkdir -p  /usr/local/redis
tar  -zxvf   /usr/local/redis-5.0.2.tar.gz   -C   /usr/local/redis

第六步:编译和安装

使用make命令,将Redis源码编译为可执行文件。

//进入redis的源码包目录

[root@localhost / ] cd  /usr/local/redis/redis-5.0.2/src

//执行make命令,编译源码

[root@localhost redis-5.0.2] make

使用 make install指令,安装到其他目录,比如 /usr/local/redis目录

[root@localhost src] make install PREFIX=/usr/local/redis

第七步:修改配置文件

首先复制一份要使用的配置文件,复制到/usr/local/redis/目录下,然后修改配置文件,使得Redis启动的方式为后台启动。

//复制配置文件
[root@localhost redis-5.0.2]# cp  /usr/local/redis/redis-5.0.2/redis.conf  /usr/local/redis/
//修改配置文件
[root@localhost redis-5.0.2]# vim /usr/local/redis/redis.conf

大致需要进行四处修改:
(1)将在大致136行的 daemonize no 改成daemonize yes,将启动的方式改成后台启动;
(2)注释掉大致69行的 bind 127.0.0.1 配置项,方法是在前面加上#。
为什么呢?绑定了127.0.0.1 本地回环地址后,Redis服务只能被本地的客户端连接,远程客户端无法连接根据真实的ip地址开启连接。
(3)将大致在88行的protected-mode yes改成protected-mode no,目的是为了解决安全模式引起的报错,不需要再安全模式下运行。
(4)将大致在170行的logfile "",改成某个自定义的文件如 logfile "/usr/local/redis/redis.log",方便后面进行Lua程序开发时,进行日志的输出和查看。

第八步:杀死redis并重新后台开启redis

如果修改了配置文件,就需要重启Redis服务,大致的命令如下:

//杀死redis服务进程
pkill -9 redis-server
//开启Redis的命令
/usr/local/redis/bin/redis-server  /usr/local/redis/redis.conf

第八步:将redis加入到开机启动

编辑启动配置文件 /etc/rc.local,加入开机启动项,里面添加内容:

#调用开启Redis的命令
/usr/local/redis/bin/redis-server  /usr/local/redis/redis.conf

Ninth step: Redis Desktop Manager is connected Redis

Here Insert Picture Description

In particular, please pay attention to Java concurrency high learning community [ blog park entrance total ]


Finally, tell us about the crazy maker culture circle: Crazy maker culture circle, a highly concurrent Java learning community [ blog park entrance total ]

Crazy maker culture circle, a commitment to delivering: interview + interview must-must-must-interview + base + actual principle books " Netty Zookeeper Redis combat high concurrency "

img


Crazy maker culture circles Java Sike series

  • Java (Netty) chat program [traffic] one hundred million real open source project combat

  • Netty source, principle, JAVA NIO principle
  • Java questions face clean sweep
  • Crazy maker culture circle [blog park entrance total]


ava Sike series

  • Java (Netty) chat program [traffic] one hundred million real open source project combat

  • Netty source, principle, JAVA NIO principle
  • Java questions face clean sweep
  • Crazy maker culture circle [blog park entrance total]


Guess you like

Origin www.cnblogs.com/crazymakercircle/p/11985983.html