vendredi 10 décembre 2010

Faire sortir le génie de la L.A.M.P...

A priori si ta machine est en état de fonctionner, il ne te reste plus qu'a frotter la L.A.M.P et exaucer tes 3 voeux :
sudo aptitude mysql-server
sudo aptitude apache2
sudo aptitude php5 php5-cli
Tester apache :
sudo service apache2 status
Apache is running (pid 00000).
a ce niveau ton serveur apache est démarré

Tester MySQL
sudo service mysql status
mysql start/running, process 00000
a ce niveau ton serveur mysql est démarré

Tester PHP
php <<info | more
> <?php phpinfo(); ?>
> info
phpinfo()
PHP Version => 5.2.4-2ubuntu5.12

System => Linux localhost 2.6.24-19-server #1 SMP Wed Aug 20 23:54:28 UTC 2008 i686
Build Date => Sep 20 2010 13:15:27
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /etc/php5/cli
Loaded Configuration File => /etc/php5/cli/php.ini
Scan this dir for additional .ini files => /etc/php5/cli/conf.d
additional .ini files parsed => /etc/php5/cli/conf.d/apc.ini,
[...]

et..
sudo touch /var/www/info.php
sudo echo "<?php phpinfo(); ?>" > /var/www/info.php

ouvrir un navigateur sur http://localhost/info.php

ou encore...
curl http://localhost/info.php > info.html
sed -e :a -e 's/<[^>]*>//g;/</N;//ba' info.html > info.txt
cat info.txt | more



body {background-color: #ffffff; color: #000000;}
body, td, th, h1, h2 {font-family: sans-serif;}
pre {margin: 0px; font-family: monospace;}
a:link {color: #000099; text-decoration: none; background-color: #ffffff;}
[...]


phpinfo()



PHP Version 5.2.4-2ubuntu5.12



System Linux localhost 2.6.24-19-server #1 SMP Wed Aug 20 23:54:28 UTC 2008 i686
Build Date Sep 20 2010 12:57:55
Server API Apache 2.0 Handler
Virtual Directory Support disabled
Configuration File (php.ini) Path /etc/php5/apache2
Loaded Configuration File /etc/php5/apache2/php.ini
[...]


Si pour toi tout ne c'est pas passé comme prévu, je t'invites a poster ta question et ton message d'erreur ici...

Aucun commentaire:

Enregistrer un commentaire