Install LAMP on Debian

Installation

Before starting the installation, make sure your distribution is up to date (the ‘#’ indicates that you should do this as root):
# aptitude update && aptitude upgrade

MySQL

Next install mysql using the following command:
# aptitude install mysql-server mysql-client

apache2

The web server can be installed as follows:
# aptitude install apache2 apache2-doc

Configuring user directories for Apache Web Server

Enable module
# a2enmod userdir

Configure Apache module userdir in /etc/apache2/mods-enabled/userdir.conf as follows:

<IfModule mod_userdir.c>
        UserDir public_html
        UserDir disabled root

        <Directory /home/*/public_html>
                AllowOverride All
                Options MultiViews Indexes SymLinksIfOwnerMatch
                <Limit GET POST OPTIONS>
                        Order allow,deny
                        Allow from all
                </Limit>
                <LimitExcept GET POST OPTIONS>
                        Order deny,allow
                        Deny from all
                </LimitExcept>
        </Directory>
</IfModule>

Create directory as user (not as root):
$mkdir /home/$USER/public_html

Change group as root (substitute your username) and restart web server:
# chgrp www-data /home//public_html
# service apache2 restart

If you get a Forbidden error when accessing home folder through Apache check /home/username has permissions drwxr-xr-x. If the permissions are wrong correct them as such:
# chmod 755 /home/

To be able to serve PHP (PHP needs to be installed as per instructions) check that /etc/apache2/mods-available/php5.conf is correct:

<IfModule mod_php5.c>
    <FilesMatch "\.ph(p3?|tml)$">
        SetHandler application/x-httpd-php
        Require all granted
    </FilesMatch>
    <FilesMatch "\.phps$">
        SetHandler application/x-httpd-php-source
        Require all denied
    </FilesMatch>
    # To re-enable php in user directories comment the following lines
    # (from <IfModule ...> to </IfModule>.) Do NOT set it to On as it
    # prevents .htaccess files from disabling it.
    #<IfModule mod_userdir.c>
    #    <Directory /home/*/public_html>
    #        php_admin_value engine Off
    #    </Directory>
    #</IfModule>
</IfModule>

The “P” part

Installing the PHP subset of LAMP in Debian is quite simple, you just type this as root in an console (the # is the root prompt symbol):
# aptitude install php5 php5-mysql libapache2-mod-php5

phpMyAdmin

Probably you also want to install phpMyAdmin for easy configuration:
# aptitude install phpmyadmin

Restart Apache:
# /etc/init.d/apache2 restart

Install VMware Tool on Ubuntu Linux

  1. login as root
  2. mount distribution iso
  3. apt-get update
  4. apt-get upgrade
  5. sudo apt-get install build-essential linux-headers-$(uname -r)
  6. unmount distribution iso
  7. mount VMware Tools iso
  8. sudo mount /dev/cdrom /media/cdrom
  9. cd /media/cdrom
  10. cp VMwareTools* /tmp
  11. cd
  12. sudo umount /media/cdrom
  13. cd /tmp
  14. tar xzvf VMwareTools*
  15. cd /tmp/vmware-tools-distrib
  16. sudo ./vmware-install.pl -d
  17. rm -rf /tmp/vmware-tools-distrib

fatal trap 9 on freebsd with AMD Opteron 6262 HE and Proxmox — hw.mca.enabled=0

Bug:

  • Fatal trap 9: general protection fault while in kernel mode”

Enter the following load option “hw.mca.enabled=0”

  • set hw.mca.enabled=0
  • boot

Repeat manually disable MCA after installation

  • set hw.mca.enabled=0
  • boot

After successfully install, add hw.mca.enabled=0 to /boot/loader.conf

  • mount -rw /
  • echo “hw.mca.enabled=0” >> /boot/loader.conf

How to configure anonymous access in FreeNAS

  1. Create a guest user account to be used for anonymous access in Account –>> Users –>> Add Users with the following attributes:
    • Username: guest
    • Home Directory: browse to the volume to be shared
    • check the Disable logins box
  2. Associate the guest account with the volume in Storage –>> Volumes. Expand the volume’s name then click Change Permissions. Select guest as the Owner(user) and Owner(group) and check that the permissions are appropriate for the share. If non-Windows systems will be accessing the CIFS share, leave the type of permissions as Unix. Only change the type of permissions to Windows if the share is only accessed by Windows systems.
  3. Create a CIFS share in Sharing –>> Windows (CIFS) Shares –>> Add Windows (CIFS) Share with the following attributes:
    • Name: freenas
    • Path: browse to the volume to be shared
    • check the boxes Allow Guest Access and Only Allow Guest Access
    • Hosts Allows: add the addresses which are allowed to connect to the share; acceptable formats are the network or subnet address with CIDR mask (e.g. 192.168.188.0/24) or specific host IP addresses, one address per line
  4. Configure the CIFS service in Services –>> CIFS with the following attributes:
    • Authentication Model: Anonymous
    • Guest Account: guest
    • check the boxes Allow Empty Password and Enable Home Directories
  5. Start the CIFS services in Services –> Control Services

Installing VMware Tools on Debian Linux

  1. login as root
  2. mount distribution iso
  3. apt-get update
  4. apt-get install gcc make linux-headers-$(uname -r) open-vm-tools
  5. unmount distribution iso
  6. mount VMware Tools iso
  7. mount /dev/cdrom /mnt
  8. tar xzf /mnt/VMwareTools*
  9. cd vmware-tools-distrib
  10. ./vmware-install.pl -d
  11. rm -rf vmware-tools-distrib

*open-vm-tools can be removed from step 4 if manual installation is wanted for step 10.