====== Installer Apache/Php/Mod_SSL ======
===== Récupération des sources =====
ApacheArchiveBase=apache_1.3.41
PhpArchiveBase=php-5.2.9
ModgzipArchiveBase=mod_gzip.c
ModsslArchiveBase=mod_ssl-2.8.31-1.3.41
wget ftp://mir1.ovh.net/ftp.apache.org/dist/httpd/${ApacheArchiveBase}.tar.gz
wget http://www.modssl.org/source/${ModsslArchiveBase}.tar.gz
wget ftp://ftp.ovh.net/made-in-ovh/maj-ovh/${ModgzipArchiveBase}.gz
wget http://www.php.net/get/${PhpArchiveBase}.tar.gz/from/fr.php.net/mirror -O ${PhpArchiveBase}.tar.gz
rm -rf ${ApacheArchiveBase}
tar zxf ${ApacheArchiveBase}.tar.gz
rm -rf ${ModsslArchiveBase}
tar zxf ${ModsslArchiveBase}.tar.gz
rm -rf ${PhpArchiveBase}
rm -f ${ModgzipArchiveBase}
gunzip -f ${ModgzipArchiveBase}.gz
tar zxf ${PhpArchiveBase}.tar.gz
===== Pré-configurer Apache =====
cd ${ApacheArchiveBase}
cp ../mod_gzip.c src/modules/extra/
./configure --prefix=/usr/local/apache
cd ..
===== Installe Mod_SSL pour Apache =====
cd ${ModsslArchiveBase}
./configure \
--with-apache=../${ApacheArchiveBase} \
--with-ssl \
--prefix=/usr/local/apache
cd ..
===== Installe PHP pour Apache =====
cd ${PhpArchiveBase}
./configure \
--prefix=/usr/local/php5 \
--with-apache=/usr/local/src/${ApacheArchiveBase} \
--with-xsl \
--with-gd \
--enable-gd-native-ttf \
--with-jpeg-dir \
--with-png-dir \
--with-mysql=/home/mysql \
--with-zlib-dir \
--with-mcrypt \
--with-openssl \
--enable-sysvsem \
--enable-sysvshm \
--with-iconv-dir \
--enable-mbstring=all \
--enable-mbregex \
&& make && make install
Et si on veut quelques packages PEAR:
/usr/local/php5/bin/pear -d preferred_state=beta install OLE
/usr/local/php5/bin/pear -d preferred_state=beta install Spreadsheet_Excel_Writer
===== Installation d'Apache =====
cd ../${ApacheArchiveBase}
# --add-module=src/modules/extra/mod_gzip.c \
./configure \
--prefix=/usr/local/apache \
--activate-module=src/modules/php5/libphp5.a \
--enable-module=rewrite \
--enable-module=ssl \
--disable-module=userdir \
--disable-module=negotiation \
--disable-module=autoindex \
--disable-module=asis \
--disable-module=imap \
&& make && make install
cd ..
Argh! Erreur :
<=== src/modules
gcc -c -I./os/unix -I./include -DLINUX=22 -DHAVE_SET_DUMPABLE -I/usr/include/db1 -DMOD_SSL=208131 -DEAPI -DNO_DL_NEEDED `./apaci` modules.c
gcc -c -I./os/unix -I./include -DLINUX=22 -DHAVE_SET_DUMPABLE -I/usr/include/db1 -DMOD_SSL=208131 -DEAPI -DNO_DL_NEEDED `./apaci` buildmark.c
gcc -DLINUX=22 -DHAVE_SET_DUMPABLE -I/usr/include/db1 -DMOD_SSL=208131 -DEAPI -DNO_DL_NEEDED `./apaci` -L/usr/lib \
-o httpd buildmark.o modules.o modules/standard/libstandard.a modules/ssl/libssl.a modules/php5/libphp5.a main/libmain.a ./os/unix/libos.a ap/libap.a -Wl,-rpath,/usr/local/lib -Wl,-rpath,/home/mysql/lib -rdynamic -L/usr/local/lib -L/home/mysql/lib -Lmodules/php5 -L../modules/php5 -L../../modules/php5 -lmodphp5 -rdynamic -L/usr/local/lib -L/home/mysql/lib -lcrypt -lexslt -lcrypt -lrt -lmysqlclient -lmcrypt -lltdl -lpng -lz -ljpeg -lz -lssl -lcrypto -lresolv -lm -ldl -lnsl -lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -lcrypt -lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -lxslt -lxml2 -lz -lm -lcrypt -lm -lcrypt -lndbm -lssl -lcrypto -lexpat
modules/php5/libphp5.a(php_mysql.o): In function `zm_startup_mysql':
/usr/local/src/php-5.2.9/ext/mysql/php_mysql.c:405: undefined reference to `mysql_server_init'
modules/php5/libphp5.a(php_mysql.o): In function `zm_shutdown_mysql':
/usr/local/src/php-5.2.9/ext/mysql/php_mysql.c:426: undefined reference to `mysql_server_end'
modules/php5/libphp5.a(php_mysql.o): In function `zif_mysql_set_charset':
/usr/local/src/php-5.2.9/ext/mysql/php_mysql.c:1120: undefined reference to `mysql_set_character_set'
collect2: ld returned 1 exit status
J'ai ouvert le bug http://bugs.php.net/?id=47715 puis refermé car le Scott m'a mené sur la bonne voie.
Le build d'Apache à essayer de linké avec les libs mysql de /usr/lib sans rechercher celles dans /home/mysq/lib.
Du coup j'ai effacé :
* /usr/lib/libmysql*
* /usr/include/mysql
* /usr/bin/my*
* /usr/share/mysql
* et encore quelques autres trucs
Et c'est reparti comme en 14. Le build a réussi !