Haut gauche
Spacer
Sommaire
Services
Aide
Aide générale
Aide création
Aide CGI
Aide recherche
Références
Spacer
Spacer
English version
Logo Serveurs.Net Haut droit

Installation de Apache :

Installation de Apache :

Nous proposons dans ce chapitre d'installer Apache avec mod_auth_mysql, mod_ssl qu'il faut intégrer dans les sources de Apache bien que nous les voulions en modules objets dynamiques. Pour mod_php, l'installation est expliquer plus loin.

Décompacter l'archive téléchargée sur le serveur de la fondation Apache :

[nikko@home tmp]$ gunzip -c apache_1.3.X.tar.gz |tar -xf –

Intégration des modules dans les sources de Apache

Il faut ensuite installer les deux modules mod_auth_mysql et mod_ssl dans l'arbre des sources de Apache.

Mod_auth_mysql

Nous commençons par ajouter le module d'authentification MySQL :

[nikko@home tmp]$ gunzip -c mod_auth_mysql-2.20.tar.gz | tar -xf -
[nikko@home tmp]$ cd mod_auth_mysql-2.20
[nikko@home mod_auth_mysql-2.20]$./configure --with-mysql=/usr --with-shared-apache=../apache_1.3.X --with-apache=../apache_1.3.X
creating cache ./config.cache
checking for gcc... gcc
checking whether the C compiler (gcc ) works... yes
checking whether the C compiler (gcc ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking whether gcc and cc understand -c and -o together... yes
checking for ranlib... ranlib
checking how to run the C preprocessor... gcc -E
checking for crypt.h... yes
checking for crypt... no
checking for crypt in -lc... no
checking for crypt in -lcrypt... yes
checking for standard DES crypt... yes
checking for extended DES crypt... yes
checking for MD5 crypt... yes
checking for Blowfish crypt... yes
checking for Apache module support via DSO through APXS... no
checking for Apache module support via DSO through APACI... yes - Shared Apache 1.3.x
checking for Apache directory... ../apache_1.3.X
Detected Apache 1.3.x
checking for MySQL directory... /usr
updating cache ./config.cache
creating ./config.status
creating Makefile
creating libauth_mysql.module
creating config.h

Please run 'make'
[nikko@home mod_auth_mysql-2.20]$

Après cela, exécuter make :

[nikko@home mod_auth_mysql-2.20]$make

mkdir -p ../apache_1.3.X/src/modules/auth_mysql; cp mod_auth_mysql.* ../apache_1.3.X/src/modules/auth_mysql; cp apMakefile.tmpl ../apache_1.3.X/src/modules/a uth_mysql/Makefile.tmpl; cp config.h ../apache_1.3.X/src/modules/auth_mysql/auth_mysql_config.h; cp apMakefile.libdir ../apache_1.3.X/src/modules/auth_mysql/Makefile.libdir; cp *.module ../apache_1.3.X/src/modules/auth_mysql

+------------------------------------------------------------------+
| In order to proceed, please run the Apache configure script, and |
| add the following option:                                        |
| --activate-module=src/modules/auth_mysql/libauth_mysql.a         |
|                                                                  |
| and run make.                                                    |
+------------------------------------------------------------------+
| If you are upgrading from an earlier version of mod_auth_mysql,  |
| you would have to update your .htaccess files to reflect the     |
| changes in the directive names.  You can do that automatically   |
| by running the bundled update_htaccess_files.sh script.          |
+------------------------------------------------------------------+
| Please register this module at                                   |
| http://bourbon.netvision.net.il/mod_auth_mysql/                  |
|                                                                  |
| Thanks for using mod_auth_mysql!                                 |
+------------------------------------------------------------------+

[nikko@home mod_auth_mysql-2.20]$

Cette opération enrichie l'arbre des sources de Apache en ajoutant un sous-répertoire auth_mysql dans le répertoire module.

Mod_ssl

Il faut ensuite, « patcher » les sources Apache afin d'y intégrer mod_ssl :

[nikko@home mod_auth_mysql-2.20]$ cd ..
[nikko@home tmp]$ gunzip -c mod_ssl-2.Y.Z-1.3.X.tar.gz | tar -xf -
[nikko@home tmp]$ cd mod_ssl-2.Y.Z-1.3.X
[nikko@home mod_ssl-2.Y.Z-1.3.X]$./configure --with-apache=../apache_1.3.X \
--with-ssl=../openssl-0.9.W
Configuring mod_ssl/2.Y.Z for Apache/1.3.X
 + Apache location: ../apache_1.3.X (Version 1.3.X)
 + OpenSSL location: ../openssl-0.9.W
 + Auxiliary patch tool: ./etc/patch/patch (local)
 + Applying packages to Apache source tree:
   o Extended API (EAPI)
   o Distribution Documents
   o SSL Module Source
   o SSL Support
   o SSL Configuration Additions
   o SSL Module Documentation
   o Addons
Done: source extension and patches successfully applied.

Configuring for Apache, Version 1.3.X
 + using installation path layout: Apache (config.layout)
Creating Makefile
Creating Configuration.apaci in src
Creating Makefile in src
 + configured for Linux platform
 + setting C compiler to gcc
 + setting C pre-processor to gcc -E
 + checking for system header files
 + adding selected modules
    o ssl_module uses ConfigStart/End
      + SSL interface: mod_ssl/2.Y.Z
      + SSL interface build type: OBJ
      + SSL interface compatibility: enabled
      + SSL interface experimental code: disabled
      + SSL interface conservative code: disabled
      + SSL interface vendor extensions: disabled
      + SSL interface plugin: Built-in SDBM
      + SSL library path: /home/nikko/tmp/openssl-0.9.W
      + SSL library version: OpenSSL 0.9.W dd Mon YEAR
      + SSL library type: source tree only (stand-alone)
      + SSL library plugin mode: none
 + enabling Extended API (EAPI)
 + checking sizeof various data types
 + doing sanity check on compiler and options
Creating Makefile in src/support
Creating Makefile in src/regex
Creating Makefile in src/os/unix
Creating Makefile in src/ap
Creating Makefile in src/main
Creating Makefile in src/lib/expat-lite
Creating Makefile in src/modules/standard
Creating Makefile in src/modules/ssl

Now proceed with the following commands:
 $ cd ../apache_1.3.X
 $ make
 $ make certificate
 $ make install
[nikko@home mod_ssl-2.Y.Z-1.3.X]$
	  

Ceci fait, nous pouvons compiler Apache.

Apache

Compilation de Apache a partir du code source. Nous utilisons :

[nikko@home apache_1.3.X]$ SSL_BASE=/usr/local ./configure --enable-shared=ssl \
--activate-module=src/modules/auth_mysql/libauth_mysql.a --enable-shared=max \
--enable-rule=EAPI --enable-module=ssl
Configuring for Apache, Version 1.3.X
 + using installation path layout: Apache (config.layout)
 + activated auth_mysql module (modules/auth_mysql/libauth_mysql.a)
Creating Makefile
Creating Configuration.apaci in src
 + enabling mod_so for DSO support
Creating Makefile in src
 + configured for Linux platform
 + setting C compiler to gcc
 + setting C pre-processor to gcc -E
 + checking for system header files
 + adding selected modules
    o ssl_module uses ConfigStart/End
      + SSL interface: mod_ssl/2.Y.Z
      + SSL interface build type: DSO
      + SSL interface compatibility: enabled
      + SSL interface experimental code: disabled
      + SSL interface conservative code: disabled
      + SSL interface vendor extensions: disabled
      + SSL interface plugin: Built-in SDBM
      + SSL library path: /usr/local
      + SSL library version: OpenSSL 0.9.W dd Mon YEAR
      + SSL library type: installed package (stand-alone)
      + SSL library plugin mode: none
    o auth_mysql_module uses ConfigStart/End
 + enabling Extended API (EAPI)
 + using -ldl for vendor DSO support
 + checking sizeof various data types
 + doing sanity check on compiler and options
Creating Makefile in src/support
Creating Makefile in src/regex
Creating Makefile in src/os/unix
Creating Makefile in src/ap
Creating Makefile in src/main
Creating Makefile in src/lib/expat-lite
Creating Makefile in src/modules/standard
Creating Makefile in src/modules/ssl
Creating Makefile in src/modules/auth_mysql
[nikko@home apache_1.3.X]$ make
	  

Attention, dans la commande précédente, l'ordre des options est important. En respectant, l'ordre fournie ci-dessus, mod_auth_mysql est compilé en mode dynamique (DSO) par contre, si la déclaration du --activate-module=src/modules/auth_mysql/libauth_mysql.a est faites après --enable-shared=max, le module est compilé avec apache en static.

Une fois l'application compilée, il faut créer un certificat :

[nikko@home apache_1.3.X]$ make certificate

Ensuite nous pouvons installer le logiciel :

[nikko@home apache_1.3.X]$ make install

 

Spacer
Bas
© 1999-2016 Serveurs.Net Un service Serveurs.Net.