亲宝软件园·资讯

展开

centos7搭建Fabric基础环境

sky_cheng 人气:1

一、首先升级centos最新内核

参考https://www.cnblogs.com/sky-cheng/p/12146054.html

二、卸载旧版本docker

[root@localhost ~]# rpm -qa|grep docker
docker-client-1.13.1-103.git7f2769b.el7.centos.x86_64
docker-common-1.13.1-103.git7f2769b.el7.centos.x86_64
docker-1.13.1-103.git7f2769b.el7.centos.x86_64
[root@localhost ~]# yum remove docker
[root@localhost ~]# yum remove docker-client
[root@localhost ~]# yum remove docker-common

三、安装所需要的包

[root@localhost ~]# yum install -y yum-utils
[root@localhost ~]# yum install -y device-mapper-persistent-data
[root@localhost ~]# yum install -y lvm2

四、添加docker-ce的yum源

[root@localhost ~]# yum-config-manager --add-repo https:/https://img.qb5200.com/download-x/download.docker.com/linux/centoshttps://img.qb5200.com/download-x/docker-ce.repo
已加载插件:fastestmirror
adding repo from: https:/https://img.qb5200.com/download-x/download.docker.com/linux/centoshttps://img.qb5200.com/download-x/docker-ce.repo
grabbing file https:/https://img.qb5200.com/download-x/download.docker.com/linux/centoshttps://img.qb5200.com/download-x/docker-ce.repo to /etc/yum.repos.dhttps://img.qb5200.com/download-x/docker-ce.repo
repo saved to /etc/yum.repos.dhttps://img.qb5200.com/download-x/docker-ce.repo
[root@localhost ~]# 

五、安装docker-ce

root@localhost ~]# yum install -y docker-ce

六、查看版本

[root@localhost ~]# docker version
Client: Docker Engine - Community
 Version:           19.03.5
 API version:       1.40
 Go version:        go1.12.12
 Git commit:        633a0ea
 Built:             Wed Nov 13 07:25:41 2019
 OS/Arch:           linux/amd64
 Experimental:      false
Cannot connect to the Docker daemon at unix:///var/runhttps://img.qb5200.com/download-x/docker.sock. Is the docker daemon running?
[root@localhost ~]# 

七、安装docker-compose

根据github上最新的版本地址 https://github.comhttps://img.qb5200.com/download-x/docker/compose/releases,可以看到当前最新版本的下载地址

[root@localhost docker-compose]# mkdir /usr/local/srchttps://img.qb5200.com/download-x/docker-compose
[root@localhost docker-compose]# cd /usr/local/srchttps://img.qb5200.com/download-x/docker-compose/
[root@localhost docker-compose]# wget https://github.comhttps://img.qb5200.com/download-x/docker/compose/releaseshttps://img.qb5200.com/download-x/download/1.25.1-rc1https://img.qb5200.com/download-x/docker-compose-Linux-x86_64
[root@localhost docker-compose]# mv docker-compose-Linux-x86_64  /usr/local/binhttps://img.qb5200.com/download-x/docker-compose
[root@localhost docker-compose]# chmod +x /usr/local/binhttps://img.qb5200.com/download-x/docker-compose 
[root@localhost docker-compose]# docker-compose version
docker-compose version 1.25.1-rc1, build d92e9bee
docker-py version: 4.1.0
CPython version: 3.7.4
OpenSSL version: OpenSSL 1.1.0l  10 Sep 2019
[root@localhost docker-compose]# 

八、安装go语言环境

[root@localhost docker-compose]# mkdir /usr/local/src/golang
[root@localhost docker-compose]# cd /usr/local/src/golang/
[root@localhost golang]# curl -O https://storage.googleapis.com/golang/go1.9.3.linux-amd64.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  100M  100  100M    0     0  2182k      0  0:00:47  0:00:47 --:--:-- 2162k
[root@localhost golang]# 
[root@localhost golang]# mv go/ /usr/local/
[root@localhost go]# echo "export PATH=$PATH:/usr/local/go/bin" >> /etc/profile
[root@localhost go]# echo "export GOPATH=/opt/gopath" >> /etc/profile
[root@localhost go]# source /etc/profile
[root@localhost go]# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/opthttps://img.qb5200.com/download-x/dell/srvadmin/bin:/opthttps://img.qb5200.com/download-x/dell/srvadmin/sbin:/home/mysql-5.7.26/bin/:/root/bin:/usr/local/go/bin
[root@localhost go]# go version
go version go1.9.3 linux/amd64
[root@localhost go]# 

至此整个Fabric所需的基础环境都已经搭建起来了。

 

加载全部内容

相关教程
猜你喜欢
用户评论