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: www.website.ro, we start the mapping by creating folders:

mkdir /home/www/ 
mkdir /home/www/www.linuxquestions.ro 
mkdir /home/www/www.website.ro/htdocs 
mkdir /home/www/www.website.ro/cgi-bin 
mkdir /home/www/www.website.ro/logs

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 www.website.ro
# #ip-ul e fictiv :) 
ServerAdmin webmaster@website.ro ServerName www.website.ro ServerAlias website.ro 
# Indexes + Directory Root. 
DirectoryIndex index.html DocumentRoot /home/www/www.website.ro/htdocs/ 
# CGI Directory ScriptAlias /cgi-bin/ /home/www/www.website.ro/cgi-bin/ Options +ExecCGI 
# Logfiles ErrorLog /home/www/www.website.ro/logs/error.log CustomLog /home/www/www.lwebsite.ro/logs/access.log 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 gnulinux.ro
    Like
  • unmoved gnulinux.ro
    Unmoved
  • amused gnulinux.ro
    Amused
  • excited gnulinux.ro
    Excited
  • angry gnulinux.ro
    Angry
  • sad gnulinux.ro
    Sad
TENDINTA  |  Linux commands - most commonly used
John Doe                   gnulinux.ro
John Doe
Articole publicate de la contributori ce nu detin un cont pe gnulinux.ro. Continutul este verificat sumar, iar raspunderea apartine contributorilor.
306 articole
In context



  • Comment
  • powered by Verysign

Nici un comentariu inca. Fii primul!