월요일, 5월 27, 2024
HomeLinuxNexus 설치

Nexus 설치

Nexus 설치

1. 사전 설치
.Java 설치 (https://support.sonatype.com/entries/24901442-Sonatype-Nexus-System-Requirements 의 Java 버전별 참조)
. jdk-8u121-linux-x64.tar.gz

   . ~#mkdir -p /usr/lib/jvm
   . ~#tar -zxvf jdk-8u121-linux-x64.tar.gz
   . ~#mv jdk1.8.0_121 /usr/lib/jvm
   . ~#ln -s /usr/lib/jvm/jdk1.8.0_121 /usr/lib/jvm/java
   
    ~#echo "##################################################################################" >> /etc/profile
    ~#echo "#  $WORK_DATE "                                                                     >> /etc/profile
    ~#echo "#  add environment variable "                                                       >> /etc/profile
    ~#echo "##################################################################################" >> /etc/profile
    ~#echo "JAVA_HOME=/usr/lib/jvm/java"                                                        >> /etc/profile
    ~#echo "export JAVA_HOME"                                                                   >> /etc/profile
    ~#echo "PATH=\$JAVA_HOME/bin:\$PATH"                                                        >> /etc/profile
    ~#source /etc/profile
    ~#java -version
      java version "1.8.0_121"
      Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
      Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)

.커널 2.6이상

2. 계정생성 및 nexus 설치 폴더 생성

    ~#adduser nexus  
    ~#mkdir -p /server/tools
    ~#cd /server/tools
    ~#chown -R nexus:nexus /server
    ~#su - nexus

3. Nexus 다운로드
http://www.sonatype.org/nexus/archived/ 버전확인

   ~#wget http://download.sonatype.com/nexus/oss/nexus-2.11.0-bundle.tar.gz   
   ~#tar -zxvf nexus-2.11.0-bundle.tar.gz
   ~#mv nexus-2.11.0-02/ ../
   ~#mv sonatype-work/ ../
   ~#cd ../
   ~#ln -s nexus-2.11.0-02/ nexus

4. 설정 및 구동

   cd nexus
   cd conf/nexus.properties
   vi conf/nexus.properties
    # Jetty section
	# 넥서스 PORT
	application-port=8081
	application-host=0.0.0.0
	nexus-webapp=${bundleBasedir}/nexus
	# 컨텍스트 경로
	nexus-webapp-context-path=/
	# Nexus section
	# 넥서스의 실제 저장소 데이타와 메타 데이타가 저장되는 경로
	nexus-work=${bundleBasedir}/../sonatype-work/nexus 
	runtime=${bundleBasedir}/nexus/WEB-INF
	
	./bin/nexus start
     Starting Nexus OSS...

5. 로그확인
tail -f logs/wrapper.log

6. 접속확인
http://localhost:8081/index.html

7.관리자 암호 변경
http://localhost:8081/index.html 접속후 우측상단 Log In 클릭
(계정 : admin , password : admin123)

Security -> Users
admin 선택후 마우스 우측버튼 팝업 메뉴에서 Set Password를 선택후 암호 변경

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Time limit exceeded. Please complete the captcha once again.

Most Popular