이 페이지의 이전 버전을 보고 있습니다. 현재 버전 보기.

현재와 비교 페이지 이력 보기

« 이전 버전 6 다음 »

  • Nexus Repository 란 ? maven에서 사용할 수 있는 오픈소스 repository

Vagrant + CentOS 7에서 Nexus Repository Server 설치

Vagrant 접속

  • Vagrant로 VM VirtualBox를 실행하려면, Windows command 창에 vagrant up 명령어 실행 후 vagrant ssh 명령어로 shell 을 실행합니다.
  • (Vagrant Provision을 사용해도 되지만 설치 과정에서 에러가 생길 수 있어서 shell로 접속하여 설치하는게 안전합니다)

패키지 다운로드

# nexus repository 패키지 설치
$ wget install https://download.sonatype.com/nexus/3/latest-unix.tar.gz   --no-check-certificate
# 설치 후 압축 해제
$ tar -xvf latest-unix.tar.gz
# 압축 해제한 파일을 /opt 디렉토리 밑에 옮김
$ sudo mv nexus-3.29.2-02 /opt/

설치 후 기본 설정

  • 설치 후 nexus-default.properties 파일을 편집모드로 열어 application-port=8089 부분의 포트를 변경합니다. (보통 8080 으로 설정합니다)
$ cd /opt/nexus-3.29.2-02/etc  
$ sudo vi nexus-default.properties

image

  • 계정과 그룹을 생성합니다. 
$ sudo groupadd nexus && adduser nexus -g nexus

서비스 등록

  • 서비스 등록에는 많은 방법이 있는데 저는 systemd를 이용하는 방식을 사용하였습니다.
  • 서비스 등록은 https://help.sonatype.com/repomanager3/installation/run-as-a-service 을 참고하시면 자세히 나와있습니다.
  • nexus.service를 편집기로 열어 다음의 내용을 작성합니다. (저는 vagrant 계정이 기본으로 되어있어 vagrant로 설정하였습니다.)
편집기 명령어
$ sudo vi /etc/systemd/system/nexus.service
nexus.service
[Unit]252C
Description=nexus service
After=network.target

[Service]
Type=forking
LimitNOFILE=65536
ExecStart=/opt/nexus-3.29.2-02/bin/nexus start
ExecStop=/opt/nexus-3.29.2-02/bin/nexus stop
User=root
Restart=on-abort
TimeoutSec=600

[Install]
WantedBy=multi-user.target
  • 이후 다음의 명령어들을 실행하여 재시작시 실행되도록 설정합니다.
service 등록
sudo systemctl daemon-reload
sudo systemctl enable nexus.service
sudo systemctl start nexus.service
  • log는 tail -f /opt/sonatype-work/nexus3/log/nexus.log 명령어로 확인할 수 있습니다.
  • 마지막으로 다음의 화면이 나오면 Nexus 서버 접속에 성공한 것입니다!

브라우저 접속

image



  • 레이블 없음