Recent Changes - Search:




To install the default LAMP stack in Ubuntu

Server Guide

The Apache2 web server is available in Ubuntu Linux. To install Apache2:

      At a terminal prompt enter the following command:

      sudo apt-get install apache2

Check :

The default Apache2 configuration file is /etc/apache2/apache2.conf

sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/mynewsite Edit the new file

  root@gOS-vmware-virtual-appliance:/etc/init.d# ./apache2 stop
   * Stopping web server apache2

apache2: Could not reliably determine the server's fully qualified domain name, using for ServerName

Setup ServerName in /etc/apache2/apache2.conf

  • Note:Change to to cause Apache2 to listen only on loopback interface so that it will not be available to the Internet This directive can be found and changed in file, /etc/apache2/ports.conf
  • NoteThe /etc/apache2/sites-available directory is not parsed by Apache2. Symbolic links in /etc/apache2/sites-enabled point to "available" sites. Use the a2ensite (Apache2 Enable Site) utility to create those symbolic links, like so: sudo a2ensite mynewsite where your site's configuration file is /etc/apache2/sites-available/mynewsite. Similarly, the a2dissite utility should be used to disable sites.

For example, to install the Apache2 module for MYSQL authentication, you can run the following command from a terminal prompt:

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

Once you install the module, the module will be available in the /etc/apache2/mods-available directory. You can use the a2enmod command to enable a module. You can use the a2dismod command to disable a module. Once you enable the module, the module will be available in the the /etc/apache2/mods-enabled directory

As of Ubuntu 7.04 (Feisty), all PHP4 packages have been dropped from the repositories, as the PHP4 branch is not being further developed/supported by the PHP Group.

If libapache2-mod-php5 is already installed, the php4 package will install libapache-mod-php4 and not libapache2-mod-php4 package.


Set Mysql password : mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('yourpassword');

In Feisty, the Ubuntu base system includes Tasksel. You can either install LAMP using tasksel or install the LAMP packages as detailed above.

   sudo tasksel install lamp-server

Tasksel is a software installation application that is an integral part of the Debian installer. It groups some packages by tasks and offers the user an easy way to install the packages for that task. It provides the same functionality as using conventional meta-packages.

Since Ubuntu Edgy, tasksel has been included as part of the base installation. Tasksel is present on all versions of Ubuntu's installer, but previously was not installed on the base system.

Task descriptions

Here are the long descritions of a few common tasks:

dns-server Selects the BIND DNS server and its documentation.

edubuntu-server This task provides the Edubuntu classroom server.

lamp-server Selects a ready-made Linux/Apache/MySQL/PHP server.

ubuntu-desktop This task provides the Ubuntu desktop environment.

ubuntu-live This task provides the extra packages installed on the Ubuntu live CD. It is neither useful nor recommended to install this task in other environments.

Edit - History - Print - Recent Changes - Search
Page last modified on March 22, 2008, at 02:19 AM