Installer serveur Web Apache/PHP/MySQL sous FreeBSD
From Tuxunix
Contents |
Server WEB sous FreeBSD
Installer Apache sous FreeBSD 6.2
- Installation d'apache 2.2 depuis les ports FreeBSD!
Compilation d'apache 2.2
#> cd /usr/ports/www/apache22 #> make install
la compilation va prendre un certain temps... bon café...
#> ls -l /usr/local/etc/apache22/httpd.conf (configuration http).
Automatiser le lancement du daemon HTTP au démarrage du serveur
#> echo 'apache22_enable="YES"' >> /etc/rc.conf
Apache starting...
#> apachectl start
Verification du bon fonctionnement
- Le répertoire racine de votre site Web :
/usr/local/www/apache22/data.
Install Mysql
#> cd /usr/ports/databases/mysql51-server #> make install WITH_OPENSSL=yes WITH_CHARSET=latin1 WITH_XCHARSET=all WITH_COLLATION=latin1_swedish_ci #> echo 'mysql_enable="YES"' >> /etc/rc.conf #> /usr/local/etc/rc.d/mysql-server start
Module PHP
#> cd /usr/ports/lang/php5 #> make install (Ne pas oublier de selectionner "Apache") #> cd /usr/ports/lang/php5-extensions #> make install #> cd /usr/local/etc/ #> cp php.ini-recommended php.ini (initialisation des variables)
Configuration d'apache pour PHP
#> vi /usr/local/etc/apache22/httpd.conf
- Ajouter dans la section : AddType application/x-httpd-php .php
- Ajouter dans la section : DirectoryIndex index.html, index.php
Restart service
#> apachectl stop #> apachectl start

