go-安装ceph/redis/memcache/mysql等常用模块

基于centos 7 x86_64 ,go14 , 安装go-ceph/mysql/redis/memcached等模块

  1. 安装go-ceph

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    #vim /etc/yum.repo.d/ceph.repo
    [ceph]
    name=Ceph noarch packages
    baseurl=http://mirrors.aliyun.com/ceph/rpm-luminous/el7/x86_64/
    enabled=1
    gpgcheck=1
    type=rpm-md
    gpgkey=http://mirrors.aliyun.com/ceph/keys/release.asc
    [ceph-deploy]
    name=Ceph noarch packages
    baseurl=http://mirrors.aliyun.com/ceph/rpm-luminous/el7/noarch/
    enabled=1
    gpgcheck=1
    type=rpm-md
    gpgkey=http://mirrors.aliyun.com/ceph/keys/release.asc

    #yum -y install libcephfs-devel librbd-devel librados-devel
    #go get github.com/ceph/go-ceph
    #go get github.com/ceph/go-ceph/rados
  2. 安装redis

    1
    #go get github.com/gomodule/redigo/redis
  1. 安装mysql orm

    1
    #go get github.com/jinzhu/gorm
  1. 安装memcached

    1
    #go get github.com/bradfitz/gomemcache/memcache
  1. 安装openstack sdk gophercloud

    1
    #go get github.com/gophercloud/gophercloud
  2. 安装 配置解析模块 viper

    1
    2
    #export GO111MODULE=on
    #go get "github.com/spf13/viper"