Let's decide what we need for this wonderful task:
1. Installed system, in our case Debian 6 "Squeeze" (I think there is no need to go into detail on installation of this system because there are more than enough articles on this subject in web). It is assumed that you know how to create folders from console, make links and install program packages.
2. Environment for Drupal:
2.1. Web server (e.g., Apache)
2.2. PHP
2.3. Database server (e.g. MySQL, PostgreSQL)
Before starting installation, let's see if there are no updates for our system, we'll launch corresponding commands for that:
drupal@debian6:~$ sudo apt-get update drupal@debian6:~$ sudo apt-get upgrade
Then we install Apache, PHP.
drupal@debian6:~$ sudo apt-get install apache2 apache2-doc php5 libapache2-mod-php5 php-pear drupal@debian6:~$ sudo apt-get install php5-curl php5-gd php5-idn php5-imagick php5-ldap php5-imap php5-memcache php5-mhash php5-mysql php5-ps php5-pspell php5-sqlite php5-suhosin php5-tidy imagemagick php5-xcache php5-xdebug php5-xmlrpc php5-xsl build-essential php5-dev bzip2
Activate rewrite module:
drupal@debian6:~$ sudo a2enmod rewrite
As Database server MySQL can be installed:
drupal@debian6:~$ sudo apt-get install mysql-server drupal@debian6:~$ sudo apt-get install mysql-client
Or instead of MySQL, MariaDB can be installed:
drupal@debian6:~$ sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 1BB943DB drupal@debian6:~$ sudo nano /etc/apt/sources.list.d/mariadb.list
And add two lines into the file
deb http://mirror.de.gsnw.de:56431/mariadb/repo/5.2/debian squeeze mai
deb-src http://mirror.de.gsnw.de:56431/mariadb/repo/5.2/debian squeeze main
drupal@debian6:~$ sudo apt-get update drupal@debian6:~$ sudo apt-get install mariadb-server
If you don't really like working with console, you can install phpmyadmin for the work with bases:
drupal@debian6:~$ sudo apt-get install phpmyadmin
Now you can see it at http://localhost/phpmyadmin (if you work at one computer) or at http://your_ip/phpmyadmin (if environment is at remote computer).
your_ip - is IP-address where everything is installed.
Instead of writing long name, it can be shortened from http://localhost/phpmyadmin into http://localhost/pma. You must edit configuration file for that
drupal@debian6:~$ sudo nano /etc/phpmyadmin/apache.conf
in Alias line /phpmyadmin usr/phpmyadmin change /phpmyadmin into /pma or any other convenient name, and restart apache:
drupal@debian6:~$ sudo /etc/init.d/apache2 restart
Now when everything is installed, you can start setting directories, virtual hosts and permissions for folders.
On default we'll keep all our sites in /var/www folder, but permissions for it are only for root. Let's change them for our user:
drupal@debian6:~$ sudo chown -R drupal:drupal /var/www
To check PHP work, we'll use phpinfo
drupal@debian6:~$ sudo nano /var/www/phpinfo.php
Insert
phpinfo();
And check its work at http://localhost/info.php