Tuesday, September 20, 2011

Virtualbox an Esxi5.0 Abstraction layer

So last night I installed Esxi5.0 "freeware" in virtualbox. Its pretty straight forward, and I mean just install from iso but there are a few "non-issues". Esxi5.0 has to be installed on something that is at minimum a dual core, and you have to devote both CPU's to virtualbox. If installed on an AMD Phenom its crying about not having the virtualization bit enabled on my cpu. Boo hoo. ;)

Saturday, September 17, 2011

Centos5: Pear + memcache

Go ahead and install pear from the instructions here:


Its as simple as wget'ing the file of interest and then using it. After the "brief" installer, and I mean brief.

#> pecl install memcache

Note: I had to use kind of a PHP hack to get this working. ITs listed here: http://blog.mostlychris.com/2009/07/fatal-error-allowed-memory-size-of-8388608-bytes-exhausted-pear/ .

It resolves a issue with a script running out of memory before the install completes.

Last but not least since this is a a Centos5 system you'll need to do the following:

echo "extension=memcache.so" > /etc/php.d/memcached.ini

Tuesday, September 13, 2011

Creating a RPM for Memcached is stupidly simple

Here we go!

Post is here: http://code.google.com/p/memcached/wiki/NewInstallFromSource

The short and sweet of it is:

echo "%_topdir /home/melinko2003/rpmbuild" >> ~/.rpmmacros
mkdir -p /home/melinko2003/rpmbuild/{SPECS,BUILD,SRPMS,RPMS,SOURCES}
wget http://memcached.org/latest
rpmbuild -ta memcached-1.x.x.tar.gz

Thursday, March 24, 2011

PHP4 X86_64 on Centos5 + Amendment.

In my previous blog I solved a headache, just remember do not yum install mysql-devel, use the rpm.


PHP4 X86_64 on Centos5

After some Hardcore testing, I finally figured it out :D Kids we now have 4.4.9 x86_64. Here are the modifications I had to make to get it to compile correctly! WOOHOO!

wget http://downloads.mysql.com/archives/mysql-5.0/MySQL-devel-community-5.0.45-0.rhel5.i386.rpm

rpm --oldpackage --force -Uvh MySQL-devel-community-5.0.45-0.rhel5.i386.rpm

[root@localhost SPECS]# diff php4-4.4.9_melinko.spec php4-4.4.8_LAB8.spec
< Version: 4.4.9
< Release: melinko%{?dist}
> Version: 4.4.8
> Release: LAB8%{?dist}
< --with-mysql=shared \
> --with-mysql=shared,%{_prefix} \
< --with-mime-magic=/usr/lib/rpm/magic.mime \
< $* || tail config.log
> --with-mime-magic=%{_libdir}/rpm/magic.mime \
> $* || tail -300 config.log
< build --with-apxs2=/usr/sbin/apxs
> build --with-apxs2=%{_sbindir}/apxs

Wednesday, March 23, 2011

PHP4 on Centos 5

So I found this tonight, bad news it only works on i386 - i868, sorry folks no x86_64 :(

I will provide credit, where it is due -> http://www.labcoding.com

#> sudo yum install rpm-build autoconf automake m4 gcc gcc-c++ bison flex
#> sudo yum install bzip2-devel curl-devel db4-devel expat-devel gmp-devel aspell-devel httpd-devel libjpeg-devel libpng-devel pam-devel openssl-devel zlib-devel pcre-devel krb5-devel libc-client-devel cyrus-sascl-devel openldap-devel mysql-devel postgresql-devel unixODBC-devel net-snmp-devel elfutils-devel libxslt-devel libxml2-devel ncurses-devel freetype-devel
#> sudo yum install aspell-devel libtool libxslt-devel

#> wget http://www.labcoding.com/yum/centos/5/i386/SRPMS/php4-4.4.8-LAB8.src.rpm
#> cd /usr/src/redhat/SPECS
#> rpmbuild -bb php4-4.4.8_LAB8.spec

Checking for unpackaged file(s): /usr/lib/rpm/check-files /var/tmp/php4-root
Wrote: /usr/src/redhat/RPMS/i386/php4-4.4.8-LAB8.i386.rpm
Wrote: /usr/src/redhat/RPMS/i386/php4-devel-4.4.8-LAB8.i386.rpm
Wrote: /usr/src/redhat/RPMS/i386/php4-pear-4.4.8-LAB8.i386.rpm
Wrote: /usr/src/redhat/RPMS/i386/php4-imap-4.4.8-LAB8.i386.rpm
Wrote: /usr/src/redhat/RPMS/i386/php4-ldap-4.4.8-LAB8.i386.rpm
Wrote: /usr/src/redhat/RPMS/i386/php4-mysql-4.4.8-LAB8.i386.rpm
Wrote: /usr/src/redhat/RPMS/i386/php4-pgsql-4.4.8-LAB8.i386.rpm
Wrote: /usr/src/redhat/RPMS/i386/php4-odbc-4.4.8-LAB8.i386.rpm
Wrote: /usr/src/redhat/RPMS/i386/php4-snmp-4.4.8-LAB8.i386.rpm
Wrote: /usr/src/redhat/RPMS/i386/php4-domxml-4.4.8-LAB8.i386.rpm
Wrote: /usr/src/redhat/RPMS/i386/php4-xmlrpc-4.4.8-LAB8.i386.rpm
Wrote: /usr/src/redhat/RPMS/i386/php4-mbstring-4.4.8-LAB8.i386.rpm
Wrote: /usr/src/redhat/RPMS/i386/php4-ncurses-4.4.8-LAB8.i386.rpm
Wrote: /usr/src/redhat/RPMS/i386/php4-gd-4.4.8-LAB8.i386.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.55937
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd php-4.4.8
+ '[' /var/tmp/php4-root '!=' / ']'
+ rm -rf /var/tmp/php4-root
+ rm files.domxml files.gd files.imap files.ldap files.mbstring files.mysql files.ncurses files.odbc files.pgsql files.snmp files.xmlrpc
+ exit 0

Sunday, March 20, 2011

OpenLDAP info.

I found a great post in a mailman mail list: http://www.openldap.org/lists/openldap-technical/201103/msg00026.html

I think ill be giving this a shot relatively soon :) Im kind of excited.

RE: OpenLDAP, Kerberos, Samba, PAM, How Do They Work Together?

* To: "Nan Meng" ,
* Subject: RE: OpenLDAP, Kerberos, Samba, PAM, How Do They Work Together?
* From: "Germ van Ek"
* Date: Wed, 2 Mar 2011 11:01:34 +0100
* Content-class: urn:content-classes:message
* In-reply-to: <4D6D73FB.6060805@gmail.com>
* References: <4D6D73FB.6060805@gmail.com>
* Thread-index: AcvYYzxAWgY6nws6RqWuejoq/SRO6AAWvsdw
* Thread-topic: OpenLDAP, Kerberos, Samba, PAM, How Do They Work Together?

Dear Nan,

I'll give it a go, my explanation will be simplified, as all software of
course is able to do a lot, I'll try to explain it's typical role.

OpenLDAP is a database management system. It communicates with database
clients in a standard (LDAP) way, and uses a (configurable) database
backend to store it's data.
One of the more popular database backends is Berkeley DB (BDB). It
usually stores it's data in files in /var/lib/ldap.

Kerberos is an authentication mechanism. It is ticket based. That means
that as soon as a client authenticates with Kerberos, it receives an
'authentication ticket'. It is then able to send this ticket to one or
more (thereby using single signon) services, such as Samba.

Samba is used for file sharing, printer sharing and Windows
authentication. It currently emulates a Windows NT4 domain controller.
It can use a LDAP server for it's user/groups backend.

PAM is the Linux 'Pluggable Authentication Mechanism'. This is
authentication system of Linux, that can use plugins for retrieving user
and group info. The 'standard' plugin is pam_unix, this uses the
familiar /etc/passwd,/etc/group and /etc/shadow files. Another plugin is
pam_ldap, which uses the LDAP configuration in /etc/ldap.conf for

Another thing that probably will be configured is nsswitch. This is the
'name service switch', that resolves user id's (0 for root,1000 and up
for other users) to user names. This is configured in
/etc/nsswitch.conf. (passwd,shadow,group will most likely be configured
as 'files ldap').

The standard base for LDAP client configuration is /etc/ldap.conf.

The most likely thing to be down, if I read your story, is the LDAP DB,
and more deeper, your Berkeley DB.
Troubleshooting this has been a long time ago for me. The only thing
that comes into mind is trying to start slapd by hand (without the
init.d script) using a '-vvv' parameter for maximum verbosity. It will
then hopefully crash and tell you what is wrong in the end.


-----Oorspronkelijk bericht-----
Van: openldap-technical-bounces@OpenLDAP.org
[mailto:openldap-technical-bounces@OpenLDAP.org] Namens Nan Meng
Verzonden: dinsdag 1 maart 2011 23:32
Aan: openldap-technical@openldap.org
Onderwerp: OpenLDAP, Kerberos, Samba, PAM, How Do They Work Together?

Dear list members,

I hope amateur questions could be tolerated. I would make it
professional if I could. I'm a newbie to OpenLDAP and probably even
Linux, but I have to take care of an office network (Linux servers with
Linux and PC workstations) that features email server, domain control,
file/printer sharing, user account management, web servers and so forth,
on my own without anyone's help.

Yesterday morning the power went down and so did our servers. After I
turned the servers back on, the account information system was no longer
working. Users weren't able to login with their credentials anymore,
even the root. What I did was I logged in the server (the Samba PDC,
LDAP server, Kerberos server, domain controller, email server) with
single mode, reseted the root password, and added accounts for other
individual users on the server. I know it was a bad idea. Although I got
some things working (emails, file/printer sharing), but there are still
other problems (PHP ldap_bind() from web servers fails, domain user
accounts and profiles fail to load correctly).

I know there is a centralized mechanism that handles user accounts with
the help of OpenLDAP, Kerberos, Samba, BerkeleyDB (and possibly other
things), but I don't have a clue of how they work together. I've been
trying to learn from docs and books for a long time before this power
issue, but not very successful.

My greatest problem is that I don't know how these things are working
together on my system. I believe I also lack some fundamental system
knowledge. I've been reading the docs available, but they're so abstract
to me and none of them seems to match our system configuration.

I'm hoping that I can get some help from here. Maybe some one can give
me some suggestions on how to troubleshoot in such a scenario as a
newbie, or an entry point that I can follow in order to explore the
system. I believe you can tell that I'm totally confused here without
being able to give much useful information about the problem and the
system. I'm sorry for my ignorance, but I really tried to deal with it
myself. If this thread turns out to be annoying or ridiculous, please
ignore, and I do apologize.

However, while I'm still struggling on the problem, if anyone could
help, I would really appreciate it. Thank you so much.



Sunday, December 19, 2010

A Open Source Wish

My wish is for some day open source software to to end the era of paying for software. No patents, No Licenses, and no more frivolous law suits. My dream is to some day walk into a school and see a school not limited to the software that it can provide its students due to price tags and silly licenses. A educational establishment that has endorsed its roots of learning and not paying for sub par pre-cooked software packages.

I know I haven't written much since I started at the new places but with the year comes a whole new set of blogs with information for the masses.

Tuesday, October 26, 2010

What Linux means to me...

Intellectual freedom to do what ever I want with an OS as I see fit. If I want to put XFS across /var/lib/mysql , I can. It releases that angry beast that wants to make a smaller, simpler way to move mysql users from one DB to another. Its an OS that screams put me on everything with a microprocessor and well I have... Mipsel, Arch, Blackfin, Mini_X86, and many more. Linux can be eye candy or just a tty, but at the end of the day its the same.

I often refer to Linux in comparison to, "Give me Liberty or Give me Death". Why you ask? Think of it this way, " Give me an operating system where I can do what I want, or give me no operating system at all". I have left windows far behind because of its limitations and its lack of sensibly features and expandability.

I will admit I was once a Windows person but no more. In the last 7 years my eyes have have been opened to the point where I see clearly that windows was an error of an era past. I no longer look at it like its a gem but more of another stone of yesteryear along with things like DEC VAX, VOS, HP UX, AIX, and MAC. I feel I have transcended relic file systems such as NTFS, and HFS.

I have chosen a field and a line of work that was some what called experimental while I was growing up to find that I am one of the few, the brave, and the daring enough to challenge the norm of what was modern contemporary computing. I did not concede to getting a MCSA or MCSE, but have decided to fore go those relics of IT. Linux has kept me employed during a recession and where people have been fighting over jobs I had multiple interviews with little to no equal competition. I have always looked up to Linux innovators such as Richard Stallman, and Linus Torvald. I know that I may never contribute as highly as they have to the cause and Im alright with that but I contribute where it is needed in support.

I have dedicated many waking hours to becoming the phenom that I am, and I wont ever stop because I want to see a change in modern computing. The change I speak of is a world where closed operating systems have a smaller market share then open operating systems. I applaud innovators like RedHat/Centos, and Ubuntu that are starting to hack away at the difference. Those playgrounds for new people, new desktop alternatives, and new server-centric operating systems are being born. Not just born, nurtured by new ideas and new innovations.

I say,"Give me your tired, your poor/Your huddled masses yearning to breathe free". I say, " Breathe easier the monopolies will some day disappear and the oppression will end, and we will suffer no longer."

On that note I'm off to bed - Night all

Wednesday, August 25, 2010

Unix: Minix3 ( A minimal Unix Clone )

Website: http://www.minix3.org/
Download: http://www.minix3.org/download/

An introduction from the Minix 3 site:

"What Is MINIX 3?
MINIX 3 is a new open-source operating system designed to be highly reliable, flexible, and secure. It is loosely based somewhat on previous versions of MINIX, but is fundamentally different in many key ways. MINIX 1 and 2 were intended as teaching tools; MINIX 3 adds the new goal of being usable as a serious system on resource-limited and embedded computers and for applications requiring high reliability

This new OS is extremely small, with the part that runs in kernel mode under 6000 lines of executable code. The parts that run in user mode are divided into small modules, well insulated from one another. For example, each device driver runs as a separate user-mode process so a bug in a driver (by far the biggest source of bugs in any operating system), cannot bring down the entire OS. In fact, most of the time when a driver crashes it is automatically replaced without requiring any user intervention, without requiring rebooting, and without affecting running programs. These features, the tiny amount of kernel code, and other aspects greatly enhance system reliability."

Some of the greatest news to come to Minix 3 recently is that it was entered in Google's Summer of Code which will add mature code to jump start this minimal OS.

Url: http://wiki.minix3.org/en/SummerOfCode2010

MINIX firewall
Multiboot compliance
Porting Pkgsrc
Unix domain sockets

I will have a couple follow-up segments in regards to Minix 3, but I encourage people to give it a shot. I understand its not for everyone though :)