CentOS Nexus 설치

CentOS Nexus 설치

1 사전 작업[ | ]

2 계정 생성[ | ]

  • Nexus를 root로 실행하는 것이 권장되지 않으므로[1] nexus 라는 계정을 만들자.
Console
Copy
[root@zetawiki ~]# useradd nexus
[root@zetawiki ~]# su - nexus
[nexus@zetawiki ~]$

3 다운로드[ | ]

Console
Copy
[nexus@zetawiki ~]$ wget http://www.sonatype.org/downloads/nexus-latest-bundle.tar.gz --no-check-certificate
... (생략)
Length: 73078153 (70M) [application/octet-stream]
Saving to: “nexus-2.14.0-01-bundle.tar.gz”

100%[=================================================>] 73,078,153  2.87M/s   in 23s     

2016-09-21 17:03:50 (3.07 MB/s) - “nexus-2.14.0-01-bundle.tar.gz” saved [73078153/73078153]

[nexus@zetawiki ~]$ ll
total 71368
-rw-rw-r-- 1 nexus nexus 73078153 Sep 21 03:18 nexus-2.14.0-01-bundle.tar.gz

4 압축 해제[ | ]

Console
Copy
[nexus@zetawiki ~]$ tar zxvf nexus-2.14.0-01-bundle.tar.gz
... (생략)
nexus-2.14.0-01/nexus/WEB-INF/plugin-repository/nexus-ruby-plugin-2.14.0-01/nexus-ruby-plugin-2.14.0-01.jar
nexus-2.14.0-01/nexus/WEB-INF/plugin-repository/nexus-ruby-plugin-2.14.0-01/META-INF/
nexus-2.14.0-01/nexus/WEB-INF/plugin-repository/nexus-ruby-plugin-2.14.0-01/META-INF/MANIFEST.MF
[nexus@zetawiki ~]$ ll
total 71376
drwxr-xr-x 8 nexus nexus     4096 Sep 18 04:33 nexus-2.14.0-01
-rw-rw-r-- 1 nexus nexus 73078153 Sep 21 03:18 nexus-2.14.0-01-bundle.tar.gz
drwxr-xr-x 3 nexus nexus     4096 Sep 18 04:44 sonatype-work
[nexus@zetawiki ~]$ exit
logout
[root@zetawiki ~]#

5 서비스 등록·설정[ | ]

Console
Copy
[root@zetawiki ~]# cp /nexus/nexus-2.14.0-01/bin/nexus /etc/init.d/nexus
[root@zetawiki ~]# vi /etc/init.d/nexus
Bash
Copy
#NEXUS_HOME=".."
NEXUS_HOME="/home/nexus/nexus-2.14.0-01"

#RUN_AS_USER=
RUN_AS_USER=nexus

#PIDDIR="."
PIDDIR="/home/nexus"

6 서비스 시작[ | ]

Console
Copy
[root@zetawiki ~]# service nexus start
Starting Nexus OSS...
Started Nexus OSS.

7 확인[ | ]

Console
Copy
[root@zetawiki ~]# ps -ef | grep nexus | grep -v grep
nexus     1199     1  0 17:16 ?        00:00:00 /home/nexus/nexus-2.14.0-01/bin/jsw/linux-x86-64/wrapper /home/nexus/nexus-2.14.0-01/bin/jsw/conf/wrapper.conf wrapper.syslog.ident=nexus wrapper.pidfile=/home/nexus/nexus.pid wrapper.daemonize=TRUE
nexus     1201  1199 83 17:16 ?        00:00:53 java -XX:MaxPermSize=192m -Djava.io.tmpdir=./tmp -Djava.net.preferIPv4Stack=true -Dcom.sun.jndi.ldap.connect.pool.protocol=plain ssl -Xms256m -Xmx768m -Djava.library.path=bin/jsw/lib -classpath bin/jsw/lib/wrapper-3.2.3.jar:./lib/jetty-io-8.1.16.v20140903.jar:./lib/jetty-deploy-8.1.16.v20140903.jar:./lib/metrics-logback-2.2.0.jar:./lib/logback-core-1.1.2.jar:./lib/jetty-webapp-8.1.16.v20140903.jar:./lib/jetty-jmx-8.1.16.v20140903.jar:./lib/jetty-rewrite-8.1.16.v20140903.jar:./lib/slf4j-api-1.7.6.jar:./lib/jetty-client-8.1.16.v20140903.jar:./lib/metrics-jetty-2.2.0.jar:./lib/nexus-bootstrap-2.14.0-01.jar:./lib/jetty-servlet-8.1.16.v20140903.jar:./lib/jetty-util-8.1.16.v20140903.jar:./lib/jetty-http-8.1.16.v20140903.jar:./lib/logback-access-1.1.2.jar:./lib/jetty-xml-8.1.16.v20140903.jar:./lib/logback-classic-1.1.2.jar:./lib/jetty-server-8.1.16.v20140903.jar:./lib/plexus-interpolation-1.16.jar:./lib/jetty-continuation-8.1.16.v20140903.jar:./lib/metrics-core-2.2.0.jar:./lib/jetty-security-8.1.16.v20140903.jar:./lib/javax.servlet-3.0.0.v201112011016.jar:./lib/jul-to-slf4j-1.7.6.jar:./conf/ -Dwrapper.key=nzkUkNDwinJrnuPC -Dwrapper.port=32000 -Dwrapper.jvm.port.min=31000 -Dwrapper.jvm.port.max=31999 -Dwrapper.pid=1199 -Dwrapper.version=3.2.3 -Dwrapper.native_library=wrapper -Dwrapper.service=TRUE -Dwrapper.cpu.timeout=10 -Dwrapper.jvmid=1 org.sonatype.nexus.bootstrap.jsw.JswLauncher ./conf/jetty.xml ./conf/jetty-requestlog.xml
Console
Copy
[root@zetawiki ~]# netstat -tnlp | grep java
tcp        0      0 0.0.0.0:8081                0.0.0.0:*                   LISTEN      1201/java           
tcp        0      0 127.0.0.1:32000             0.0.0.0:*                   LISTEN      1201/java

8 웹 확인[ | ]

9 같이 보기[ | ]

10 참고[ | ]