Install apache2, php and mysql

iKnow-IT banner

1.    # apt-get install apache2
       test your site http://localhost/
( /var/www/ )
# apt-get install php5 libapache2-mod-php5
       # /etc/init.d/apache2 restart
       # vi /var/www/testphp.php
      add the following line to this file:    <?php phpinfo(); ?>
       test your site: http://localhost/testphp.php

2.   #  apt-get install mysql-server
       # vi /etc/mysql/my.cnf
               Change the line
               bind-address =
               And change the to your IP address.
       # mysql -u root -p
               mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('<pwd>');

3.   # apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin
               select apache2 !!!!! (with space bar)
               3x <pwd>
       # vi /etc/php5/apache2/php.ini
       Change this line:
               To look like this:
Create file /etc/apache2/httpd.conf
insert the line: ServerName localhost
       # /etc/init.d/apache2 restart
               create db: <dbname>