Voici la commande apt-get permettant l’installation d’une pile LAMP basique sur ubuntu hardy 8.04, avec en plus quelque commandes de base pour demarrer rapidement.
D’abord,
sudo apt-get install apache2 php5-mysql libapache2-mod-php5 mysql-server php5-gd phpmyadmin
Cette commande va installer apache 2 php 5.2 and mysql server 5 et leur dépendences. Les deamons sont lancé après l’installation et généralement, seul apache2 a besoin d’un peu de configuration.
Pour activer le dossier ~/public_html (celui qu’on atteind avec cette URL dans un navigateur http://localhost/~username) :
sudo a2enmod userdir && sudo /etc/init.d/apache2 restart
Le dossier racine par défaut est /var/www (il faut les privilèges super utilisateur pour écrire dans ce dossier), mais vous pouvez ajouter d’autres sites. Editez un nouveau fichier de configuration pour le nouveau site :
gksudo gedit /etc/apache2/sites-available/<nom_du_site>
Remplacez
Pour activer ce nouveau site, faites :
sudo a2ensite <nom_du_site> && sudo /etc/init.d/apache2 restart
Pour administrer les bases et utilisateurs mysql, utilisez simplement phpmyadmin en entrant cette URL dans un navigateur : http://localhost/phpmyadmin
Le fichier de configuration de php est situé ici : /etc/php5/apache2/php.ini et neccessite un redémarrage de apache si vous y faites des modifications.






english
français
Wow, this saved me. It’s been a long time since I’ve had to install an ubuntu server w/ desktop environment and could’t remember how I got LAMP on the desktop version. Thanks, much appreciated.
Glad it helps ya
Thanks for this. I was in the same boat as Matt after doing a fresh install of Kubuntu 8.04 for my home server. Much appreciated.
You’re most welcome
If the 127.0.0.1/phpmyadmin is giving you 404, try creating a link to /usr/share/phpmyadmin
type this in console: sudo ln -s /usr/share/phpmyadmin phpmyadmin
worked for me
Requesting http://localhost/phpmyadmin should work for everyboby.
Otherwise, I’d rather link /usr/share/phpmyadmin in /var/www
tasksel is your friend if you wanna do all these stuffs, and not only that
it will give you a lot of options from setting up a server service like: DNS, Mail, Samba, etc. to Ubuntu Studio …
just make sure your connection is broadband.
choose a mirror close to you before you do this.
i assume you already installed ubuntu desktop in your box so you can
change the package repositories easily from the administration menu.
then you may type: sudo tasksel
hope it helps
[...] Continued here: ayozone " Blog Archive " LAMP install on ubuntu hardy [...]