Nexus

Server/CentOS 2013. 5. 11. 00:03

Maven 의 사내 저장소로 사용할 Nexus 구성.

 

 

Installing Nexus

 

# cd /usr/local/src
# wget http://www.sonatype.org/downloads/nexus-latest-bundle.zip
# unzip nexus-2.4.0-09-bundle.zip
# mv nexus-2.4.0-09 /usr/local
# mv sonatype-work /usr/local
# cd /usr/local
# ln -s nexus-2.4.0-09 nexus

 

 

Starting Nexus

 

# cd /usr/local/nexus
# ./bin/nexus start
****************************************
WARNING - NOT RECOMMENDED TO RUN AS ROOT
****************************************
If you insist running as root, then set the environment variable RUN_AS_USER=root before running this script.

 

nexus를 root 권한으로 실행하지 않기를 추천하고 있습니다.
실행하기를 원하는 user 로 소유자를 변경합니다.
이 user 는 JAVA_HOME 과 JAVA_HOME/bin 이 path에 추가되어 있어야 합니다.

 

# cd /usr/local
# chown -R ggamzzak: nexus-2.4.0-09/ sonatype-work/
# su - ggamzzak

 

$ cd /usr/local/nexus
$ ./bin/nexus start
Starting Nexus OSS...
Started Nexus OSS.

 

$ ./bin/nexus status
Nexus OSS is running (23518).

 

$ ./bin/nexus stop
Stopping Nexus OSS...
Stopped Nexus OSS.

 

 

Running as a Service

 

서버 재부팅시 자동 실행하기 위해 서비스에 등록하겠습니다.
부팅시에 root로 서비스가 시작되므로 RUN_AS_USER 변수에 실제 실행될 user 입력이 필요합니다.
동시에 상대경로로 설정되어 있는 NEXUS_HOME 변수도 절대경로로 변경해 줍니다.

 

# cp /usr/local/nexus/bin/nexus /etc/init.d
# cd /etc/init.d/
# vi nexus
NEXUS_HOME="/usr/local/nexus"
RUN_AS_USER=ggamzzak

 

# chkconfig --add nexus
# chkconfig --levels 35 nexus on
# ./nexus start
Starting Nexus OSS...
Started Nexus OSS.

 

서비스가 정상적으로 시작되었으면 웹 브라우저에서 확인합니다.
http://domain:8081/nexus (id: admin / pw: admin123)

 

 

기본 포트는 8081이며, 방화벽 설정을 확인합니다.
다른 포트로 변경을 원할 경우 <NEXUS_HOME>/conf/nexus.properties 파일에서 가능합니다.
nexus에 대한 로그는 <NEXUS_HOME>/logs/wrapper.log 파일입니다.


WRITTEN BY
손가락귀신
정신 못차리면, 벌 받는다.

,