redis学习第一章在linux中直接使用redis

这里写目录标题

  • 一 下载安装redis
  • 二 修改redis相关功能
    • 1 杀redis进程
    • 2 后端启动(守护进程启动)

一 下载安装redis

cd ../
  494  rpm -qa | grep redis
  495  ls | grep "redis";
  496  ls | grep "redis" | xargs -i rm {}
  497  ls | grep "redis";
  498  rm -rf redis-5.0.5
  499  ll
  500  cd ../
  501  ls
  502  ll
  503  cd usr
  504  ll
  505  cd redis
  506  ll
  507  cd ../
  508  rm -rf redis
  509  ll
  510  ls | grep "redis";
  511  cd ../
  512  cd../
  513  ls | grep "redis";
  514  history
  515  yum install -y wget
  516  wget http://download.redis.io/releases/redis-6.2.1.tar.gz
  517  tar -zxf redis-6.2.1.tar.gz
  518  cd redis-6.2.1/src
  519  make
  520  history
  521  mkdir /usr/redis -p
  522  make install PREFIX=/usr/redis
  523  ./redis-server
  524  history
  525  ll

二 修改redis相关功能

1 杀redis进程

  526  ./redis-server
  527  ps -ef | grep redis
  528  kill -9 6204
  529  kill -9 10661
  530  ps -ef | grep redis
  531  ./redis-server
  532  cd ../
  533  cd /usr/redis/bin
  534  ls
  535  ./redis-server
  536  cd ..
  537  cd /redis-6.2.1/
  538  ls
  539  history
  540  cp redis.cnf /usr/redis/bin/
  541  ll
  542  cp redis.conf /usr/redis/bin/
  543  cd /usr/redis/bin/
  544  ls
  545  ll
  546  vim redis.conf
 

2 后端启动(守护进程启动)

 547  ./redis-server redis.conf
  548  ps -ef |grep redis
  549  ./redis-cli shutdown
  550  ./redis-server redis.conf
  551  ps -ef |grep redis
  552  Configuration loaded
  553   ./redis-cli
  554   ./redis-cli -h 127.0.0.1 -p 6379

你可能感兴趣的:(redis,学习,数据库)