codis集群部署

实验步骤
1.下载go安装包,下载codis-3.2.2.zip,添加环境变量
2.解压codis-3.2.2.zip,make编译
3.启动codis,codis-proxy,codis-server,codis-fe
4.通过fe添加group,初始化slot
5.添加Redis实例,在浏览器添加实例
编译:
codis集群部署_第1张图片启动服务:codis集群部署_第2张图片
浏览器上:

codis集群部署_第3张图片

  656  lftp -u westos,westos sftp://172.25.254.38
  657  pwd
  658  cd -
  659  cd /usr/local/mysql/
  660  ls
  661  useradd -s /sbin/nologin -M -d /data/mysql mysql
  662  id mysql
  663  cd support-files/
  664  ls
  665  cp mysql.server /etc/init.d/mysqld
  666  ll /etc/init.d/
  667  mkdir /data/mysql
  668  mkdir /data/mysql -r
  669  mkdir /data/mysql -R
  670  mkdir /data
  671  mkdir /data/mysql
  672  chown mysql.mysql /data/mysql/
  673  ll -d /data/mysql/
  674  ls
  675  find -name my.cnf
  676  cd 
  677  find -name my.cnf
  678  cd mysql-5.7.31/
  679  find -name my.cnf
  680  vim /etc/my.cnf
  681  cd /root/mysql-5.7.31/
  682  cd /usr/local/mysql/bin/
  683  ls
  684  pwd
  685  cd 
  686  cd -
  687  vim .bash_profile 
  688  cd
  689  source
  690  source .bash_profile 
  691  wget https://storage.googleapis.com/golang/go1.8.3.linux-amd64.tar.gz
  692  ls
  693  tar -zxf go1.8.3.linux-amd64.tar.gz 
  694  ls
  695  ll
  696  tar zxf go1.8.3.linux-amd64.tar.gz -C /usr/local/
  697  cd /usr/local/
  698  ls
  699  cd /bin/
  700  ls
  701  pwd
  702  cd ..
  703  cd /usr/local/bin/
  704  ls
  705  ppwd
  706  pwd
  707  vim /.bash_pr
  708  ls
  709  cd ~
  710  ls
  711  ls -A
  712  cd /
  713  ls
  714  ls -A
  715  vim ~/.bash_profile 
  716  cd /usr/local/go/bin/
  717  ls
  718  source ~/.bash_profile 
  719  mkdir -p /usr/local/go/CodisLabs
  720  pwd
  721  cd ../CodisLabs/
  722  ls
  723  cd ~
  724  ls
  725  lftp -u westos,westos sftp://172.25.254.38
  726  ls
  727  cd /usr/local/go/CodisLabs/
  728  unzip ~/codis-3.2.2.zip 
  729  mv ~/codis-3.2.2.zip .
  730  ls
  731  unzip codis-3.2.2.zip 
  732  lftp -u root,westos sftp://172.25.254.38
  733  ls
  734  unzip codis-3.2.2.zip 
  735  ls
  736  mv codis-3.2.2 codis
  737  cd codis
  738  ls
  739  make
  740  ls
  741  codis-dashboard-admin.sh
  742  yum install -y gcc autoconf git
  743  make
  744  make MALLOC=libc
  745  cls
  746  ls
  747  ./admin/codis-dashboard-admin.sh 
  748  ./admin/codis-dashboard-admin.sh  start
  749  cat log
  750  cd log/
  751  ls
  752  cat codis-dashboard.out 
  753  ./admin/codis-dashboard-admin.sh 
  754  cd ..
  755  ls
  756  ./admin/codis-dashboard-admin.sh 
  757  ./admin/codis-dashboard-admin.sh start
  758  cd log/
  759  ls
  760  pwd
  761  cd ..
  762  ls
  763  rm -fr CodisLabs/
  764  mkdir -p src/github.com/CodisLabs
  765  ls ~
  766  cd src/github.com/CodisLabs/
  767  LS
  768  ls
  769  lftp -u root,westos sftp://172.25.254.38
  770  ls
  771  unzip codis-3.2.2.zip 
  772  ls
  773  mv codis-3.2.2 codis
  774  ls
  775  make MALLOC=libc
  776  cd codis
  777  ls
  778  make MALLOC=libc
  779  cd admin/
  780  ls
  781  codis-dashboard-admin.sh start
  782  cd ..
  783  admin/codis-dashboard-admin.sh start
  784  cd log/
  785  ls
  786  cat codis-dashboard.log.2022-01-20 
  787  cd ..
  788  ls
  789  cd admin/
  790  ls
  791  ./codis-proxy-admin.sh start
  792  cd ../log/
  793  ls
  794  cat codis-proxy.log.2022-01-20
  795  cd ..
  796  ls
  797  admin/codis-server-admin.sh start
  798  cat /tmp/redis_6379.log 
  799  admin/codis-fe-admin.sh start
  800  tail -100 log/codis-fe.log.2022-01-20 
  801  history

你可能感兴趣的