Posts Tagged ‘solaris’

Centrify Installation & Configuration on Solaris plus required Patch Installation

#!/bin/bash
 
CENTRIFY_SW_TARBALL="centrify-suite-2011-sol8.tgz"
CENTRIFY_AD_SERVER="AD-SERVER.SUB.DOMAIN.COM"
CENTRIFY_AD_DOMAIN="AD-DOMAIN.local"
CENTRIFY_AD_JOINER_USER="JOINER-ACCOUNT"
CENTRIFY_AD_JOINER_PASS="JOINER-PASSWORD"
MOS_USERNAME="someuser@somedomain.com"
MOS_PASSWORD="somepassword"
CLIENT_JOIN_NAME="`hostname`"
 
id | grep uid=0 > /dev/null
if [ "$?" != "0" ]; then
    echo ERROR: Only the superuser can run this script.
    echo Exiting ...
    exit 1
fi
 
if [ ! -d /root ]; then
    printf "creating /root directory\n"
    mkdir /root
fi
 
if [ -d /root ]; then
    cd /root
    mkdir centrify
    cd centrify
    wget http://WEBSERVER/centrify/${CENTRIFY_SW_TARBALL}
    gtar xvfz ${CENTRIFY_SW_TARBALL}
fi
 
# check for patches 119254-65 and 138263-03
showrev -p | grep 119254-65
if [ "$?" != "0" ]; then
    wget --http-user="${MOS_USERNAME}" \
	--http-passwd="${MOS_PASSWORD}" \
        --no-check-certificate \
        "https://getupdates.oracle.com/all_unsigned/119254-65.zip" \
	-O /tmp/119254-65.zip
 
    cd /tmp
    mkdir a
    cd a
    unzip -x /tmp/119254-65.zip
    patchadd 119254-65
fi
 
showrev -p | grep 138263-03
if [ "$?" != "0" ]; then
    wget --http-user="${MOS_USERNAME}" \
        --http-passwd="${MOS_PASSWORD}" \
        --no-check-certificate \
        "https://getupdates.oracle.com/all_unsigned/138263-03.zip" \
	-O /tmp/138263-03.zip
 
    cd /tmp
    mkdir b
    cd b
    unzip -x /tmp/138263-03.zip
    patchadd 138263-03
fi
 
if [ -f /root/centrify/install-express.sh ]; then
    printf "kicking off non-interactive install\n"
    cd /root/centrify
    ./install-express.sh -n --express
fi
 
if [ -f /usr/sbin/adjoin ]; then
    # for standard edition+ only. does not work with express
    # /usr/sbin/adjoin --selfserve --name ${CLIENT_JOIN_NAME} --server ${CENTRIFY_AD_SERVER} --force ${CENTRIFY_AD_DOMAIN}
    # express method
    /usr/sbin/adjoin -w -u ${CENTRIFY_AD_JOINER_USER} -p ${CENTRIFY_AD_JOINER_PASS} ${CENTRIFY_AD_DOMAIN}
 
    if [ "$?" = "0" ]; then
        /usr/bin/adinfo
    fi
fi
Posted: March 25th, 2011
Categories: ad, centrify, directory services, solaris
Tags: , , , ,
Comments: No Comments.

Install Solaris Patches with PCA

 
#!/bin/bash
 
MOS_USERNAME="somebody@domadomain"
MOS_PASSWORD="somepassword"
 
if [ ! -d /root/pca ]; then
    printf "creating /root/pca working directory\n"
    mkdir -p /root/pca /root/pca/bin /root/pca/var
fi
 
if [ -d /root/pca ]; then
    cd /root/pca
    wget --http-user="${MOS_USERNAME}" \
    --http-passwd="${MOS_PASSWORD}" \
    --no-check-certificate \
    "https://getupdates.oracle.com/reports/patchdiag.xref" \
    -O /root/pca/var/patchdiag.xref
fi
 
if [ ! -f /root/pca/bin/pca ]; then
    cd /root/pca/bin
    wget http://www.par.univie.ac.at/solaris/pca/stable/pca
    chmod +x pca
fi
 
# List patches we need to install
if [ -f /root/pca/bin/pca ]; then
    cd /root/pca/bin
    ./pca -l -X /root/pca/var
fi
 
# Install the patches automaGically
if [ -f /root/pca/bin/pca ]; then
    cd /root/pca/bin
    # global
    ./pca -l -X /root/pca/var -i --user="${MOS_USERNAME}" --passwd="${MOS_PASSWORD}"
    # current zone only
    #./pca -l -X /root/pca/var -i -G --user="${MOS_USERNAME}" --passwd="${MOS_PASSWORD}"
fi
Posted: March 23rd, 2011
Categories: os, servers, solaris, sun
Tags: ,
Comments: No Comments.

Download Solaris Patches directly from Oracle Support

#!/bin/bash                                                                                        
 
MOS_USERNAME="somebody@somedomain.com"
MOS_PASSWORD="somepassword"
 
MOS_PATCH="PATCHID-XX"
 
wget --http-user="${MOS_USERNAME}" \
--http-passwd="${MOS_PASSWORD}" \
--no-check-certificate \
"https://getupdates.oracle.com/all_unsigned/${MOS_PATCH}.zip" \
-O /somewhere/${MOS_PATCH}.zip
Posted: March 23rd, 2011
Categories: os, solaris
Tags: , ,
Comments: No Comments.

Sun Solaris 10 Release with Month & Year

Sun Solaris 10 has been around for over four years now. Over this period of time, Sun has released several updates for Solaris 10. It is often confusing to decipher which release “update” is tied to the “month & year” of Solaris 10. Below is a paragraph detailing the Solaris 10 Updates and their month/year.

  1. Solaris 10 – Update 1 – 1/06
  2. Solaris 10 – Update 2 – 6/06
  3. Solaris 10 – Update 3 – 11/06
  4. Solaris 10 – Update 4 – 08/07
  5. Solaris 10 – Update 5 – 05/08
  6. Solaris 10 – Update 6 – 10/08
  7. Solaris 10 – Update 7 – 05/09
  8. Solaris 10 – Update 8 – 10/09

Type `cat /etc/release` to figure out which OS release the server is currently running.

Remember, applying the latest patch cluster set to Solaris does not mean Solaris now has new features included with the latest OS release.

For example, if you want the newest features in Solaris 10 Update 8, you will need to install Solaris 10 Update 8 not install the latest patch cluster set on your currently running Solaris 10 Update 3 server.

Posted: March 5th, 2010
Categories: os, solaris
Tags: ,
Comments: No Comments.

Disabling the GUI on Solaris 10

Prior to Solaris 10, modifying the initdefault in /etc/inittab would determine if the the GUI was loaded upon boot up. With Solaris 10, execute the following to disable the GUI…

/usr/dt/bin/dtconfig -d
/usr/dt/bin/dtconfig -e
Posted: December 24th, 2009
Categories: os, solaris
Tags:
Comments: No Comments.

Presenting Sun Disks using cfgadm

After creating a new RAID1 volume using raidctl. The disks on the box can be presented to devfs/devices via the cfgadm command.

cfgadm -c configure c0
echo | format
Posted: December 7th, 2009
Categories: os, solaris
Tags: ,
Comments: No Comments.

Correcting Sun Solaris Device Paths

When migrating system disks from the source to target system. The existing device paths may not correspond to the identical hardware devices on the target system.

The device paths can be corrected by booting up into single user mode from the dvd or network boot server.

After booting up int single user mode from the dvd or network boot server, use the devices found as single user to correct the device entries on the Sun Solaris OS. Here are the steps (Example uses the disk c1t0d0):

mount /dev/dsk/c1t0d0s0 /mnt
mv /mnt/etc/path_to_inst /mnt/etc/path_to_inst.orig.113009.bsung
rm -rf /mnt/devices/*
rm -rf /mnt/dev/*
cd /devices; find . -print | cpio -pduVm /mnt/devices
cd /dev; find . -print | cpio -pduVm /mnt/dev
rm /mnt/etc/path_to_inst*
eeprom auto-boot?=true
reboot -- "-s -a -r"

The following Sun document can be used as reference for this scenario – http://sunsolve.sun.com/search/printfriendly.do?assetkey=1-61-204249-1.

Posted: December 3rd, 2009
Categories: os, solaris
Tags:
Comments: No Comments.

Duplicating Sun Solaris OS to Larger Disk

Pre-requisities:
- Hardware Raid1 on target disk
- vtoc is present on target disk

#!/bin/bash
DISK_SOURCE="c1t0d0"
DISK_TARGET="c1t2d0"
SLICE="s0 s3 s4 s6 s7"
BOOT_DISK="/bootdisk"
# begin here
if [ ! -d $BOOT_DISK ]; then
echo "please create /bootdisk to successfully utilize this script"
exit 1;
fi
if [ -d $BOOT_DISK ]; then
echo "starting diskdupe - `date`"
fi
installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/${DISK_TARGET}s0
 
for fs in ${SLICE}
do
newfs /dev/dsk/${DISK_TARGET}${fs} < /dev/null 
mount /dev/dsk/${DISK_TARGET}${fs} /bootdisk 
ufsdump 0f - /dev/dsk/${DISK_SOURCE}${fs} | (cd /bootdisk; ufsrestore rf -) 
#if [ $fs = "s0" ]; then 
#        sed 's/${DISK_SOURCE}/${DISK_TARGET}/g' /etc/vfstab &gt; /bootdisk/etc/vfstab

#fi
umount /bootdisk
done
date

Posted: December 1st, 2009
Categories: solaris
Tags:
Comments: No Comments.

Attaching Solaris Container/Zone

Attaching Solaris Container/Zone

zonecfg -z HOST create -a /container/HOST
zoneadm -z HOST attach -F
zoneadm -z HOST boot
Posted: November 21st, 2009
Categories: os, solaris
Tags:
Comments: No Comments.

Resolving dtlogin fc-cache on Solaris

dtlogin was unable to start up on an Solaris 10 zone. Noticed the following error message:
Executing start method ("/usr/bin/fc-cache")
Method "start" failed due to signal SEGV

Resolved by running the following:
fc-cache --verbose --force
svcadm clear application/font/fc-cache
svcadm restart application/graphical-login/cde-login
Posted: October 7th, 2009
Categories: os, solaris
Tags:
Comments: No Comments.