Ver Mensaje Individual
  #2 (permalink)  
Antiguo 01/04/2003, 18:55
Avatar de hrxnet
hrxnet
 
Fecha de Ingreso: julio-2002
Ubicación: Sto. Dgo. RD
Mensajes: 516
Antigüedad: 21 años, 10 meses
Puntos: 0
Me paso igual y como en rpm solo aparencen versiónes pocos seguras de php y apache los desintale "rpm -e httpd" y "rpm -e php" y me baje los fuentes de php y apache de sus sitios web y lo compile con este tutor:

Código PHP:
tar -zxvf httpd-2.0.39.tar.gz
cd httpd-2.0.39
./configure --prefix=/opt/httpd-2.0.39 --enable-ssl --enable-cgi
--enable-so 
\
--enable-modules=all --with-perl --enable-shared=max
make
make install

Verifica si ya tienes definido el usuario nobody, si no es así,
agrégalo con
useradd, algo como: 'useradd nobody' debería bastar. Ahora veamos si
todo
marchó bien:

/opt/httpd-2.0.39/bin/apachectl start

Ahora, que estamos seguros:

/opt/httpd-2.0.39/bin/apachectl stop

tar -jxvf php-4.2.1.tar.bz2
cd php-4.2.1

./configure --prefix=/opt/httpd-2.0.39 \
--with-config-file-path=/opt/httpd-2.0.39/conf --without-pear
--with-openssl 
\
--with-zlib --with-bz2 --enable-calendar --with-gdbm --with-db3
--with-gmp 
\
--with-mysql --with-ncurses --with-pgsql
make
make install

Muy bien, tenemos que agregar algunas opciones en 
/opt/httpd-2.0.39/conf/httpd.conf:

ScriptAlias /usr/local/apache2/ "/usr/local/apache2/bin/"
Action Application/x-httpd-php "/usr/local/apache2/php"
AddType application/x-httpd-php .php

/opt/httpd-2.0.39/bin/apachectl start


[shell]# cat > /usr/local/apache/htdocs/info.php
[shell]# <?php phpinfo() ?>
[shell]# [Control-D]
[shell]# lynx [url]http://localhost/info.php[/url]

Si vemos la información de PHP, entonces ha funcionado.


Bien, ahora necesitamos un guión de inicio, créalo con:

cat > /etc/rc.d/init.d/apache << "EOF"
#!/bin/sh

source /etc/rc.d/init.d/functions

case "$1" in
start)
echo "Iniciando el servidor web..."
loadproc /opt/apache2/bin/httpd
;;
stop)
echo "Deteniendo el servidor web..."
killproc /opt/apache2/bin/httpd
;;
restart)
$0 stop
sleep 1
$0 start
;;
status)
statusproc /opt/apache2/bin/httpd
;;
*)
echo "Modo de uso: $0 {start|stop|restart|status}"
exit 1
;;
esac

EOF
chmod a+x /etc/rc.d/init.d/apache

Recuerda hacer los enlaces simbólicos en /etc/rc.d/rc*.d.