unknown nfs status return value: -1 11 December 2007
Posted by Maulvi Bakar in : Linux, System, Unix, Work , 1 comment so farI’m trying to mount an NFS export from an AIX machine to a Linux client.
Had encountered the above problem. Apparently the NFS exports on AIX requires the client’s hostname and IP address within the /etc/hosts file.
Enjoy!
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!
Ubuntu Linux – Root Account 17 September 2006
Posted by Maulvi Bakar in : Home, Linux , 1 comment so farI like Ubuntu Linux, always have. Nice features, fairly comprehensive repositories for softwares. The only thing that bugs the hell out of me is the non-existance of the root account. Anytime you want to do something, it’s sudo this, and sudo that…
Well, this is how I did it -
sudo passwd root
voila!
I can now either use su to change to root, or even login as root..
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.
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”