when “unzip” in solaris 10 cannot uncompress 10_Recommended.zip

There is a bug for unzip in some versions of solaris 10, when uncompressing the 10_Recommended.zip, it indicates the
file is corrupted.
To overcome this, if you have java installed in the server, you can use jar to uncompress the bundle.
As root do:
# jar xvf 10_Recommended.zip
The files are extracted without the permissions, so fix them
# cd 10_Recommended
# find . -name postpatch -exec chmod 744 {} ;
# find . -name prepatch -exec chmod 744 {} ;
#chmod 755 install_cluster*
And you’re now ready to patch
Thanks to Tim Benoit
66/433

Cron entry to reboot a server the first Sunday of every month

This cannot be expressed in the typical crontab syntax, so we run a script every sunday in the crontab:
00 11 kraftek.html POSTS rescue rescued.html rescued.txt x y z kraftek.html POSTS rescue rescued.html rescued.txt x y z 0 root /scripts/monthlyreboot.ksh > /var/log/rebootlog 2>&1
The script checks if this is the first sunday of the current month, if it is, it performs a reboot, the contents of
/scripts/monthlyreboot.ksh are:
#!/bin/ksh
# get today’s month and year
T=`date +%m” “%Y | sed ‘s/^0//’`
# get this month’s first sunday
S=`cal $T | cut -c 1-2 | sed ‘s/ //g’ | grep . | head -2 | tail -1`
# get what day of the month today is
D=`date +%d | sed ‘s/^0//’`
echo -n “`date` — the day is $D, first sunday of $T is $S”
if [ $D -eq $S ];then
echo “, so we are going to reboot”
sleep 3
/sbin/shutdown -t 00 -r now
else
echo “, no reboot today”
fi

How to know if my linux is running at 64 or 32 bits?

Issue:
# uname -m
i386 or i686 ==> 32 bit
x86_64 ==> 64bit
Netbackup 4.5 linux client not backing up >2Gb files
If you cannot upgrade to netbackup client 5.x or 6.x and you have this error message:
13:33:12.827 [313] <4> bpbkar: INF – Processing /dir/bigfile
13:33:12.836 [313] <8> bpbkar: WRN – Cannot process path /dir/bigfile: Value too lar ge for defined data
type. Skipping.
Please refer to http://seer.support.veritas.com/docs/256923.htm
and install the client version that supports +2Gb file sizes
Linux Client (v2.4) on NBU 4.5FP4
209/433

Apache mod_proxy, to publish your intranet apps without migrating them

Imagine you want to publish a webapp from your intranet, without moving it from your internal server, just adding some
url to your existing external webserver and mapping it to the internal server, that is what mod_proxy does.
http://www.kraftek.com/orca/orcallator/
) , thanx to my vpn and mod_proxy.
First you have to compile apache to have proxy modules and friends:
# ./configure –enable-so –enable-mods-shared=”all proxy proxy_http proxy_ftp proxy_connect headers
deflate mod_deflate mod_ssl”
# make && make install
Get mod_proxy_html from http://apache.webthing.com/mod_proxy_html/, and build it into apache
# /usr/local/apache2/bin/apxs -c -I/usr/include/libxml2 -i mod_proxy_html.c
Edit your httpd.conf and, in my case, to map orca’s directory, I wrote this:
ProxyRequests off
ProxyPass /orca/ http://dell/orca/
<Location /orca/>
ProxyPassReverse /
SetOutputFilter proxy-html
ProxyHTMLURLMap / /orca/
ProxyHTMLURLMap /orca /orca
RequestHeader unset Accept-Encoding
</Location>
voila!, got http://www.kraftek.com/orca/orcallator/ mapped to an internal machine called “dell”, now you can
see some pages from my internal machine!
I hated the fact that i needed to mirror the whole orca directory overnight… Now I don’t need to do that!
288/433

Create/grow volume with maxsize (Veritas)

Create volume of maxsize (max size of all the DG’s disks):
# vxassist -g ora2dg maxsize
Maximum volume size: 39522304 (19298Mb)
# vxassist -g ora2dg make oratmp 39522304
# mkfs -F vxfs /dev/vx/rdsk/ora2dg/oratmp
# mkdir /db/prd3/archive_test2
# mount -F vxfs /dev/vx/dsk/ora2dg/oratmp /db/prd3/archive_test2
Grow a volume to maxgrow:
# vxassist -g ora1dg maxgrow archive_temp
Volume archive_temp can be extended by 10772480 to 94658560 (46220Mb)
# vxresize -g ora1dg archive_temp +4g
255/433

PictureGallery

this
, and you have a j2ee appserver (tomcat), get the source:
PictureGallery-netbeans-src.tar. gz
, unpack it, you’ll find a “.war” file inside, that is what you should put inside
the “webapps” folder inside tomcat.
The only setting you might need to change is the location of your pictures. Find the jsp called “index.jsp” and
modify the variable “base” there.
164/433