Archive for June, 2010

OpenSSL-1.0.0a on AIX v5.3


Well once again I find myself scrambling to get something done that was known but not well communicated during the project life-cycle.  So I need to update all managed AIX machines running v5.3 to include OpenSSL (openssl-1.0.0a to be exact) and once again my disdain for AIX rears it ugly head, which is represented by the Zombie to the left 🙂  Aside from my personal dislike of the Korn shell… Maybe I am not being fair to AIX as I don’t really work in an AIX optimal environment, taking full advantage of all of the great tools they do have (NIM, clustering, SAN, etc…).  But managing them as 1-off’s just plain stinks.  Suffice it to say that I would NOT recommend deploying a stand-alone AIX server in any circumstance as you cannot realize anything near it’s full potential.  Anyway, here is what I did to rectify the issue at hand.

# Install SSL on AIX 5.3.0.0
# get the rpm.rte package on the system
mkdir /opt/ssl4AIX
cd /opt/ssl4AIX
installp -qacXgd rpm.rte rpm.rte
# Grab the other packages and put them on the AIX system
# http://www-03.ibm.com/systems/power/software/aix/linux/toolbox/download.html
rpm -ivh gcc-4.2.0-3.aix5.3.ppc.rpm
rpm -ivh libgcc-4.2.0-3.aix5.3.ppc.rpm
# Create a sym link – Check this first following RPM installs for correct PATHS
# find / -name libgcc_s.a
# /opt/freeware/lib/gcc/powerpc-ibm-aix5.3.0.0/4.2.0/ppc64/libgcc_s.a
# /opt/freeware/lib/gcc/powerpc-ibm-aix5.3.0.0/4.2.0/pthread/ppc64/libgcc_s.a
# /opt/freeware/lib/gcc/powerpc-ibm-aix5.3.0.0/4.2.0/pthread/libgcc_s.a
# /opt/freeware/lib/gcc/powerpc-ibm-aix5.3.0.0/4.2.0/libgcc_s.a
# Now make the link
ln -s /opt/freeware/lib/gcc/powerpc-ibm-aix5.3.0.0/4.2.0/libgcc_s.a /usr/lib/libgcc_s.a
#
gunzip openssl-1.0.0a.tar.gz
tar -xf openssl-1.0.0a.tar
cd openssl-1.0.0a
./Configure shared –prefix=/usr aix-gcc
make
make test
# If all goes well !!!
make install

Incidentally, you need an IBM account if you want to download these packages from http://www-03.ibm.com/systems/power/software/aix/linux/toolbox/download.html… LOL

That stinks as well 😦

, , , , , , , , ,

1 Comment

This really looks like blood…


Revelation 8:8–11. “The second angel blew his trumpet, and something  like a great mountain, burning with fire, was thrown into the sea. A third of the sea became blood, a third of the living creatures in the sea died, and a third of the ships were destroyed … A third of the waters became wormwood, and many died from the water, because it was made bitter.”  Well It may be a stretch to assume that the above passage is pointing to the oil spill, but from this vantage point, it sure LOOKS like blood…

, , , ,

1 Comment

wp-make-me-happy


Ok this is kind of a repeat but instead of editing the original post I thought I would just repost it in its new form.  I was working on setting up a backup blog of this very blog to have on a local server… I don’t know in case of disaster… actually it was to see what it looked like with some new themes I have as this site is somewhat limited in it’s design choices… not complaining mind you, just wanted to see what it would look like with some nifty designs I made… The original post, WordPress Automation, was from a while back and I had the need to actually make a new host just for this occasion as I had blown away all of my web servers recently (I don’t actually recall why…???).  I was going through my script pad and found a really simple setup script I wrote that was better than the original post I put here… although it really is the same thing just without any comments… LOL Sorry I take for granted that you are just going to trust that it works and run it !!! Scary 🙂  I did find a few hiccups however… My sed lines didn’t take although they are correct… and this was a stinker… The repo I like to create here, although mostly this is if you were going to run multiple vhosts on the same physical server, (It does allow you to have only 1 repo for ALL themes and plugins for ALL users) does NOT work with the Worpdpress Import plugin… So I ended up un-linking the plugins link and just re-instating the original one, good thing I copied it to a backup in this script instead of just blowing it away huh??? 🙂  As I stated earlier, the entire script is based on the setup that Virtualmin creates in its vhost creation module so if you are using something else or doing that manually, you may need to change this up a bit… 29 lines on this one… sorry 😦  LOL

#/bin/bash
#
echo “Make sure you have created this VHost using virtualmin FIRST…”
sleep 5
echo “OK… moving on then”
sleep 2
echo “Enter the name of your new site, then press [ENTER}”
read newblog
cd /home/$newblog/public_html
wget http://www.wordpress.org/latest.tar.gz
tar xzf latest.tar.gz
rm -Rf latest.tar.gz
mv wordpress/* .
rm -Rf wordpress
chmod 777 .
cd /home/$newblog/public_html/wp-content
mv themes bak.themes # <– Just in case we hose everything 😦
mkdir -p /var/www/repo/themes
ln -s /var/www/repo/themes /home/$newblog/public_html/wp-content/themes
mv plugins bak.plugins
mkdir -p /var/www/repo/plugins
ln -s /var/www/repo/plugins /home/$newblog/public_html/wp-content/plugins
cd ../
cp wp-config-sample.php wp-config.php
sed -i ‘s/putyourdbnamehere/’$newblog’/’ wp-config.php
sed -i ‘s/usernamehere/’$newblog’/’ wp-config.php
sed -i ‘s/yourpasswordhere/’$newblog’/’ wp-config.php
chown -R $newblog:$newblog *
# EOF

, , , , , , , ,

Leave a comment

AIX 5.1 mksysb…reliable-backup?


I hate to use the word ‘hate’ but I really ‘hate’ AIX.  Now it may be that I am just not a true expert and I don’t know enough about the OS to be fair, but that is my stance.  I have never had as much difficulty with any other OS as with AIX, any flavor.  In any event, I have to manage these system on a regular basis and one of the tasks I usually setup on the system in an automated backup to the often-times included internal tape drive (usually 4mm).  I had a system crash last week and I had to restore it from a rescue boot CD, which worked quite well, aside from the 14 times it took me to get the RS6000 to actually boot from the CD.   So of course it lost a majority of it’s settings, all of my automation scripts being the topic for today.  I must admit that it is quite likely that I caused the issue in the first place by trying to mirror 3 drives in the rootvg, as a test of course, and it just never seemed to be the same after.  Even following a complete removal of the 3rd hdisk and all of its pointers… something just wasn’t right, until one morning it was just completely hosed.  So anyway, one of my complaints with AIX is that even within the same parent release levels; i.e. v5.1, v5.2, v5.3, the commands to not translate well if at all across them?  I have been wondering why I have not seen an email reporting on this systems backups… well of course I had a case incompatibility issue in my script that I took from a v5.2 system to use on this v5.1 system.  I have the tested and functional script below for use on an AIX v5.1 RS6000 server 🙂

#!/usr/bin/ksh
#
typeset -r datetime=`date`
typeset -r date=`date +%Y%m%d`
typeset logfile=”/opt/proserve/logs/backup.$date.log”
typeset maillog=”/opt/proserve/logs/maillog.$date.log”
typeset errlog=”/opt/proserve/logs/errlog.$date.log”
. /opt/proserve/clientconfig
{
echo “\n” > $logfile
echo “===============================================================”
echo ”                       MKSYSB and System Report                     ”
echo ”                         for activities run                     ”
echo ”                     $datetime ”
echo “===============================================================”
echo “\nClient Information Section”
echo “——————————————-”
echo “\nCustomer – $clientname ”
echo “\nSystem status – `uptime`\n”
echo “Users currently logged into this system:”
echo “***NOTE*** – Any data changed on this system by users”
echo ”             currently logged in will not be backed up!”
who
echo “\n===============================================================”
echo “\nCurrent System Error Report:”
errpt
echo “\n===============================================================”
echo “\nCurrent Filesystem Space:”
df -k
echo “\n===============================================================”
echo “\nSystem Information:”
prtconf
echo “\n===============================================================”
echo “\nCurrent tape information:\n”
tctl status
echo “\nRewinding tape……….”
tctl rewind
echo “\nBeginning system backup @ $datetime\n”
/usr/bin/mksysb  ‘-e’  ‘-v’ ‘-i’ ‘-X’  /dev/rmt0
echo “Backup ended at `date`”
} 1>$logfile 2>$errlog
cat $logfile > $maillog
echo “\n===============================================================” >> $maillog
echo “\nAdditional messages reported during backup:” >> $maillog
cat $errlog >> $maillog
mail -s “System Backup and Status Report” -r root@proserve-solutions.com $email_list < $maillog
exit

The issue was that v5.1 didn’t like the ‘V’ that v5.2 uses… I just changed the ‘V’ to a ‘v’ and that worked fine… Guess I should take a look at the log files before assuming that something is compatible.  Ya know I just had a thought, I wonder if my hatred for AIX is actually displaced and should be focused on ksh…  I am a bash lover without a doubt… korn may not be for me 🙂

, , , , , , , ,

2 Comments

Quota violation… cha cha cha !


I received a request earlier this week with regard to some issues a customer is having with users blowing their quota, then blaming internal IT because they cannot access their mailbox… Well that just burns my a$$, I really cannot stand misplaced blame… Blame the RIGHT people !!! Especially from people who darn well know that they have disk allocation limitations… Of course there is no “canned” report built in to the GUI that manages this gateway product so off to the command line I went… Seemingly a simple one-liner turned into a bit more of a research project than I had expected… I guess I didn’t know as much as I thought about cyrus, if you recall from cyrus… you bastard !, I didn’t know anything back then either… I am making an assumption here, but I think that the client will want this in some sort of weekly email report… so I will probably end up setting up a cron job to run this… Oh well practice makes perfect, or at least close in this case.  Below you will find my simple little one-liner… and an example of its output 🙂

#!/bin/bash
# Find the Top 25 quota users
echo ""
echo "   --------------------------------------"
echo ""
echo "   Top 25 IMAP users by quota utilization"
echo "        `date`                           "
echo ""
echo "   --------------------------------------"
echo ""
echo "  Defined     %       KB     "
echo "   Quota    Used    Used User"
echo "   --------------------------"
su -c '/usr/lib/cyrus-imapd/quota -f' cyrus|sort +1 -nr|head -n25

Sample output:

 --------------------------------------

 Top 25 IMAP users by quota utilization
     Thu Jun 17 16:28:09 EDT 2010

 --------------------------------------
Defined     %      KB
 Quota    Used    Used User
 --------------------------
 51200     107   54974  user/tcostner
 51200     105   54181  user/hwillis
 51200     103   52863  user/jbrown
 51200     102   52386  user/gturner
 51200     101   51950  user/rburton
 51200     100   51480  user/ldrzewucki
 51200     100   51236  user/ktunis
 51200     100   51223  user/wrogers
 51200     100   51212  user/kgiancarlo
 51200     100   51205  user/charris
 51200     100   51203  user/wdavis
 51200      97   49877  user/jcooke
 102400     96   98635  user/rertel
 51200      94   48194  user/asischo
 51200      90   46437  user/ahester
 51200      90   46396  user/tturner
 51200      89   45856  user/afareed
 51200      86   44390  user/ldiggs
 51200      84   43423  user/kbrown
 512000     84   434653 user/lgreen
 204800     80   165309 user/lfreidenberg
 51200      78   40205  user/vbrown
 51200      78   40195  user/jrozier
 51200      77   39654  user/pbanaszak
 204800     77   158253 user/aviverette

, , , , , , , ,

Leave a comment

SUN-Jail – Solaris 10 convicted ! Part III Dammit… this friggin thing doesn’t restart @ boot-time !!!


Ok well I was not expecting to have a Part III, but I forgot some pretty important stuff… I guess I am so used to working with Linux where all of this manual crap is a “given,” meaning it is already configured to do what you would expect it to do… I got lazy and didn’t check the start-up scripts… and of course, on Solaris 10 at least, proftpd doesn’t just start on it’s own…  So here are the steps to make that happen for you as well as the start-up script I am currently using… Oh, and make sure that in your proftpd config file, you have proftpd set as a standalone server…

# cat /usr/local/etc/proftpd.conf|grep ServerType
ServerType                      standalone
Go out and make this file in /etc/init.d
# vi /etc/init.d/proftpd
#!/bin/sh
case $1 in
'start' )
/usr/local/sbin/proftpd
;;
'stop' )
kill `ps -ef | grep proftpd | grep -v grep | awk '{print $2}'` > /dev/null 2>&1
;;
*)
echo "usage: $0 {start|stop}"
esac
# chmod 744 /etc/init.d/proftpd
# ln -s /etc/init.d/proftpd /etc/rc3.d/S99proftpd
# ln -s /etc/init.d/proftpd /etc/rc1.d/K99proftpd

I have webmin installed here so I went in to test the scripts from the “System” dashboard under “Bootup and Shutdown” just to make sure it works, obviously you can reboot as well as the final test for proper functionality.  Sorry for the omissions 😦

, , , , , , , ,

1 Comment

Bjarne giant… Unbelievable


I have been into the pipe smoking thing for a little while now… and actually it goes quite a way back for me as I have some pipes from about 15+ years ago.  But recently, in the last few months or so I have really gotten into it.  Not really sure why, maybe the constant visuals I get watching the science channel seeing all of the greatest minds in science smoking away… thinking “maybe that is their secret to exponential intelligence…”  LOL…  I also have pre-hypetension (BP = 140/80) and pipe smoking is supposed to be a calming hobby allowing you to reflect and relax… Well however I started or whatever the reason… I did a lot of research (as I always do) about pipe smoking… WOW… There is a lot of information out there and a lot of things to know about pipe smoking…  The only downside thus far (well aside from the potential health risks) is that the smoking experience is unique to each individual; i.e. a favorite pipe or tobacco of one may not translate to another.  I have been in a rut so to speak on both pipe and tobacco selection.  I have continually gone with the great smelling aromatic blends thinking they will taste great based on their wonderful aroma, but they really don’t.  I have some nice mid-level pipes as well so I am on par there… but still no real luck.  In my research I found a guy on youtube.com, PipeFriendCHS, who has a great deal of knowledge and experience to share as well as a wonderful demeanor, quite pleasant to listen to and watch.  After watching several videos and subscribing to the feed, I came across a video showcasing some giant pipes.  Never saw anything like this before and never knew anything like this existed in the pipe world.  I was continually having issues packing my pipes correctly and they just never had any flavor… Well all of that was about to end, yesterday in fact.  I went out on a limb, from watching the giants on the videos, and found one.  The one in the picture above.  Honestly I didn’t really go to far out there because I nabbed this one for $46.00 !!! Now that I have had a chance to smoke it, once, I would have paid 3 times that amount.  It was the most amazing smoking experience I have had… I cannot fully describe it other than to say that everything I was looking for in a smoke was realized with this pipe.  It was as if I was carried off into a realm of tranquility and peace.  I know this sounds overstated, but it is not, I assure you.  All that remains is to create this experience each and every time I smoke… and of course I am going to endlessly search for pipes just like this one.

, , , , , , , , , , , ,

2 Comments