Print
카테고리: [ Development ]
조회수: 21584

1. 개요


2. 다운로드

홈페이지 : https://www.sonatype.com/nexus-repository-oss

wget 다운 링크 : wget http://www.sonatype.org/downloads/nexus-latest-bundle.tar.gz

오늘 기준으로 파일을 다운받고 압축을 풀면 nexus-2.14.14-01 디렉토리가 생긴다.


3. 설정

vi ./conf/nexus.properties 로 설정파일을 열어 포트나 기본적인 설정 사항을 변경할 수 있다.

예를 들어 포트를 8081에서 18081로 변경할 수 있음.


4. 실행

bin 디렉토리 아래에 nexus 파일이 있다.

$ ./nexus start
Starting Nexus OSS...
Started Nexus OSS.

실행을 하고나면 ps 명령어로 확인 가능하다.

$ ps -ef | grep nexus
ubuntu     565     1  0 05:47 ?        00:00:00 /home/ubuntu/nexus-2.14.14-01/bin/../bin/jsw/linux-x86-64/wrapper /home/ubuntu/nexus-2.14.14-01/bin/../bin/jsw/conf/wrapper.conf wrapper.syslog.ident=nexus wrapper.pidfile=/home/ubuntu/nexus-2.14.14-01/bin/../bin/jsw/linux-x86-64/nexus.pid wrapper.daemonize=TRUE
ubuntu     576  1250  0 05:47 pts/0    00:00:00 grep nexus

로그는 logs/wrapper.log 파일에 기록된다. 다음은 잘 실행되었을 때의 로그이다.

jvm 1    | 2019-10-07 06:18:47,425+0000 INFO  [ar-7-thread-4] *TASK org.sonatype.nexus.proxy.storage.remote.httpclient.HttpClientRemoteStorage - Initializing remote transport for proxy repository "Apache Snapshots" [id=apache-snapshots]...
jvm 1    | 2019-10-07 06:18:47,501+0000 INFO  [jetty-main-1]  org.sonatype.nexus.rest.NexusApplication_UriMatching - Strict URI matching: true
jvm 1    | 2019-10-07 06:18:47,584+0000 INFO  [ar-7-thread-3] *TASK org.sonatype.nexus.proxy.storage.remote.httpclient.HttpClientRemoteStorage - Initializing remote transport for proxy repository "Central" [id=central]...
jvm 1    | 2019-10-07 06:18:47,765+0000 INFO  [jetty-main-1]  org.sonatype.nexus.configuration.ModelUtils - Loading model /home/ubuntu/sonatype-work/nexus/conf/lvo-plugin.xml
jvm 1    | 2019-10-07 06:18:47,812+0000 INFO  [jetty-main-1]  org.sonatype.nexus.configuration.ModelUtils - Loading model /home/ubuntu/sonatype-work/nexus/conf/ldap.xml
jvm 1    | 2019-10-07 06:18:48,940+0000 INFO  [ar-7-thread-1] *TASK org.sonatype.nexus.proxy.maven.routing.internal.ManagerImpl - Updated and published prefix file of "Public Repositories" [id=public]
jvm 1    | 2019-10-07 06:18:49,707+0000 INFO  [jetty-main-1]  org.sonatype.nexus.webresources.internal.WebResourceServiceImpl - Discovered 1978 resources
jvm 1    | 2019-10-07 06:18:49,709+0000 INFO  [jetty-main-1]  org.sonatype.nexus.webresources.internal.WebResourceServlet - Max-age: 30 days (2592000 seconds)
jvm 1    | 2019-10-07 06:18:49,824+0000 INFO  [jetty-main-1]  org.sonatype.nexus.bootstrap.jetty.InstrumentedSelectChannelConnector - Metrics enabled
jvm 1    | 2019-10-07 06:18:49,974+0000 INFO  [jetty-main-1]  org.eclipse.jetty.server.AbstractConnector - Started InstrumentedSelectChannelConnector@0.0.0.0:18081
jvm 1    | 2019-10-07 06:18:49,976+0000 INFO  [WrapperListener_start_runner]  org.sonatype.nexus.bootstrap.jetty.JettyServer - Started
jvm 1    | 2019-10-07 06:18:49,976+0000 INFO  [jetty-main-1]  org.sonatype.nexus.bootstrap.jetty.JettyServer - Running

만약 java가 안깔려있거나 java가 PATH에 없거나 다른 문제가 있다면 이런 에러가 생길 수도 있다.

wrapper  | --> Wrapper Started as Daemon
wrapper  | Launching a JVM...
wrapper  | Unable to start JVM: No such file or directory (2)
wrapper  | JVM exited while loading the application.
wrapper  | Reloading Wrapper configuration...
wrapper  | Launching a JVM...
wrapper  | Unable to start JVM: No such file or directory (2)
wrapper  | JVM exited while loading the application.
jvm 2    | wrapper  | Unable to start JVM: No such file or directory (2)
wrapper  | Reloading Wrapper configuration...
wrapper  | Launching a JVM...
wrapper  | Unable to start JVM: No such file or directory (2)
wrapper  | JVM exited while loading the application.
jvm 3    | wrapper  | Unable to start JVM: No such file or directory (2)
wrapper  | Reloading Wrapper configuration...
wrapper  | Launching a JVM...
wrapper  | Unable to start JVM: No such file or directory (2)
wrapper  | JVM exited while loading the application.
jvm 4    | wrapper  | Unable to start JVM: No such file or directory (2)
wrapper  | Reloading Wrapper configuration...
wrapper  | Launching a JVM...
wrapper  | Unable to start JVM: No such file or directory (2)
wrapper  | JVM exited while loading the application.
jvm 5    | wrapper  | Unable to start JVM: No such file or directory (2)
wrapper  | There were 5 failed launches in a row, each lasting less than 300 seconds.  Giving up.
wrapper  |   There may be a configuration problem: please check the logs.
wrapper  | <-- wrapper="" pre="">

5. 접속

브라우저로 접속한다. 기본적으로는 /nexus를 붙여서 접속해야 한다. 예를 들면 http://192.168.100.100:18081/nexus 처럼 말이다.

로그인은 우측 상단의 Log In을 클릭한다. admin 기본 접속 정보는 admin/admin123 이다.


6. Browse Index