Nexus: Difference between revisions
Jump to navigation
Jump to search
(→CentOS) |
(→Docker) |
||
Line 52: | Line 52: | ||
docker pull sonatype/nexus3:3.22.0 | docker pull sonatype/nexus3:3.22.0 | ||
docker run -d -p 8081:8081 --name nexus sonatype/nexus3:3.22.0 | docker run -d -p 8081:8081 --name nexus sonatype/nexus3:3.22.0 | ||
docker run -d -p 8081:8081 --name nexus -e NEXUS_CONTEXT=nexus sonatype/nexus3:3.22.0 | |||
docker exec -it nexus bash | docker exec -it nexus bash |
Revision as of 06:41, 27 April 2020
scp /Users/chorke/Downloads/nexus-3.22.1-02-unix.tar.gz [email protected]:~
cd /usr/local/
sudo tar -xvzf /home/pi/nexus-3.22.1-02-unix.tar.gz
sudo ln -s nexus-3.22.1-02 nexus
cd nexus/bin/
./nexus status
CentOS
cd /opt; tar -xvzf nexus-3.22.1-02-unix.tar.gz
ln -s /opt/nexus-3.22.1-02 /var/nexus
mkdir /var/sonatype-work
vim /var/nexus/bin/nexus.rc
useradd nexus --shell=/sbin/nologin
chown -R nexus:nexus /var/sonatype-work
chown -R nexus:nexus /var/nexus
vim /var/nexus/bin/nexus.vmoptions
vim /etc/systemd/system/nexus.service
[Unit]
Description=nexus service
After=network.target
[Service]
Type=forking
LimitNOFILE=65536
User=nexus
Group=nexus
ExecStart=/var/nexus/bin/nexus start
ExecStop=/var/nexus/bin/nexus stop
User=nexus
Restart=on-abort
[Install]
WantedBy=multi-user.target
chkconfig nexus on
systemctl enable nexus
systemctl enable nexus.service
systemctl start nexus
Docker
docker pull sonatype/nexus3:3.22.0
docker run -d -p 8081:8081 --name nexus sonatype/nexus3:3.22.0
docker run -d -p 8081:8081 --name nexus -e NEXUS_CONTEXT=nexus sonatype/nexus3:3.22.0
docker exec -it nexus bash
cat /nexus-data/admin.password
exit
docker start nexus
docker stop nexus