From Segfault
Jump to: navigation, search


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

$ mkdir -p /usr/local/{s,}bin
$ wget -O /usr/local/sbin/pca
$ chmod 0755 /usr/local/sbin/pca
$ cat ~/.pca 
user=<oracle support user id>
passwd=<oracle support password>

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 refresh --full
pkg install -v SUNWipkg
pkg image-update -v

Upgrading the system to the current development version:

pkg set-authority -O


Register our system:

$ cat > /root/
userName=<oracle support user id>
password=<oracle support password>

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

Specifying a Web Proxy:

smpatch set 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


Download and install the according patchsets:

cd 10_Recommended*