Thursday, December 20, 2012

How to Install Nexus


This document will describe how to install Nexus Server using  Spacewalk Server 

Part I: Create RHN Satellite Kickstart Profile 
1.       Login to Satellite server and go to Systems > Kickstart 
2.       Click on the ‘base-ks’ profile and then choose “Clone Kickstart 
3.       Enter new Kickstart Label, nexus-ks and click Clone Kickstart 
4.       Go to System Details > Partitioning  and add the following line to create large repo space and click on Update Partitions 
  1. logvol /repo --vgname=rhelvg --name=repoLV --size=256000 
5.       Go to Software > Package Groups and add java-1.6.0-sun.x86_64 then click Update Packages 
6.       Go to Activation Keys and make sure only the Master Key is selected. 
7.       Create a new Script 3  for nexus-ks to install and configure nexus 
  1. Script 3 Contents 
# Add Nexus Server Service Account 
useradd -u XXX -d /home/nexus -p 'f.8yBVFwPwHMI' -c "Nexus Service Account" nexus 
  
# Get Nexus Software 
wget -P /nexus http://spacewalk.mydom.com/sw/nexus-2.1.2-bundle.tar.gz 
  
# untar Nexus into /rep and Change Perms 
tar xvfz /repo/nexus-2.1.2-bundle.tar.gz -C /repo 
ln -s /repo/nexus-2.1.2 /repo/nexus 
  
chown -R nexus.nexus /repo/nexus* 
  
# Copy Startup Config File 
cp -ruv /repo/nexus/bin/nexus /etc/init.d 
chmod a+x /etc/init.d/nexus 
  
# Edit Startup Config File 
MODFILE=/etc/init.d/nexus 
cp -p $MODFILE ${MODFILE}.new 
cat $MODFILE | sed 's:#RUN_AS_USER=:RUN_AS_USER=nexus:1' | sed 's:NEXUS_HOME="..":NEXUS_HOME="/repo/nexus":1' > ${MODFILE}.new 
mv ${MODFILE}.new $MODFILE 
  
# Add Nexus as a Service in RHEL 
chkconfig --add nexus 
chkconfig --levels 2345 nexus on 
  
8.       Update the scripts and verify the nexus-profile is ok 
  
Part II: Install Nexus With Kickstart 
  1. Create a virtual Server with 300gb thin provisioned HD. 
  2. Set to proper VLAN 
  3. Open VM Console and then Power On 
  4. Connect to local ISO for RHEL 6.3 
  5. At boot screen press ESC to get boot prompt 
  6. At boot prompt enter the path to the nexus kickstart file for bare-metal install 
    1. linux  ks=http://spacewalk.mydom.com/ks/cfg/org/1/label/nexus-ks 
  7. Enter the appropriate assigned network information requested during the kickstart pre-install script then wait until installation completes. 
  8. Once complete, ssh into the server as your account and verify you can sudo 
  9. Check that nexus service is running 
    1. service nexus status or psef |grep nexus 
  10. Open browser and go to http://hostname:8081/nexus 
  11. Verify you can login with credentials 
    1. User = admin 
    2. Pass = admin123 

No comments:

Post a Comment