How to migrate from Nexus Professional to Nexus OS

2019-06-08 03:34发布

问题:

I want to "downgrade" an installation of Nexus Professional to Nexus OSS. Is it possible? What do I have to do?

回答1:

Yes, it is not a complicated task.

Install Nexus OSS on the same server. Do change the following so that the new Nexus OSS has the same configuration as the existing Nexus Professional runtime.

Configuration

  • port is set in [runtime]/conf/nexus.properties
  • sonatype-work directory location is set in [runtime]/conf/nexus.properties
  • the java command is set in [runtime]/bin/jsw/conf/wrapper.conf
  • the log directory location is set in [runtime]/conf/nexus.properties

Process

  • Stop the Professional
  • Make sure to backup the sonatype-work/nexus/conf directory
  • Remove the professional plugins from sonatype-work/nexus/plugin-repository
  • Add the p2 plugins for OSS to the sonatype-work/nexus/plugin-repository sonatype-work/nexus/conf/nexus.xml
  • Remove procurement repositories references from nexus.xml
  • Remove Scheduled task that use the professional plugins or features from from nexus.xml Note: Those two tasks could have been done from the Nexus Professional UI before stopping it.
  • Remove User-Token-Realm from the sonatype-work/nexus/conf/security-configuration.xml

Start the Nexus OSS

  • start preferably with nexus console instead of nexus start, so it shows more information
  • check the [runtime]/logs/wrapper.log
  • check the sonatype-work-nexus/logs/nexus.log


回答2:

As a note: If your license to Nexus 3 Pro has expired, when you log in to the UI, you cannot access anything in the admin UI. You are only redirected back to the License screen with a stern warning message that you don't have a valid license.

I tried removing all Pro plugins etc as in the earlier answer. Tried finding where the Pro licenser was stored on file - but could not find any documentation from Sonatype of this. I assumed it was stored somewhere in the database.

In my case I worked with an evaluation server, so I removed the whole sonatype-work/nexus3 directory and restarted the nexus server. Even without data, it still claimed to be a Nexus Pro installation.

Finally I found the setting stored in the users home directory, in ~/.java/.userPrefs/com/sonatype of all places.

When that directory was removed/renamed I could start Nexus as a regular OSS.

It's not easy to find this in Sonatypes documentation, but they mention it in some places like: https://support.sonatype.com/hc/en-us/articles/213465018-Every-time-Nexus-is-restarted-it-asks-for-the-license-to-be-installed-