Installing LAMP on Debian and apache mapping in / home / www /. First of all, you must be logged in as root in order to achieve the following.

Login is as follows:

su parola_root ->enter

Installing apache 2

apt-get install apache2

Install php

apt-get install php-mysql apt-get install phpmyadmin

Install Mysql

apt-get install mysql-server apt-get install libapache2-mod-auth-mysql

At the end we have to set a password on mysql.

If we have Debian etch installed we will have to do it manually like this:

mysqladmin -u root password parola_ta mysqladmin -h root@nume_sistem -u root -p password parola_ta

Or if we have Debian lenny then at the end of the installation of the mysql server we will be asked to set a password for the root account (this mode is currently only on lenny because the latest version of Mysql is not yet included on etch).

Apache mapping on / home / www / as follows: Let's say we have the address:, we start the mapping by creating folders:

mkdir /home/www/ 
mkdir /home/www/ 
mkdir /home/www/ 
mkdir /home/www/ 
mkdir /home/www/

In the htdocs folder we put the site, in cgi-bin if we have scripts like this, and in the logs we will have the log files where we can see who enters, where it enters, what errors are if they are, etc.

The last step is to configure the virtual.conf file (this file must be created) as follows: In the console or other editor, I will give you the console mode. (If the file does not exist, the nano will create it.)

nano /etc/apache2/conf.d/virtual.conf

Where to insert the following code:

# # Configurare/mapare pentru site-ul
# #ip-ul e fictiv :) 
ServerAdmin ServerName ServerAlias 
# Indexes + Directory Root. 
DirectoryIndex index.html DocumentRoot /home/www/ 
# CGI Directory ScriptAlias /cgi-bin/ /home/www/ Options +ExecCGI 
# Logfiles ErrorLog /home/www/ CustomLog /home/www/ combined

And at the end restart apache and you have the functional site:

/etc/init.d/apache2 restart

  • What is your reaction?
  • powered by Verysign
  • like
  • unmoved
  • amused
  • excited
  • angry
  • sad
TENDINTA  |  Nitrux 1.4.0 - the latest software updates, bug fixes and performance impro...
John Doe         
John Doe
Articole publicate de la contributori ce nu detin un cont pe Continutul este verificat sumar, iar raspunderea apartine contributorilor.
261 articole
In context

  • Comment
  • powered by Verysign

Nici un comentariu inca. Fii primul!