1. golangプライベートサーバー構成
(1.)コードをダウンロードする
git clone https://github.com/gomods/athens
cd github.com/gomods/athens/
(2.)環境のセットアップ
export GO111MODULE=on
export GOPROXY="https://proxy.golang.org"
(3.)バイナリをコンパイルする
make build-ver VERSION="0.2.0"
(4.)検証
./athens -version
(5.)構成ファイルを変更して開始
vim config
StorageType = "disk"
[Storage.Disk]
# RootPath is the Athens Disk Root folder
# Env override: ATHENS_DISK_STORAGE_ROOT
RootPath = "/root/athens/disk"
//启动
./athens -config_file=./config.dev.toml &
(6.)プロキシを設定する
//export GOPROXY=http://127.0.0.1:3000
export GOPROXY=http://localhost:3000 && go get module@v1
関連リンク
Athena公式ウェブサイト
アテネプライベートウェアハウスのインストール
Athenaプライベートサーバービルド
プライベートサーバービルド
nexus3ビルドgolangプライベートサーバー