PHP with Informix IDS support via IFX Module – Centos5 / RHEL5 12 June 2007
Posted by Maulvi Bakar in : Linux, Work , 1 comment so farHello everyone, sorry for the long silence..
These are drafts mainly, careful with the syntax until I fix the coding code of my wordpress.. ![]()
Firstly, install the Informix Client SDK for Linux..
Get the Client SDK from here – http://www-306.ibm.com/software/data/informix/linux/csdk.html
Download, untar it to a folder, then follow the instructions below -
# useradd informix
# passwd informix./installclientsdk
install to /opt/IBM/informix
ensure “/etc/hosts” have these entry -
x.x.x.x informix_server_hostname
ensure that “/opt/IBM/informix/etc/sqlhost” have these entry -
database_instance_name onsoctcp informix_server_hostname 9088
add these at line number 38 in file “/etc/init.d/httpd”, which should be before the “# check for 1.3 configuration” line -
export INFORMIXDIR=/opt/IBM/informix
export INFORMIXSERVER=mtx2informix_prod
export ONCONFIG=onconfig
export PATH=$PATH:$INFORMIXDIR/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$INFORMIXDIR/lib:$INFORMIXDIR/lib/esql
Download this -
http://ftp.redhat.com/pub/redhat/linux/enterprise/5Server/en/os/SRPMS/php-5.1.6-5.el5.src.rpm
and install it
rpm -ivh php-5.1.6-5.el5.src.rpm
go to /usr/src/redhat/SPECS/
edit the php.spec file at line 428 (approximately after the xml, before $*, add this line -
–with-informix=/opt/IBM/informix \
Then, run this command -
rpmbuild -ba php.spec
and also, prior to rebuilding the RPM, may need to export the environments -
export INFORMIXDIR=/opt/IBM/informix
export INFORMIXSERVER=mtx2informix_prod
export ONCONFIG=onconfig
export PATH=$PATH:$INFORMIXDIR/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$INFORMIXDIR/lib:$INFORMIXDIR/lib/esql
Run this command to identify whatever php packages that you’ve installed -
rpm -qa | grep php
uninstall them using this command
rpm -e package_name1 package_name2
and re-install them using newly recompiled RPMs from this location -
“/usr/src/redhat/RPMS/i386/”
May need to use “–nodeps” option – the .so files required are actually Informix libraries already found within the ld_library_lib path
Hope it is useful to someone else someday
New Year Resolutions.. 14 January 2007
Posted by Maulvi Bakar in : Home, Linux, Society, Work , 2 commentsA week or so ago, I was asked by a journalist-friend to comment on my technological resolutions from last year and this year. Particularly those made, kept and broken.Â
Well, I did some and eventually, it appears in the local daily’s tech section!Â
I am nowhere really an expert, but that was something that I really strive for, with the grace of god, and assistance from friends and colleagues alike – god-willing..
Below are part of the article which appears in full here -
Resolutions made, kept, and broken
A system engineer with XyBase Sdn Bhd, Maulviridha Abu Bakar, is the resident Linux expert at work. Maulviridha is also into self-initiated awareness programs on Linux.
Last year, his resolution was to enhance his personal knowledge of Linux and Free and Open Source software. He had also intended to migrate all internal servers at work to Linux and Free and Open Source Software.
He had initiated the process last year at work and had been successful with some recognition from his employers.
They even let him conduct training internally and for customers, and Maulviridha intends to accomplish more this year.
He had also wanted to make Linux as the main operating system on his desktop for everyday use but to this day, he has only Linux installed on his desktop on a dual-boot configuration with Windows.
There appears to be a snag in the plan to go totally Linux both at work and home, says Maulviridha. “I seem to go back to Windows for some crucial usage and applications. For example, in the case of Microsoft Visio, there seems to be no quality alternative.â€
Nonetheless, there’s much for me still to learn.. “Life is a lifelong learning experience”
Enjoy!
Enabling JAVA plugin after installing JPackage JDKs 27 November 2006
Posted by Maulvi Bakar in : Linux, Work , add a commentIf you’ve installed java-1.5.0-sun-plugin and you want to use it with Firefox or any other mozilla-based browser, you’ll need to set up the link manually as there is a small bug in the java-1.5.0-sun-plugin package that causes it not to set up the link properly.
Please take note of the period (“.”) on the last line!
# cd /usr/lib/mozilla/plugins # rm -f libjavaplugin_oji.so # ln -s ../../../lib/jvm/java/jre/plugin/i386/ns7/libjavaplugin_oji.so .
Apache vs SELinux 25 September 2006
Posted by Maulvi Bakar in : Linux, Work , add a commentTowards the end of the working week, I receive a request from a colleague to have access to the ftp account folder via http. The guy is on site in a foreign country and it seems that his net access is being regulated (read – no ftp).
Now that seems reasonable, considering I was not in the office for the whole week due to an extended training/seminar that I am attending. Luckily I thought, since the training premises gave me access to wifi internet -whee!!
Here I am thinking I can solve it in the next few minutes!
I have a folder in the /home directory – “/home/thefolder“. I thought a simple settings as below in httpd.conf is enough -
Alias /thefolder "/home/thefolder/"
<directory /home/thefolder>
Options MultiViews Indexes Includes FollowSymLinks
AllowOverride AuthConfig
Order allow,deny
Allow from all
AuthType Basic
AuthName "The Folder Authentication"
AuthUserFile /the/passwd/folder/thepasswdfile
Require user theaccount
</directory>
Apparently not!
I keep getting 403 – Forbidden errors. Checked the permissions, double-checked it, even making it 777 – world-readable! FAIL!
I felt like screaming!
/var/log/httpd/error_log shows access is denied, even with 777 – world readable!
I felt some suspicions, the SELinux thingy began to smell fishy. Cursory examinations of the /var/log/messages logs shows some clues – Bleagh!
The analogy is like this -
Someone who does not have permission to a certain facility but has been given one, will still not be given access. That is what SELinux is all about.
Basically, it is Linux’s Last Line of Defence.
Read all about it and it’s relations to Apache here!
Enjoy!
OpenBSD – Reloading pf.conf 18 September 2006
Posted by Maulvi Bakar in : Unix, Work , add a commentOpenBSD, world most secure OS. Also one of the most User-Hostile ones. Now, I needed to reload the firewall rules. Modified some settings in the /etc/pf.conf and this is how did it to reload the ruleset -
$ pfctl -f /etc/pf.conf
This will reload the ruleset plainly from the file specified. The -R flag only loads the filtering rules. -N only loads the NAT rules. Should there be need to reload just the filtering and/or NAT rules, just use the appropriate options.
Enjoy!
Detached process with wget 8 September 2006
Posted by Maulvi Bakar in : Linux, Work , add a commentNow, this is the umpteenth time I tried to post this. Problem with my webhoster’s security settings. It’s the infamous 406 Not Acceptable error!
Anyway, I need to download a fairly large file on my server which I accessed it remotely via ssh. Problem is that I can’t wait while it finishes the download. I need to close the session and get some real work done somewhere else
(Hey the laptop battery might expire on me)
This is how I do it -
# (wget -o logfile http://www.example.com/dl_file.gz &)
The “wget -o logfile” parameter will allow you to monitor the download progress in real time. Just tail the logfile -
# tail -f ./logfile
You can also monitor the process thus -
# ps -ef | grep wget
This one will show you all the wget processes that you have detached, including information of what file is currently being downloaded complete with the url and logfiles.
Probably you’ll want to assign a different log file name for each of the detached process ![]()
Enjoy!
-ps Much appreciation to Alexander B. of my WebHost for assisting in that pesky 406 error.
IBM DB2 Certification 5 September 2006
Posted by Maulvi Bakar in : Work , add a commentWe need to deploy an IBM Websphere Portal. One of the requirements is a database backend. It was decided to install IBM DB2. While I’m whittling away the time awating the completion of the installation, I come across this particular info. It is just a basic paper, but.. Since it is quite affordable at RM228 at Thomson Prometric, well..
DB2 UDB V8.1 Family Fundamentals
DB2 V8 Family Fundamentals certification prep tutorials
enjoy!
Passive FTP and IPTables 4 September 2006
Posted by Maulvi Bakar in : Linux, Work , add a commentHad to configure an FTP server at work. For reasons best left for discussion in a later undetermined future date, we put the FTP server outside the firewall. Therefore, the machine in question needs to be protected by it own built-in firewall.
IPTables to the rescue.
There’s a snag. The default IP connection tracking doesn’t seem to work properly. IPTables rules below suggest that stateful inspection would do IP connection tracking as well, apparently not-
-A RH-Firewall-1-INPUT -m state –state ESTABLISHED,RELATED -j ACCEPT
-A RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 21 -j ACCEPT
Seems that the “ip_conntrack_ftp” needed to be loaded separately in order to enable it.
# /sbin/modprobe/ip_conntrack_ftp
That should do the trick… but to have IPTables load it automatically, edit the file “/etc/sysconfig/iptables-config”
Add the following into it -
IPTABLES_MODULES=”ip_conntrack_ftp”
Data Migration is Evil.. 1 May 2006
Posted by Maulvi Bakar in : Work , add a commentWell, I say that the hard part is almost done. Duplicates eliminated, hanging records purged. Now, I only need to create new 'Registration No', since the new system requires on 16 characters, instead of 25++ in the original.
What else? Oh yeah, remove all hyphens ("-") characters in the Identity Card Number column (This one needs a bit thinking). Seperate all I/C #s from old to new (This one's peanuts). Remove all instances of the apostrophe ("'" – heh!) and ampersand ("&") from Names and Addresses Fields (Ought to be fun!). Yeah, don't forget to split the addresses field by 35 characters
(More to remind myself than just a simple blogging
)
Umm.. Hope I can finish by midnight!
Weekend.. Shot! 30 April 2006
Posted by Maulvi Bakar in : Work , add a commentDarn, sometimes I hate my life. My boss asks me to redo the whole database for the state of Kedah. Exactly 33,297 records in the database. First I have to clean them for duplicates, then I have to slowly and painfully update them to prepare for upload into the new database and eventually, new system that they gonna use at the Ministry.
Someone else might do the job ala – "chin chai".. Well, someone else did.. I started the job first, did it about 20% to a quater of the way. Later my boss told me to turn it over to someone else and told me to concentrate on my prime duties. Well, they botched it bad enough that my boss asks me to redo it again, from the top.
Oh well..