MLUG: Re: [MLUG] installing oracle instant client
Re: [MLUG] installing oracle instant client
Email address obfuscation in effect -- please click here to turn it off.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Replying to myself again...  Here are some things you might need to be aware of.  This is, again, assuming you're using something like Red Hat's up2date service.

Next time Red Hat (or whoever) releases an update to PHP, you'll run into problems updating the packages.  You'll have a dependency problem where you want to update the PHP RPMs, but your php-oci8 RPM depends on the currently installed version of the RPMs.  However, there's no php-oci8 RPM update supplied in your channel, so you'll have to rebuild...  Except you can't really rebuild until you get the new RPMs.

Complicated, yes.

So, here's what you do.  First, grab ALL of the PHP RPMs from your channel.  As root, using Bash as your shell:

  rm -f /var/spool/up2date/php*.{hdr,rpm} /usr/src/redhat/RPMS/i386/php*.rpm
  for i in `up2date --showall | grep -i ^php ` ; do
    up2date --get --download $i
  done

Next, grab and install your source RPM for PHP:

  up2date --get --download --src php
  rpm -Uvh /var/spool/up2date/php-new.version.here-release.src.rpm

Now, rebuild the PHP RPMs with Oracle support as outlined before:

  cd /usr/src/redhat/SPECS
  rpmbuild -bb --clean --rm{source,spec} --define with_oci8=1 php.spec

Once that's done, you can do the actual update:

  rpm -Fvh /var/spool/up2date/php*.i386.rpm /usr/src/redhat/RPMS/i386/php-oci8*.i386.rpm
  up2date -p

This will update your PHP RPMs to the most recent version using Red Hat's RPMs and your custom Oracle RPM.  The 'up2date -p' command will update your machine profile in RHN, so you shouldn't get any reminders about PHP RPMs that you've already updated.

This is a bit involved, but it's what you have to do to stay current with PHP+Oracle.  If the Oracle corp. would change their licensing (yeah, right) to allow Red Hat to just include the Instant Client RPMs, we wouldn't have to worry about this mess.  Same with FreeTDS/MS SQL, though I'm not sure why Red Hat doesn't provide FreeTDS since it's LGPL.

As an aside, this is an easy way to "steal" Red Hat, if you can steal something that's made out of free components.  You can update a system piecemeal from source RPMs and eventually have a fully working major-version-update Red Hat install using only source RPMs.  I assume this should work pretty much everywhere RPMs are common.


  ryan woodsmall

    EMAIL:PROTECTED



"Be well, do good work, and keep in touch." - Garrison Keillor




On Jun 6, 2006, at 10:47 AM, ryan woodsmall wrote:

Hate replying to my own message, but the --define option is different between RHEL3 and RHEL4.  I think the RPM build command you want to use is:

  rpmbuild -bb --clean --rm{source,spec} --define with_oci8=1 php.spec

Likewise, you can define 'with_mssql=1' to get MS SQL support.  It requires the FreeTDS libs to be installed, but it's much better under RHEL4 than RHEL3, where I have to add it to my .spec file every time I rebuild.

  ryan woodsmall


"Be well, do good work, and keep in touch." - Garrison Keillor

On Jun 6, 2006, at 10:41 AM, ryan woodsmall wrote:

You'll have to install and rebuild the PHP source RPMs.  If you're using Red Hat's RHN service, you can do the following to build the Oracle bits of PHP.  As root:

  up2date --get --download --src php
  rpm -Uvh /var/spool/up2date/php-4.3.9-3.12.src.rpm
  cd /usr/src/redhat/SPECS

You should have a file called php.spec in that directory.  You should now be able to rebuild PHP RPMs with Oracle support using the following command:

  rpmbuild -bb --clean --rm{source,spec} --define oracle=1 php.spec

There might be dependencies that you'll need to manually install to get a complete build.  Once you get a good build, you should be able to get Oracle support by installing the php-oci8 RPM in /usr/src/redhat/RPMS/i386.  Restart Apache at that point and you're golden.

Good luck!

  ryan woodsmall


"Be well, do good work, and keep in touch." - Garrison Keillor



On Jun 6, 2006, at 10:25 AM, Davis, Jared Scott wrote:

Well, here are the relevant packages I have:

php-4.3.9-3.12

httpd-2.0.52-22.ent

oracle-instantclient-basic-10.2.0.1-1

 

and yes, I am using the rpms as the php/apache packages were preinstalled when we bought the server, so I’ve just been updating those.  Technically I should just be able to recompile php --with-oci8-instant-client=[dir] and set the environment variables, right?

 

Thanks,

 

Jared Davis
Internet Administrator
Residential Life
University of Missouri-Columbia
100 Pershing Hall
(573) 884-3616


From: EMAIL:PROTECTED [mailto:EMAIL:PROTECTED] On Behalf Of McIntosh Jason
Sent: Tuesday, June 06, 2006 9:36 AM
To: MLUG Members
Subject: Re: [MLUG] installing oracle instant client

 

I haven't enabled this patch previously, but a few notes on this - check the version numbers of PHP you're trying to install.  It may not be necessary.  Actually, I just looked at the php.net site and the packages have DEFINITELY been updated to a much newer version than is on the tutorial.

 

Keep in mind, if you're doing RPM files, this may all be different.  I'm not sure what version of the RPM's, etc. you're using, but I generally do source installs for php/apache/tomcat/oracle rather than use RPM's due to said issues.

Jason

 

--
/--------------------------------------|---------------------------\
| Jason McIntosh                       | CELL: 573-424-7612        |
| Webmaster, thinker, programmer, etc. | WORK: 573-884-3865        |
| http://poetshome.com/                |                           |
|------------------------------------------------------------------|
|"How should I know if it works?  That's what beta testers are     |
|for.  I only coded it."                                           |
|(Attributed to Linus Torvalds, somewhere in a posting)            |
\--------------------------------------|---------------------------/



 

On Jun 6, 2006, at 9:28 AM, Davis, Jared Scott wrote:



I’m having some trouble getting the OCI8 extention for PHP working.  I’ve tried following this: http://www.oracle.com/technology/pub/notes/technote_php_instant.html (scroll down to “Enabling the PHP OCI8 Extension on Linux”) but it seems I don’t have the directory to apply the patch they are talking about.  Has anyone done this and could help?  We’re running RHEL4.  Thanks,

 

Jared Davis

Internet Administrator

Residential Life

University of Missouri-Columbia

100 Pershing Hall

(573) 884-3616

 

 

<image001.gif>

_______________________________________________

members mailing list

 

<image001.gif>
_______________________________________________
members mailing list

_______________________________________________
members mailing list


_______________________________________________
members mailing list
EMAIL:PROTECTED
http://mlug.missouri.edu/mailman/listinfo/members