Solaris/Updates

From Segfault
Jump to: navigation, search

pca

Analyze, download and install patches for Sun Solaris with pca - Patch Check Advanced:

$ mkdir -p /usr/local/{s,}bin
$ wget http://www.par.univie.ac.at/solaris/pca/develop/pca -O /usr/local/sbin/pca
$ chmod 0755 /usr/local/sbin/pca
$ cat ~/.pca 
user=<oracle support user id>
passwd=<oracle support password>
patchurl=https://getupdates.oracle.com/
xrefurl=https://getupdates.oracle.com/reports/
wgetproxy=http://proxy.local:8080/

List missing recommended security patches:

pca --list missingrs

Download, but not install missing recommended security patches:

mkdir patches && cd patches
pca --download missingrs

Install (but not really) and keep missing recommended security patches:

pca --download --install --pretend missingrs

Install and keep missing recommended security patches:

pca --download --install missingrs

After installing all recommended patches, "list missing" still lists missing patches, along with patches where no initial version had been installed. Let's just install missing patches, but only when there is an initial version present:

pca --list missing | awk '/^[0-9]* [0-9][0-9] / {print $1}' | xargs pca --download --install

If you're brave enough, go on and install all missing patches:

pca --download --install missing

If you're listing or downloading patches for a different machine (probably w/o internet access) we should have a current patchdiag.xref and a current explorer of the machine in question ready:

mkdir patches
cp ../patchdiag.xref /tmp
pca --xrefurl=file:/tmp/patchdiag.xref --fromfiles=../explorer.80b1c7c3/ --patchdir=patches/ --download missingrs

Now on the actual machine (with the downloaded patches in patches/ and patchdiag.xref in /tmp) we can start the actual testing/patching:

pca --xrefurl=file:/tmp/patchdiag.xref --patchdir=patches/ --download --pretend missingrs
pca --xrefurl=file:/tmp/patchdiag.xref --patchdir=patches/ --download --install missingrs

With Live Upgrade, pca can be directed to act upon the alternate boot environment:

lumount BE_name
pca --root=/BE_name --install
luumount BE_name

pkg

pkg refresh --full
pkg install -v SUNWipkg
pkg image-update -v

Upgrading the system to the current development version:

pkg set-authority -O http://pkg.opensolaris.org/dev/ opensolaris.org

smpatch

Register our system:

$ cat > /root/registration.properties
userName=<oracle support user id>
password=<oracle support password>
subscriptionKey=
^D

$ chmod 0400 /root/registration.properties
$ /usr/sbin/sconadm register -a -r /root/registration.properties
$ rm /root/registration.properties

Specifying a Web Proxy:

smpatch set patchpro.proxy.host=10.0.0.1 patchpro.proxy.port=3128

Analyzes a system to generate a list of the appropriate updates:

smpatch analyze

Downloads updates from the Sun update server:

smpatch download

Applies updates 119254-76 and 119788-10 to the system:

smpatch add -i 119254-76 -i 119788-10
smpatch add -b altboot 119254-76                        # Adds 119254-76 to the BE altboot

Updates local system by applying all appropriate updates:

smpatch update -L
smpatch update -L -b altboot            # performs an update on the BE altboot

Patchsets

Download and install the according patchsets:

unzip 10_Recommended.zip
cd 10_Recommended*
./install_cluster

Links