티스토리 뷰

dev

sonatype 넥서스 설치 방법

TurboC++ 2017. 11. 2. 22:17
728x90

Ι■ 다운로드 URL

https://www.sonatype.com/nexus-repository-oss



Ι■ 실행

./nexus run



Ι■ 기본 접속 계정

admin // admin123



Ι■ 서비스로 등록

Change NEXUS_HOME to the absolute folder location in your .bashrc file, then save.

NEXUS_HOME="/opt/nexus"


In bin/nexus.rc assign the user between the quotes in the line below.

run_as_user="nexus"


If you use init.d instead of systemd, symlink $NEXUS_HOME/bin/nexus to /etc/init.d/nexus:

sudo ln -s $NEXUS_HOME/bin/nexus /etc/init.d/nexus


Running the Service

chkconfig.

This example uses chkconfig, a tool that targets the initscripts in init.d to run the nexus service. Run these commands to activate the service:

cd /etc/init.d

sudo chkconfig --add nexus

sudo chkconfig --levels 345 nexus on

sudo service nexus start



The second command adds nexus as a service to be started and stopped with the command. chkconfigmanages the symbolic links in /etc/rc[0-6].d which control the services to be started and stopped when the operating system restarts or transitions between run-levels. The third command adds nexus to run-levels 3, 4, and 5. Then the service command starts the repository manager.



Ι■ 메이븐으로 라이브러리 업로드

mvn deploy:deploy-file -DgroupId=프로젝트 그룹명 \

  -DartifactId=프로젝트명 \

  -Dversion=1.0.0 \

  -Dpackaging=jar \

  -Dfile=파일경로 \

  -DrepositoryId=nexus\

  -Durl=http://아이피:포트/repository/maven-internal/


댓글