- Stop the patch server:
# patchsvr stop
- On the patch server:
# cd /var/sadm/spool
# rm patchsvr/*
# rm cache/xml/*
# rm cache/updatemanager/analysis.results/*
# rm cache/entitlement/*
# rm cache/Database/*
# rm cache/collection/*
# rm cache/category/*
# rm cache/*detectors*
- On the patch client:
# cd /var/sadm/spool
# rm cache/xml/*
# rm cache/updatemanager/analysis.results/*
# rm cache/entitlement/*
# rm cache/Database/*
# rm cache/*detectors*
- Start the patch server:
# patchsvr start
- Rebuild server cache first, then the client's:
(run the following command on the server, then on the client)
# smpatch analyze
Personal notes and recipes, views and opinions.
If it must run, it runs on Solaris!
Showing posts with label patchsvr. Show all posts
Showing posts with label patchsvr. Show all posts
Monday, July 16, 2012
Solaris 10 update cache cleanup
To cleanup the update cache of patchsvr and/or smpatch perform the following:
Solaris 10 registration
Registration with an adequate MOS credential is important to get patches.
Particularly, smpatch and patchsvr won't work if the system is not registered.
Make sure to have a properly configured Internet connection and DNS resolution.
There are many hard to pinpoint possibilities that may cause a registration attempt to fail.
For the latest details check My Oracle Support website and consider the following hints:
IMPORTANT
As for Solaris 10 Update 11 (aka 1/13) sconadm has been removed.
To register such new systems a cool hack has been recently indisclosed.
Perhaps (I haven't tested) it may help register other boxes too (U9 and U10).
s10-u10# cd /var/cc-ccr
s10-u10# tar cvf /tmp/cc-ccr.tar .
s10-u10# scp /tmp/cc-ccr.tar s10-u11:/tmp
s10-u10# rm -r /tmp/cc-ccr.tar
s10-u11# cd /var/cc-ccr
s10-u11# tar /tmp/cc-ccr.tar
s10-u11# rm -r /tmp/cc-ccr.tar
Note: Unfortunately patchsvr may not work either due to latest U10 Tomcat updates.
Particularly, smpatch and patchsvr won't work if the system is not registered.
Make sure to have a properly configured Internet connection and DNS resolution.
There are many hard to pinpoint possibilities that may cause a registration attempt to fail.
For the latest details check My Oracle Support website and consider the following hints:
- Make sure to have at least, patches:
(with something such as $ showrev -p | grep 99999 | cut -c 1-17)
SPARC: 121118-19, 123005-09, 124171-08, 123630-04, 123893-25
X86: 121119-19, 123006-09, 124187-08, 123631-04, 123896-25
- Install required patches, beginning by the Common Agent Container:
# cacaoadm stop
# patchadd 123896-XX
# cacaoadm start
# patchadd 121119-XX
# patchadd 123006-XX
...
- Make sure registration database is clean:
# cacaoadm stop
# rm /var/scn/persistence/SCN*
# /usr/lib/cc-ccr/bin/eraseCCRRepository
# cacaoadm start
- Edit registration profile, setting MOS credentials and proxy information only:
# REG_FILE=RegistrationProfile.properties
# cp /usr/lib/breg/data/$REG_FILE /tmp
# vi /tmp/$REG_FILE
- Perform the registration:
# sconadm proxy -r /tmp/$REG_FILE
# sconadm register -a -r /tmp/$REG_FILE
- Adjust the patch source (and proxy, if needed):
# smpatch set patchpro.patch.source=https://updates.oracle.com/
# smpatch set patchpro.proxy.host=proxy-1
# smpatch set patchpro.proxy.port=8080
# smaptch set patchpro.proxy.user
# smpatch set patchpro.proxy.passwd
- For testing, attempt an update operation.
IMPORTANT
As for Solaris 10 Update 11 (aka 1/13) sconadm has been removed.
To register such new systems a cool hack has been recently indisclosed.
Perhaps (I haven't tested) it may help register other boxes too (U9 and U10).
s10-u10# cd /var/cc-ccr
s10-u10# tar cvf /tmp/cc-ccr.tar .
s10-u10# scp /tmp/cc-ccr.tar s10-u11:/tmp
s10-u10# rm -r /tmp/cc-ccr.tar
s10-u11# cd /var/cc-ccr
s10-u11# tar /tmp/cc-ccr.tar
s10-u11# rm -r /tmp/cc-ccr.tar
Note: Unfortunately patchsvr may not work either due to latest U10 Tomcat updates.
Saturday, July 14, 2012
Solaris 10 patchsvr configuration
The Sun Update Connection Proxy is commonly called "Patch Server" or LPS.
To take advantage of patchsvr make sure you have at least patch 119788-11 / 119789-11.
IMPORTANT
Don't ever install patch 148150-03 or newer on the patchsvr host!
The patch will remove Tomcat 4 which will break patchsvr.
Optionally, point the repository cache to a different location:
Make sure the patch source URL is up-to-date:
# patchsvr setup -p https://updates.oracle.com/
If behind a proxy/firewall:
Check configurations:
Start and enable boot-time startup:
Check that only one instance is running, otherwise kill them all and start over.
On the patchsvr machine, also configure smpatch to point directly to Oracle.
That is, use patchpro.patch.source=https://updates.oracle.com/
If you ever need to clear the cache due to client reconfiguration:
# patchsvr stop
# cd /var/sadm/spool
# rm patchsvr/* (or the actual path to repository cache, if changed)
# rm cache/xml/*
# rm cache/updatemanager/analysis.results/*
# rm cache/entitlement/*
# rm cache/Database/*
# rm cache/collection/*
# rm cache/category/*
# rm cache/*detectors*
To take advantage of patchsvr make sure you have at least patch 119788-11 / 119789-11.
IMPORTANT
Don't ever install patch 148150-03 or newer on the patchsvr host!
The patch will remove Tomcat 4 which will break patchsvr.
Optionally, point the repository cache to a different location:
# zfs create -o mountpoint=/patchsvr data/patchsvr
# patchsvr setup -c /patchsvr
Make sure the patch source URL is up-to-date:
# patchsvr setup -p https://updates.oracle.com/
If behind a proxy/firewall:
# patchsvr setup -x proxy-1:8080
# (umask 77; vi /tmp/proxy_password)
# patchsvr setup -u proxy_user -s /tmp/proxy_password
# rm /tmp/proxy_passwordCheck configurations:
# patchsvr setup -l
Start and enable boot-time startup:
# patchsvr start
# patchsvr enable Check that only one instance is running, otherwise kill them all and start over.
# /usr/ucb/ps -auxwww | grep java | grep ccr
... On the patchsvr machine, also configure smpatch to point directly to Oracle.
That is, use patchpro.patch.source=https://updates.oracle.com/
If you ever need to clear the cache due to client reconfiguration:
# patchsvr stop
# cd /var/sadm/spool
# rm patchsvr/* (or the actual path to repository cache, if changed)
# rm cache/xml/*
# rm cache/updatemanager/analysis.results/*
# rm cache/entitlement/*
# rm cache/Database/*
# rm cache/collection/*
# rm cache/category/*
# rm cache/*detectors*
Friday, July 13, 2012
Solaris 10 patchsvr
The patchsvr is an important complement to smpatch.
It's not a repository of patches, but a centralized update proxy and site local cache.
The benefits are:
There's no control of multiple patch versions or point-in-time patches.
IMPORTANT
Unfortunately patchsvr is broken since one latest Tomcat update in Solaris 10 U10.
At least by the release of Solaris 10 U11 no solution is available.
It's not a repository of patches, but a centralized update proxy and site local cache.
The benefits are:
- Patches are downloaded and cached so later requests are served much faster.
- The cache also preserves the Internet uplink (no redundant downloads).
- Internal servers never access the Internet (they entirely rely on patchsvr).
- It's built-in with few requirements, but disk space for the downloaded patches.
- It can serve both SPARC and X86 architectures.
There's no control of multiple patch versions or point-in-time patches.
IMPORTANT
Unfortunately patchsvr is broken since one latest Tomcat update in Solaris 10 U10.
At least by the release of Solaris 10 U11 no solution is available.
Subscribe to:
Posts (Atom)