Here are the steps followed while upgrading Sonatype nexus server from 1.5 to 1.6 version in Linux server (RHEL)
1) Stop the nexus service
service nexus stop
2) Copy the nexus 1.6.0 package to previously installed directory
cp nexus-oss-webapp-1.6.0-bundle.tar.gz /usr/local
3) Extract nexus 1.6.0 package in a temp directory
cd /usr/local/temp
tar xvf ../nexus-oss-webapp-1.6.0-bundle.tar.gz
4) Copy nexus-oss-webapp-1.6.0 directory to installation directory
mv /usr/local/temp/nexus-oss-webapp-1.6.0 /usr/local
5) Change ownership to the Unix user account nexus was running
chown -R nexus:nexus nexus-oss-webapp-1.6.0
6) Create a softlink to the new nexus installation source directory
ln -s nexus-oss-webapp-1.6.0 nexus
7) There are some changes in 'nexus' script and location of wrapper.conf. Hence we need to replace the previously installed /etc/init.d/nexus script
diff nexus/bin/jsw/linux-x86-64/nexus /etc/init.d/nexus
mv /etc/init.d/nexus /etc/init.d/nexus.old
cp nexus/bin/jsw/linux-x86-64/nexus /etc/init.d/nexus
8) If you have made changes in old /etc/init.d/nexus script, restore it to the new script
The notable change is the WRAPPER_CONF location got changed in 1.6 version. Hence correct path needs to be defined in /etc/init.d/nexus script
For example, in our setup, we made these changes in old script, which is transferred to new script
vi nexus
#USER DEFINED VARIABLES
NEXUS_HOME=/usr/local/nexus
PLATFORM="linux-x86-64"
JAVA_HOME=/usr/local/jdk1.6.0_27
PATH="${JAVA_HOME}/bin:$PATH"
# Wrapper
WRAPPER_CMD="${NEXUS_HOME}/bin/jsw/${PLATFORM}/wrapper"
WRAPPER_CONF="${NEXUS_HOME}/bin/jsw/conf/wrapper.conf"
# Location of the pid file.
PIDDIR="/var/run"
#RUN_AS_USER=
RUN_AS_USER=nexus
9) If you have changed the nexus storage location from the default /usr/local/sonatype-work or default tcp port, then make sure you update this path in the file nexus/conf/plexus.properties
nexus-work=/export/nexus/sonatype-work/nexus
application-port=8081
service nexus start
No comments:
Post a Comment