Sysops Notepad

[Linux] Centos 7 Sonatype Nexus Repository 설치하기(1) 본문

업무/etc

[Linux] Centos 7 Sonatype Nexus Repository 설치하기(1)

sysops 2020. 10. 7. 13:22
728x90

# hostnamectl set-hostname nexus

 

# yum update -y

 

# yum -y install java-1.8.0-openjdk java-1.8.0-openjdk-devel

 

# java -version

 

# cd /opt

 

# wget https://download.sonatype.com/nexus/3/latest-unix.tar.gz

 

# tar -xvzf latest-unix.tar.gz

 

# mv nexus-3.20.1-01 nexus

 

# mv sonatype-work nexusdata

 

# useradd --system --no-create-home nexus

 

# chown -R nexus:nexus /opt/nexuschown -R nexus:nexus /opt/nexusdata

 

# vim /opt/nexus/bin/nexus.vmoptions

-Xms2703m
-Xmx2703m
-XX:MaxDirectMemorySize=2703m
-XX:+UnlockDiagnosticVMOptions
-XX:+LogVMOutput
-XX:LogFile=../nexusdata/nexus3/log/jvm.log
-XX:-OmitStackTraceInFastThrow
-Djava.net.preferIPv4Stack=true
-Dkaraf.home=.
-Dkaraf.base=.
-Dkaraf.etc=etc/karaf
-Djava.util.logging.config.file=etc/karaf/java.util.logging.properties
-Dkaraf.data=../nexusdata/nexus3
-Dkaraf.log=../nexusdata/nexus3/log
-Djava.io.tmpdir=../nexusdata/nexus3/tmp
-Dkaraf.startLocalConsole=false

 

# vim /opt/nexus/bin/nexus.rc

run_as_user="nexus"

 

# vim /opt/nexus/etc/nexus-default.properties

-> Change application-host=0.0.0.0 to application-host=127.0.0.1.

 

# vim /etc/security/limits.conf

...

nexus - nofile 65536

 

# vim /etc/systemd/system/nexus.service

[Unit]
Description=Nexus Service
After=syslog.target network.target

[Service]
Type=forking
LimitNOFILE=65536
ExecStart=/opt/nexus/bin/nexus start
ExecStop=/opt/nexus/bin/nexus stop
User=nexus
Group=nexus
Restart=on-failure

[Install]
WantedBy=multi-user.target

# systemctl daemon-reload

 

# systemctl enable nexus.service

 

# systemctl start nexus.service

  

출처 : www.fosslinux.com/27838/installing-sonatype-nexus-repository-oss-on-centos-7.htm

 

Install Sonatype Nexus Repository OSS on CentOS | FOSS Linux

In this tutorial, we will provide you a comprehensive guide on setting up Sonatype Nexus Repository OSS version on CentOS 7.

www.fosslinux.com

 

 

728x90
Comments