

Add the following contents, then save the file in the /etc/systemd/system/ directory: Īctivate the service with the following commands: sudo systemctl daemon-reloadĪfter starting the service for any Linux-based operating systems, verify that the service started successfully. This example is a script that uses systemd to run the repository manager service. In the second line you will run a default priority to add the nexus service before starting it. This example uses update-rc.d, a tool similar to the chkconfig.

Then the service command starts the repository manager. The third command adds nexus to run-levels 3, 4 and 5. chkconfig manages the symbolic links in /etc/rc.d which control the services to be started and stopped when the operating system restarts or transitions between run-levels. The second command adds nexus as a service to be started and stopped with the command. Run these commands to activate the service: cd /etc/init.d This example uses chkconfig, a tool that targets the initscripts in init.d to run the nexus service. Symlink $installdir/bin/nexus to /etc/init.d/nexus: sudo ln -s /opt/nexus-3.15.2-01/bin/nexus /etc/init.d/nexusĪdjust the location (shown above as "/opt/nexus-3.15.2-01'") as needed for your installation location. In bin/nexus.rc assign the user between the quotes in the line below: run_as_user="nexus" Then create a nexus user with sufficient access rights to run the service. Before running the service configure an absolute path for your repository manager files. They are, essentially, initscripts that load commands to manage the repository manager daemon.

Both are startup frameworks used in Linux-based systems such as Ubuntu and CentOS. You can configure the repository manager to run as a service with init.d or systemd .
