Installer php

mohamedjayed Messages postés 29 Date d'inscription vendredi 25 février 2005 Statut Membre Dernière intervention 20 décembre 2007 - 13 mai 2005 à 12:34
cs_garfield90 Messages postés 388 Date d'inscription lundi 7 juillet 2003 Statut Webmaster Dernière intervention 10 février 2009 - 13 mai 2005 à 12:43
je veut changer la version de php qui utilsé par defaut ds redhat9 je sais pas quelle version qui est integré mais ne marche pas bien

je veut installer une version news par exemple php4.0 qui est bien .
je sais pas comment proceder pour installer php4.0 sous redhat9.0 et merci
comment je dois proceder?
svp indiquer mois la vari version de php
et la procedure d'instalation

1 réponse

cs_garfield90 Messages postés 388 Date d'inscription lundi 7 juillet 2003 Statut Webmaster Dernière intervention 10 février 2009
13 mai 2005 à 12:43
sous red hat tu dois pouvoir faire php -v si mes souvenir sont bon, sinon un petit php --help te donnera des infos

c'est des lignes de commande.

sinon, il te reste le phpinfo() dans un fichier php, c'est magique



sinon tu as dans les bouquin, la maniere pour installer php sous linux
et Windows donc un petit tour a la bibliotheque du coin, un petit
emprunt et hop le tour est joué



mais bon, voila un script shell, qui le fait bien ( celui marche pour la version 5)

a toi de l'adapter, mais n'oublie pas ton ami G



#!/bin/sh

##################################################

####

#

# script d'installation de :

# apache 1.3.33 + php 5.0.4/module

#

# Ce scrit est ecris par Laurent Jachimiak alias Elgi

# elgi_at_tiscali_dot_fr

# il est diffuse en opensource, merci de laisser ces

# quelques lignes.

#

# Pour le fichier httpd.conf d'apache :

#

# Attention php5 est en install minimal

#

# ce script est livre sans SAV

##################################################

####



# pour test

#PREFIX_APACHE=/opt/apache

#PREFIX_PHP=/opt/php

#PREFIX_PHP5=/opt/php5

# en mode "normal"

# a verifier tout de meme ou a sup pour apache et php4

# dans leur configure respectif.



PREFIX_APACHE=/usr/local/apache

PREFIX_PHP=/usr/local

PREFIX_PHP5=/usr/local/php5




FTP=ftp://ftp.ovh.net

MADEIN=made-in-ovh

MAJ=maj-ovh




wget $FTP/$MADEIN/$MAJ/apache_1.3.33.tar.gz -O apache_1.3.33.tar.gz

wget http://fr.php.net/distributions/php-5.0.4.tar.gz -O php-5.0.4.tar.gz






# on efface en cas où

rm -rf apache_1.3.33

rm -rf
php-5.0.4




tar xvzf apache_1.3.33.tar.gz

cd
apache_1.3.33


./configure



# install PHP5 for apache

cd ..

tar xvzf php-5.0.4.tar.gz



cd php-5.0.4

./configure \

--with-apache=../apache_1.3.33 \

--with-mysql \

--with-gd \

--with-jpeg-dir \

--with-png-dir \

--with-zlib-dir \

--enable-session\

--enable-spl \

--enable-pcre \

--enable-ftp \

--enable-bcmath \

--enable-calendar \

--disable-libxml \

--enable-trans-sid \

&& make && make install






# apache

cd ../apache_1.3.33

./configure \

--prefix=/usr/local/apache \

--activate-module=src/modules/php5/libphp5.a \

--enable-module=rewrite\

&& make && make install



cd /root/php-5.0.4

cp php.ini-dist /usr/local/lib/php.ini



/usr/local/apache/bin/apachectl stop

/usr/local/apache/bin/apachectl start



Bon, ca marche pour mon Serveur dédié chez OVH (RH 7.2), mais je crois
pas qu'il y est de raison pour que ca ne marche pas sur la RH 9

"They are 10 sorts of persons whose understand binary and whose not"
0
Rejoignez-nous