Nexusをインストールする
Nexusとは?
https://www.sonatype.com/nexus-repository-sonatype
Nexusはsonatype社が開発しているリポジトリ管理用ソフトウェアで、
Java(Maven)、Python(pypi)、Node.js(npm)等のライブラリ、yum、aptなどのパッケージについて
独自リポジトリを作成することが出来る。
プライベートリポジトリを作成し、独自開発したライブラリ・パッケージを共有したり、
プロキシリポジトリを作成し、インターネット上に存在するライブラリ・パッケージをキャッシュしておく使い方が出来る。
Nexusのインストール手順
Nexusの取得
https://help.sonatype.com/repomanager3/download
または
https://help.sonatype.com/repomanager3/download/download-archives---repository-manager-3
からアーカイブをダウンロードする
Javaのインストール
実行ユーザーの作成(CentOS・Ubuntuの場合)
groupadd nexus
useradd nexus -g nexus
Nexusの展開
CentOS・Ubuntuの場合
wget http://download.sonatype.com/nexus/3/nexus-3.18.1-01-unix.tar.gz
tar -xf nexus-3.18.1-01-unix.tar.gz
chown nexus:nexus nexus-3.18.1-01 -R
chown nexus:nexus sonatype-work -R
Windowsの場合
ダウンロードした nexus-3.18.1-01-win64.zip を展開し、以下のコマンドを実行する
./3.18.1-01/bin/nexus.exe /install
Nexus実行ユーザーの設定
CentOS・Ubuntuの場合
./nexus-3.18.1-01/bin/nexus.rc
に以下を追加
run_as_user="nexus"
Nexusの起動・停止
CentOS・Ubuntuの場合
起動
./nexus-3.18.1-01/bin/nexus start
停止
./nexus-3.18.1-01/bin/nexus stop
Windowsの場合
起動
./nexus-3.18.1-01/bin/nexus.exe /start
停止
./nexus-3.18.1-01/bin/nexus.exe /stop
Nexusにアクセス
URL
http://your host:8081
管理者アカウント
Username: admin
Password: admin123