前言:

       看不清眼前路,只能上前一步。

正文:

   1.yum install gcc-c++

《宜立方之redis安装》

   2.redis安装包:上传到linux服务器:


《宜立方之redis安装》


    3.tar zxvf redis-3.0.0.tar.gz

《宜立方之redis安装》

    4.编译:make


《宜立方之redis安装》

   5.安装:由于没有config,所以在安装的时候,指定安装目录:make install PREFIX=/home/redis

《宜立方之redis安装》

   执行此命令,会将下图所示的几个文件安装在/home/redis/bin,

《宜立方之redis安装》 

   7.启动模式:前端启动模式(显示在终端上),后端启动模式

  (1)前端启动模式: ./redis-server   (/home/redis/bin)

《宜立方之redis安装》

   快照文件:dump.rdb
   ~:标识当前用户的home目录
   (2)后端启动模式:
    修改conf文件:
   《1》定位redis解压缩位置:/home/redis-3.0.0

《宜立方之redis安装》

   《2》复制conf文件到安装目录下: cp redis.conf /home/redis/bin

《宜立方之redis安装》

   《3》重新定位到安装目录下的bin目录下,修改配置文件

《宜立方之redis安装》
     vim redis.conf

《宜立方之redis安装》

    《4》启动: ./redis-server redis.conf
 
《宜立方之redis安装》

   《5》查看进程,redis服务是否启动:ps aux|grep redis

《宜立方之redis安装》

   《6》关掉该进程:kill 14315  (kill -9:强制杀死进程)
《宜立方之redis安装》

   《7》使用客户端关闭进程:./redis-cli shutdown

《宜立方之redis安装》

结语:

   《宜立方之redis安装》

相关文章:

  • 2021-12-19
  • 2021-04-12
  • 2021-04-13
  • 2021-12-30
  • 2022-12-23
  • 2021-10-12
  • 2021-06-17
  • 2021-05-18
猜你喜欢
  • 2021-07-03
  • 2021-08-29
  • 2022-01-01
  • 2022-01-03
  • 2021-08-09
  • 2021-07-03
  • 2021-09-05
相关资源
相似解决方案