Wednesday, December 27, 2006

Automated database backups via cron

Here is a quick and dirty script to do automated backups of a mysql database. If you want the script to be executed hourly (as is in my case), place it in your /etc/cron.hourly directory. In my case, I dump the backups onto /local/backups directory which happens to be mirrored via raid1.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#!/bin/sh

x=`date +%d-%H`
abrcimsfile1="v2edclite${x}"
abrcimsfile2="abrcimsv1${x}"

mysqldump -u root -p v2edclite_v1 > /local/backups/$abrcimsfile1
mysqldump -u root -p abrcims_v1 > /local/backups/$abrcimsfile2
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Tuesday, December 26, 2006

Packages required for PAM support with php and cryptocard

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
missing package 1
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
For the cryptocard server 6.4 (build 39) and php4, I got some missing errors about libstdc++.so.6 . I checked out /usr/lib/ but the latest version I found was libstdc++.so.5.

Checked out that I needed the following package for Suse Enterprise 9 that I was running: compat-libstdc++-lsb

Easiest way is to do the online update with yast and select the "lsb" update.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
missing package 2
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ofcourse the pamauth package that takes care of the magic between php and pam authentication. Dont remember the dowload link but I'll post it back when I come across it again.

missing pam_start function errors

make sure you have the pam_devel package installed

phpize errors

Be sure to check your installation of the following packages and if any of them are missing, install it.

1. php-devel
2. automake and autoconf (if you dont have this and get the aclocal error message, its probably because of these missing packages).

pear upgrade pear issues

Have an old version of pear that just keeps tellin you that you need a more recent version of pear to upgrade pear (pear install PEAR)?

Try this:

1. Run the below command and save the output as "go-pear.php". By default it saves as "index.html" I think. You can rename it to "go-pear.php" after it gets downloaded.

$wget http://go-pear.php

2. Run this to upgrade to the latest version of pear

$php go-pear.php

3. Done.

Tuesday, December 19, 2006

'connection to 0:0 refused by server' errors

Try this. Most likely you've logged in as 'abcd' and then su'ed as a different user.

Run the command 'xhost +' in a terminal as the original logged in user. then su' back to whatever user you wanted to su to..Hopefully, it should work. If not, google :) as I just did.

Wednesday, December 13, 2006

Installing CRYPTOCard Server on Suse Linux 10.1

I had a bit of an issue when I tried to install the cryptocard server on a recently upgrade Suse Linux 10.1 server. I kept getting the below darn error messages every time I ran the installer:

error while loading shared libraries: libc.so.6: cannot open shared object file:
No such file or directory


This was a bit irrating because my libc.so.6 was right under the "/lib" path. I tried opening up /etc/ld.so.cof and added the "/lib" path to it and run ldconfig -v to update the cache. No luck. Upon googling, I came across a page that provided a suggestion about LD_ASSUME_KERNEL and it worked after I followed through it.

$perl -pi -e 's/export LD_ASSUME_KERNEL/#xport LD_ASSUME_KERNEL/' cryptcoserver_6_4_for_linux.bin


Here was the link that I got the perl command idea from:
http://www.mail-archive.com/jxplorer-users@lists.sourceforge.net/msg00132.html

Good luck,
Nefertitian.

About Me

My photo
Princeton, New Jersey, United States
I am an Information Technology Analyst with extensive background in the Clinical Industry that includes working for CROs, Pharmaceutical and Medical Diagnostic companies.