Installing and Running with the Distribution Archive
The distribution archives combine the application and all required resources in an archive file. Extracting the files will result in an application directory and a data directory, further details about the folder structure and their contents can be found in Directories.
Linux
The downloaded GZip’d TAR archive can be extracted with the command tar xvzf
. For production, it is a common practice is to use /opt
.
tar -zxvf nexus.tgz /opt/nexus
Running Repository Manager in the Foreground
To start the repository manager from the application directory in the bin folder on a Unix-like platform like Linux use:
./nexus run
Starting the repository manager with the run command will leave it running in the current shell and display the log output. The running application can be stopped using CTRL+C
at the appropriate console.
The application can be accessed once the log shows the message "Started Sonatype Nexus."
Running Repository Manager in the Background
The nexus script can be used to manage the repository manager as a background application on OSX and Unix with the start
, stop
, restart
, force-reload
, and status
commands.
To start the repository manager and run it in the background:
./nexus start
To stop the repository manager from running in the background:
./nexus stop
Windows
The zip archive can be unpacked using the Windows compression utility. Nexus Repository Manager should not be installed in the Program Files directory to avoid problems with Windows file registry virtualization. If you plan to run the repository manager as a specific user you can install it into the AppData\Local
directory of that user's home directory. Otherwise simply use e.g., C:\nexus
or something similar, ensuring that the user running the application has full access. The Nexus Repository Manager executable nexus.exe
can be found inside the bin
directory and can be run as an application using the following command:
nexus.exe /run
Starting the repository manager with the run command will leave it running in the current shell and display the log output. The application can be accessed once the log shows the message "Started Sonatype Nexus"
. The running application can be stopped using CTRL+C
at the appropriate console.
The nexus.exe
executable can be used to manage the repository manager as a service with the /start
, /stop
, /restart
, /force-reload
, and /status
commands.
Docker
You can create a container that supports the installation of Nexus Repository Manager Pro and Nexus Repository Manager OSS.
To run, binding the exposed port 8081
to the host, use:
$ docker run -d -p 8081:8081 --name nexus sonatype/nexus3
When stopping, be sure to allow sufficient time for the databases to fully shut down.
docker stop --time=120 <CONTAINER_NAME>
To test:
$ curl http://localhost:8081/
Building the Sonatype Nexus Repository image
To build a docker image from the Dockerfile you can use this command:
$ docker build --rm=true --tag=sonatype/nexus3 .
The following optional variables can be used when building the image:
NEXUS_VERSION
: Version of the Sonatype Nexus Repository
NEXUS_DOWNLOAD_URL
: Download URL for Sonatype Nexus Repository, an alternative to using NEXUS_VERSION
to download from Sonatype
NEXUS_DOWNLOAD_SHA256_HASH
: Sha256 checksum for the downloaded Sonatype Nexus Repository archive. Required if NEXUS_VERSION
or NEXUS_DOWNLOAD_URL
is provided.
Ref: https://help.sonatype.com/repomanager3/installation-and-upgrades/installation-methods
Top comments (0)