Installer Apache :
# apt-get install apache2
Installer Mysql :
# apt-get install mysql-server
Installer PHP :
# apt-get install php5 php5-mysql
Créer une base :
# mysql -uroot -p
mysql> create database BASE;
mysql> grant select,insert,update,delete,create,drop,alter on BASE.* to USER@localhost identified by 'PASS';
mysql> flush privileges;
Télécharger et installer WordPress :
$ cd /var/www
$ curl -O wordpress.org/latest.tar.gz
$ tar -xvzf latest.tar.gz
$ mv wordpress/ monsite/
$ cd
Mettre à jour le fichier wp-config :
$ vi /var/www/monsite/wp-config.php
define('WP_HOME','http://monsite.lan/'); define('WP_SITEURL','http://monsite.lan/'); define('DB_NAME', 'BASE'); define('DB_USER', 'USER'); define('DB_PASSWORD', 'PASS'); define('DB_HOST', 'localhost'); define('DB_CHARSET', 'utf8'); define('DB_COLLATE', 'utf8_general_ci'); define('WPLANG', 'fr_FR');
Configurer Apache :
# vi /etc/apache2/sites-available/monsite.conf
<VirtualHost *:80> ServerAdmin webmaster@localhost ServerName monsite.lan DocumentRoot /var/www/monsite DirectoryIndex index.php <Directory /var/www/monsite/> Options FollowSymLinks AllowOverride All </Directory> ErrorLog ${APACHE_LOG_DIR}/monsite.error.log CustomLog ${APACHE_LOG_DIR}/monsite.access.log combined </VirtualHost> # vim: syntax=apache ts=4 sw=4 sts=4 sr noet
Activer le virtualhost :
# a2ensite monsite.conf
# a2enmod rewrite.load
# a2enmod headers.load
# /etc/init.d/apache2 restart
Renseigner le DNS local :
# vi /etc/hosts
127.0.0.1 monsite.lan