@@ -62,10 +62,11 @@ $ go get -u github.com/tools/godep && which godep |
62 | 62 |
|
63 | 63 | #### 3. 下载 Codis 源代码 |
64 | 64 |
|
65 | | -下载完成后,Codis 源码会出现在 `$GOPATH/src/github.com/CodisLabs/codis` 路径下: |
| 65 | +Codis 源代码需要下载到 `$GOPATH/src/github.com/CodisLabs/codis`: |
66 | 66 |
|
67 | 67 | ```bash |
68 | | -$ go get -u -d github.com/CodisLabs/codis |
| 68 | +$ mkdir -p $GOPATH/src/github.com/CodisLabs |
| 69 | +$ cd $_ && git clone https://github.com/CodisLabs/codis.git -b release3.0 |
69 | 70 | ``` |
70 | 71 |
|
71 | 72 | #### 4. 编译 Codis 源代码 |
@@ -78,14 +79,11 @@ $ cd $GOPATH/src/github.com/CodisLabs/codis |
78 | 79 | $ make |
79 | 80 | make -j -C extern/redis-2.8.21/ |
80 | 81 | ... ... |
81 | | - >>>> godep: Checking dependency ... ... |
82 | | - >>>> godep: Checking dependency ... ... |
83 | | -... ... |
84 | | -godep go build -i -o bin/codis-dashboard ./cmd/dashboard |
85 | | -godep go build -i -o bin/codis-proxy ./cmd/proxy |
86 | | -godep go build -i -o bin/codis-admin ./cmd/admin |
87 | | -godep go build -i -o bin/codis-ha ./cmd/ha |
88 | | -godep go build -i -o bin/codis-fe ./cmd/fe |
| 82 | +go build -i -o bin/codis-dashboard ./cmd/dashboard |
| 83 | +go build -i -o bin/codis-proxy ./cmd/proxy |
| 84 | +go build -i -o bin/codis-admin ./cmd/admin |
| 85 | +go build -i -o bin/codis-ha ./cmd/ha |
| 86 | +go build -i -o bin/codis-fe ./cmd/fe |
89 | 87 |
|
90 | 88 | $ ls bin/ |
91 | 89 | total 69124 |
@@ -97,20 +95,13 @@ drwxr-xr-x 4 codis codis 4096 Jan 4 14:55 assets |
97 | 95 | -rwxr-xr-x 1 codis codis 11057280 Jan 4 14:55 codis-proxy |
98 | 96 | -rwxr-xr-x 1 codis codis 4234432 Jan 4 14:55 codis-server |
99 | 97 | -rw-r--r-- 1 codis codis 148 Jan 4 14:55 version |
| 98 | +... ... |
100 | 99 |
|
101 | 100 | $ cat bin/version |
102 | 101 | version = 2016-01-03 14:53:22 +0800 @51f06ae3b58a256a58f857f590430977638846a3 |
103 | 102 | compile = 2016-01-04 15:00:17 +0800 by go version go1.5.2 linux/amd64 |
104 | 103 | ``` |
105 | 104 |
|
106 | | -#### 网络访问受限 |
107 | | - |
108 | | -1. 在有网络环境的机器上,Codis 源码目录中执行命令 `make godep`; |
109 | | - + 该操作会将 Codis 编译所依赖的第三方源码下载到 `Godeps/_workspace` 目录下; |
110 | | -2. 在目标环境中,按照之前步骤配置好编译环境; |
111 | | - + 离线安装 go 以及 godep 工具; |
112 | | -3. 将处理过的 Codis 目录完整复制到访问受限的服务器的正确的路径下,执行 `make` 进行源码编译。 |
113 | | - |
114 | 105 | #### 离线安装 godep 方法: |
115 | 106 |
|
116 | 107 | 1. 运行 `git clone https://github.com/tools/godep.git` 下载 godep 源码; |
|