My Lubuntu install on laptop

Download & Install

In order for me to know which file to download for the install I need to know what my hardware is.

  • Laptop: Panasonic CF-F9
  • Processor: Intel Core i5 M 520 @2.40GHz
  • Memory (RAM): 1.17GHz, 1.86GB
  • Bus Width: 32-bit
  • FAX Modem: HDAUDIO Soft Data Fax Modem with SmartCP
  • Display: Plug and Play Monitor
  • Mouse: Synaptics PS/2 Port Touchpad
  • Keyboard: Standard 101/102-key or Microsoft Natural PS/2 Keyboard
  • Video Chipset: Intel Graphics Media Accelerator HD
  • Disk Drive: Toshiba MK3265GSX
  • Bluetooth: USB Bluetooth Driver (ALPS)
  • Power Control: Microsoft ACPI-Control Method Battery
  • Network Adapter 1: Intel 82577LM Gigabit Network Connection
  • Network Adapter 2: Intel Centrino Advanced-N 6200 AGN

I downloaded lubuntu-12.04-desktop-i386.iso

I burned it using my Mac’s Disk Utility.

I ran the install CD. It took some fiddling around with the boot up sequence in BIOS Setup. Two settings had to be changed: 1. Activate optical device on start. 2. Make the optical device the primary boot disk.

I needed to connect the laptop to the Internet through a direct Ethernet wire to my router.

I created a user for the system:

  • Computer Name: sameh-Panasonic-TB
  • U/N: sameh (Sameh R. Labib)
  • P/W: haga_helwa-bel_Engeleezy-Kamastashar

Suggested package to enhance videos with gnome mplayer: lubunto-restricted-extras

I setup Chromium browser. I fed it my Google username and password.

What the System Profiler shows

Screen Resolution 1440x900
Home Directory /home/sameh
Operating System Kernel Linux 3.2.0-generic (i686)
Distribution Ubuntu 12.04 LTS
Desktop Environment LXDE (Lubuntu)
Device Mount Point
/dev/sda1 /
udev /dev
none /run/lock
none /run/shm
Environment Variables (partial list)
Name Value
USER sameh
HOME /home/sameh
PATH /usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
SHELL /bin/bash
PWD /home/sameh
Users (partial list)
username who that person is
irc ircd
sameh Sameh R. Labib
Network Interfaces
Interface Name IP Address
eth0 N/A
Network IP Connections (partial list)
Local Address Protocol udp tcp tcp tcp
other Network stuff
Routing Table
ARP Table
DNS Servers
Shared Directories

Dropbox Install

From the Dropbox website I downloaded:


That file is for installing Dropbox on a 32-bit Ubuntu OS.

GDebi Package Installer took care of the installation—and gave me a quick link to run Dropbox for the first time so I can finish the installation and setup.

Wallpaper & Task Bar (Panel) Changes

To change the wallpaper:

  1. right click the desktop
  2. choose Desktop Preferences
  3. choose Appearance tab
  4. choose wallpaper image file

I used Black_wooden_floor-1920x1200-1.jpg—which is found in /home/sameh/Dropbox/Photos/Pics for my website.

I moved the Task Bar to the top and changed its color and opacity. Now it looks more like a Mac.

Firefox Browser

I installed Firefox by using the Synaptic Package Manager. Then, I transferred my Firefox Bookmarks from my iMac to the laptop. This involved exporting them to an HTML file; Placing that file in Dropbox; Then, importing them into Firefox on the laptop.

Firefox Add-ons

These are the Add-ons I use:

  • BuiltWith
  • ColorZilla
  • ShowIP
  • Firebug
  • Font Finder
  • Dark Fox (skin)
  • Global Menu Bar integration
  • Personas
  • Ubuntu Firefox Modifications

Fork in Post

Before you continue — know this — This post was becoming too long; So, I started a second called Lubuntu cont’d — Actual Apache2 Configuration


To find instructions for installing Apache I googled: install LAMP on Ubuntu. I ended up with: HTTPD – Apache2 Web Server

I will be cross checking the steps I take here with the ones I took when I installed my MAMP stack.

I installed the apache2 package for Lubuntu 12.04.

One thing I’ve noticed about the configuration instructions is that they are different from what I’m used to. The configuration is scattered in different places in the file system instead of being mostly in the httpd.conf file.

Always, use instructions for installing LAMP components based on instructions specific to my LINUX distribution from now on.

To edit Apache configuration files I must be logged in as root. I shouldn’t have tried to set up the root password using the GUI. Next time open up a terminal and use the command:

sudo passwd root

I found the instructions at How To Set The root Password In Ubuntu.

Apache2 Configuration Files & Directories

Mostly this material is copied from HTTPD – Apache2 Web Server. See Why I Copy other People’s Writings.


  • is a configuration file
  • for global settings


  • is a directory
  • for configuration files which apply globally


  • is a configuration file where environment variables are set


  • is a configuration file
  • historically the main configuration file
  • Now, the file is typically empty, as most configuration options have moved to the below mentioned directories. The file can be used for configuration options that globally affect Apach2.


  • is a directory
  • for configuration files to both load modules and configure them
  • Not all modules have specific configuration files.


  • is a directory
  • contains symlinks to the files in /etc/apache2/mods-available

Any time you change configuration restart the Apache2 server daemon.


  • is a configuration file
  • houses the directives that determine which TCP ports Apache2 is listening on


  • is a directory
  • has configuration files for Virtual Hosts. Virtual Hosts allow Apache2 to be configured for multiple sites that have separate configurations.


  • is a directory
  • holds symlinks to activate particular Virtual Hosts
  • works like mod-enabled

In addition, other configuration files may be added using the Include directive, and wildcards can be used to include many configuration files. Any directive may be placed in any of these configuration files.

The server also reads a file containing mime document types; the filename is set by the TypesConfig directive, typically via /etc/apache2/mods-available/mime.conf, which might also include additions and overrides, and is /etc/mime.types by default.

Basic Apache2 Settings

This section explains Apache2 server essential configuration parameters. Refer to the Apache2 Documentation for more details.

localhost or some alias thereof is the FQDN for the default Virtual Host (VH.)

Apache2 ships configured with a single default virtual host (using the VirtualHost directive). To make configuration changes which apply ONLY to this single (default) VH then I should edit:


If you wish to configure a new virtual host or site, copy that file into the same directory with a name you choose. For example:

sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/mynewsite

Edit the new file to configure the new site using some of the directives described below.

The ServerAdmin directive specifies the email address to be advertised for the server’s administrator. Find this directive in your site’s configuration file in /etc/apache2/sites-available.

The Listen directive specifies the port, and optionally the IP address, Apache2 should listen on. If the IP address is not specified, Apache2 will listen on all IP addresses assigned to the machine it runs on. The default value for the Listen directive is 80. Change this to to cause Apache2 to listen only on your loopback interface so that it will not be available to the Internet, to (for example) 81 to change the port that it listens on, or leave it as is for normal operation. This directive can be found and changed in its own file, /etc/apache2/ports.conf

The ServerName directive is optional and specifies what FQDN your site should answer to. The default virtual host has no ServerName directive specified, so it will respond to all requests that do not match a ServerName directive in another virtual host. If you have just acquired the domain name and wish to host it on your Ubuntu server, the value of the ServerName directive in your virtual host configuration file should be Add this directive to the new virtual host file you created earlier (/etc/apache2/sites-available/mynewsite).

You may also want your site to respond to, since many users will assume the www prefix is appropriate. Use the ServerAlias directive for this. You may also use wildcards in the ServerAlias directive.

For example, the following configuration will cause your site to respond to any domain request ending in

ServerAlias *

The DocumentRoot directive specifies where Apache2 should look for the files that make up the site. The default value is /var/www, as specified in /etc/apache2/sites-available/default. If desired, change this value in your site’s virtual host file, and remember to create that directory if necessary!

Enable the new VirtualHost using the a2ensite utility and restart Apache2:

sudo a2ensite mynewsite
sudo service apache2 restart

Be sure to replace mynewsite with a more descriptive name for the VirtualHost. One method is to name the file after the ServerName directive of the VirtualHost.

Similarly, use the a2dissite utility to disable sites. This is can be useful when troubleshooting configuration problems with multiple VirtualHosts:

sudo a2dissite mynewsite
sudo service apache2 restart

Default Apache2 Settings

This section explains configuration of the Apache2 server default settings. For example, if you add a virtual host, the settings you configure for the virtual host take precedence for that virtual host. For a directive not defined within the virtual host settings, the default value is used.

The DirectoryIndex is the default page served by the server when a user requests an index of a directory by specifying a forward slash (/) at the end of the directory name.

For example, when a user requests the page, he or she will get either the DirectoryIndex page if it exists, a server-generated directory list if it does not and the Indexes option is specified, or a Permission Denied page if neither is true. The server will try to find one of the files listed in the DirectoryIndex directive and will return the first one it finds. If it does not find any of these files and if Options Indexes is set for that directory, the server will generate and return a list, in HTML format, of the subdirectories and files in the directory. The default value, found in /etc/apache2/mods-available/dir.conf is the string index.html index.cgi index.php index.xhtml index.htm. Thus, if Apache2 finds a file in a requested directory matching any of these names, the first will be displayed.

The ErrorDocument directive allows you to specify a file for Apache2 to use for specific error events. For example, if a user requests a resource that does not exist, a 404 error will occur. By default, Apache2 will simply return a HTTP 404 Return code. Read /etc/apache2/conf.d/localized-error-pages for detailed instructions for using ErrorDocument, including locations of example files.

By default, the server writes the transfer log to the file /var/log/apache2/access.log. You can change this on a per-site basis in your virtual host configuration files with the CustomLog directive, or omit it to accept the default, specified in /etc/apache2/conf.d/other-vhosts-access-log. You may also specify the file to which errors are logged, via the ErrorLog directive, whose default is /var/log/apache2/error.log. These are kept separate from the transfer logs to aid in troubleshooting problems with your Apache2 server. You may also specify the LogLevel (the default value is “warn”) and the LogFormat (see /etc/apache2/apache2.conf for the default value).

Some options are specified on a per-directory basis rather than per-server. Options is one of these directives. A Directory stanza is enclosed in XML-like tags, like so:

<Directory /var/www/mynewsite>

The Options directive within a Directory stanza accepts one or more of the following values (among others), separated by spaces:

  • ExecCGI
  • Includes
  • IncludesNOEXEC
  • Indexes — Display a formatted list of the directory’s contents, if no DirectoryIndex (such as index.html) exists in the requested directory. For security reasons, this should usually not be set, and certainly should not be set on your DocumentRoot directory. Enable this option carefully on a per-directory basis only if you are certain you want users to see the entire contents of the directory.
  • Multiview
  • SymLinksIfOwnerMatch

httpd Apache2 Settings

This section explains some basic httpd daemon configuration settings.

LockFile — The LockFile directive sets the path to the lockfile used when the server is compiled with either USE_FCNTL_SERIALIZED_ACCEPT or USE_FLOCK_SERIALIZED_ACCEPT. It must be stored on the local disk. It should be left to the default value unless the logs directory is located on an NFS share. If this is the case, the default value should be changed to a location on the local disk and to a directory that is readable only by root.

PidFile — The PidFile directive sets the file in which the server records its process ID (pid). This file should only be readable by root. In most cases, it should be left to the default value.

User — The User directive sets the userid used by the server to answer requests. This setting determines the server’s access. Any files inaccessible to this user will also be inaccessible to your website’s visitors. The default value for User is the string www-data.

Unless you know exactly what you are doing, do not set the User directive to root. Using root as the User will create large security holes for your Web server.

Group — The Group directive is similar to the User directive. Group sets the group under which the server will answer requests. The default group is also the string www-data.

Apache2 Modules

Apache2 is a modular server. This implies that only the most basic functionality is included in the core server. Extended features are available through modules which can be loaded into Apache2. By default, a base set of modules is included in the server at compile-time. If the server is compiled to use dynamically loaded modules, then modules can be compiled separately, and added at any time using the LoadModule directive. Otherwise, Apache2 must be recompiled to add or remove modules.

Ubuntu compiles Apache2 to allow the dynamic loading of modules. Configuration directives may be conditionally included on the presence of a particular module by enclosing them in an <IfModule> block.

You can install additional Apache2 modules and use them with your Web server. For example, run the following command from a terminal prompt to install the MySQL Authentication module:

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

See the /etc/apache2/mods-available directory, for additional modules.

Use the a2enmod utility to enable a module:

sudo a2enmod auth_mysql
sudo service apache2 restart

Similarly, a2dismod will disable a module:

sudo a2dismod auth_mysql
sudo service apache2 restart

HTTPS Apache2 Configuration

The mod_ssl module adds an important feature to the Apache2 server — the ability to encrypt communications. Thus, when your browser is communicating using SSL, the https:// prefix is used at the beginning of the Uniform Resource Locator (URL) in the browser navigation bar.

The mod_ssl module is available in apache2-common package. Execute the following command from a terminal prompt to enable the mod_ssl module:

sudo a2enmod ssl

There is a default HTTPS configuration file in /etc/apache2/sites-available/default-ssl. In order for Apache2 to provide HTTPS, a certificate and key file are also needed. The default HTTPS configuration will use a certificate and key generated by the ssl-cert package. They are good for testing, but the auto-generated certificate and key should be replaced by a certificate specific to the site or server. For information on generating a key and obtaining a certificate see Certificates

To configure Apache2 for HTTPS, enter the following:

sudo a2ensite default-ssl

The directories /etc/ssl/certs and /etc/ssl/private are the default locations. If you install the certificate and key in another directory make sure to change SSLCertificateFile and SSLCertificateKeyFile appropriately.

With Apache2 now configured for HTTPS, restart the service to enable the new settings:

sudo service apache2 restart

Depending on how you obtained your certificate you may need to enter a passphrase when Apache2 starts.

You can access the secure server pages by typing https://your_hostname/url/ in your browser address bar.

Sharing Write Permission — Apache2

For more than one user to be able to write to the same directory it will be necessary to grant write permission to a group they share in common. The following example grants shared write permission to /var/www to the group “webmasters”.

sudo chgrp -R webmasters /var/www
sudo find /var/www -type d -exec chmod g=rwxs "{}" \;
sudo find /var/www -type f -exec chmod g=rws  "{}" \;

If access must be granted to more than one group per directory, enable Access Control Lists (ACLs).

References — Apache2

  1. Apache2 Documentation contains in depth information on Apache2 configuration directives. Also, see the apache2-doc package for the official Apache2 docs.
  2. See the Mod SSL Documentation site for more SSL related information.
  3. O’Reilly’s Apache Cookbook is a good resource for accomplishing specific Apache2 configurations.
  4. For Ubuntu specific Apache2 questions, ask in the #ubuntu-server IRC channel on
  5. Usually integrated with PHP and MySQL the Apache MySQL PHP Ubuntu Wiki page is a good resource.

Also see:

Apache Virtual Hosts in Ubuntu in 5 easy steps


About samehramzylabib

See About on
This entry was posted in Configure My Systems. Bookmark the permalink.

One Response to My Lubuntu install on laptop

  1. Pingback: Lubuntu cont’d — Actual Apache2 Configuration | Sam's PHP How-To


Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s