Diario de navegante

Notas de interés personal

Mi foto
Nombre:
Lugar: Terrassa, Barcelona, Spain

lunes, agosto 23, 2004

Oracle, PHP, Apache en Fedora

Despues de intentar instalar en Fedora el Oracle mediante el procedimiento habitual que ya teníamos preparado, hemos tenido problemas de todo tipo. Empezando con que no podiamos desinstalar PHP por dependencias cruzadas entre otros módulos PHP y que faltaban librerías de todo tipo.

El procedimiento que teníamos consisitía en instalar Red Hat 8 con un entorno gráfico GNOME, instalar Oracle 8, que tienen bastantes bugs y en el que hay que tocar los scripts de Oracle, compilar apache, y finalmente compilar PHP indicando las librerías de Apache y Oracle.

Hemos optado por otra táctica:

Instalaremos Fedora (sin las librerías de PHP). Posteriormente un rpm que finalmente Oracle se ha dignado a ofrecer ( en este caso Oracle 10, ya veremos que otros problemas nos aporta) y reconstruiremos el RPM de PHP con la información que hemos obtenido de esta URL:Customizing PHP

Básicamente la información es esta:

Modifying the PHP source file
You need to modify the PHP source file, php.spec, to customize the capabilities of PHP.

To modify the PHP source file:

Change your working directory to the directory where you installed the PHP source files.

cd

where is the directory where you have installed the PHP source files.

Create the following directories, BUILD, RPMS/i386, SRPMS, using the following command.

mkdir -p BUILD RPMS/i386 SRPMS

Important: Since the Linux environment is case sensitive, you must ensure that the directory names are capitalized.

Modify the php.spec file that contains the configurable options for PHP.

vi /SPECS/php.spec

Important: Modifying certain options in the php.spec file could adversely affect the functioning of certain features of the control panel.
For example, if you disable PhpMyAdmin or MySQL, your customers will be unable to manage their MySQL databases using the PhpMyAdmin MySQL interface.
Similarly, if your disable IMAP, you cannot access your email messages using SquirrelMail.
If you disable the gettext option, internationalization of PhpMyAdmin and SquirrelMail will not be supported.

Save your changes to the file and exit.

:wq

Rebuilding the PHP source RPM
To rebuild the PHP source RPM:

Build the PHP source RPM using the following command.

rpmbuild --define '_topdir ' -ba /SPECS/php.spec

If the process exits with "state 0", it indicates that the rebuild is successful.

The rebuilt RPMs will be available in the location, //RPMS/i386.

Installing the rebuilt PHP RPMs on the server
After rebuilding the PHP source RPM, you must install the rebuilt PHP RPMs on the server.

Log on to your server as a root user.

su -

Browse to the folder, //RPMS/i386, that contains the recompiled RPMs.

Install the RPMs using the following command.

rpm -Uvh *.rpm

Restart the Web server.

Los parámetros que tenemos que añadir al configure de PHP son:
--with-oracle=$ORACLE_HOME --enable-sigchild --with-oci8=$ORACLE_HOME