wiki:InstallationGuidelines/VirtualMachine/Maintenance

Version 23 (modified by Fran Boon, 7 years ago) ( diff )

--

Virtual Machine Maintenance

Lubuntu

  1. Get the latest LTS Lubuntu: https://help.ubuntu.com/community/Lubuntu/GetLubuntu
    • currently this is 14.04.1
  1. Install it as a new image in VirtualBox
    • accept all defaults
    • US Keyboard
    • username: dev
    • password: eden
    • Login automatically
  1. Update
    sudo su -
    apt-get update
    apt-get -y upgrade
    
  1. Install dependencies and tools (@ToDo: Make this a downloadable script)
    apt-get -y install vim htop p7zip dos2unix
    apt-get -y install git-core
    #apt-get -y install exim4-config exim4-daemon-light
    apt-get -y install libgeos-c1
    apt-get -y install python-dev
    apt-get -y install python-lxml python-setuptools python-dateutil
    apt-get -y install python-serial
    apt-get -y install python-imaging python-reportlab
    apt-get -y install python-matplotlib
    apt-get -y install python-xlwt
    apt-get -y install build-essential
    apt-get -y install libgeos-dev
    wget --no-check-certificate http://pypi.python.org/packages/source/S/Shapely/Shapely-1.4.1.tar.gz
    tar zxvf Shapely-1.4.1.tar.gz
    cd Shapely-1.4.1
    python setup.py install
    cd ..
    rm -rf Shapely-1.4.1
    wget --no-check-certificate https://pypi.python.org/packages/source/x/xlrd/xlrd-0.9.3.tar.gz
    tar zxvf xlrd-0.9.3.tar.gz
    cd xlrd-0.9.3
    python setup.py install
    cd ..
    rm -rf xlrd-0.9.3
    apt-get -y install eclipse-platform
    apt-get clean
    exit
    
  1. Install Web2Py & Eden
    cd
    git clone git://github.com/web2py/web2py.git
    cat << EOF > "/home/dev/web2py/routes.py"
    #!/usr/bin/python
    default_application = 'eden'
    default_controller = 'default'
    default_function = 'index'
    routes_onerror = [
            ('eden/400', '!'),
            ('eden/401', '!'),
            ('eden/509', '!'),
            ('eden/*', '/eden/errors/index'),
            ('*/*', '/eden/errors/index'),
        ]
    EOF
    cd web2py/applications
    git clone git://github.com/flavour/eden.git
    

6.Configure Eclipse

  1. Configure Firefox
  1. Run Eden
    • Edit 000_config.py
      • Comment FINISHED_EDITING
      • Set debug = True
  1. Add Management Scripts
    sudo su -
    cat << EOF > "/usr/local/bin/clean"
    #!/bin/sh
    cd ~/web2py/applications/eden
    rm -rf databases/*
    rm -f errors/*
    rm -rf sessions/*
    rm -rf uploads/*
    cd ~/web2py
    python web2py.py -S eden -M -R applications/eden/static/scripts/tools/noop.py
    EOF
    chmod +x /usr/local/bin/clean
    exit
    

TurnKey Linux

http://www.turnkeylinux.org/sahana-eden

NB This version is currently far out of date, and not currently in use.


It is best if the VM is maintained using the original VirtualBox image & then re-exported to OVF

update_all

Test Sahana Eden.

clean

The following aliases have been setup:

alias w2p='cd /home/sahana/Desktop/web2py && python web2py.py -S eden -M'
alias update='cd /home/sahana/Desktop/web2py/applications/eden && git pull'
alias update_w2p='cd /home/sahana/Desktop/web2py && git pull'
alias update_all='sudo apt-get update;sudo apt-get upgrade -y;cd /home/sahana/Desktop/web2py && git pull;cd /home/sahana/Desktop/web2py/applications/eden && git pull'
alias clean="rm ~/.bash_history;cd ~/Desktop/web2py/applications/eden && rm -f databases/* && rm -rf cache/* && rm -f sessions/* && rm -f models/000_config.py && rm -f cron/crontab;sudo rm -f /var/log/*;sudo rm -f /var/cache/apt/archives/*;COLUMNS=200 sudo dpkg -l | grep ^rc | awk '{print $2} ' | xargs sudo dpkg -P"

General

Resume Uploads

If the scp upload fails, then can resume it using:

rsync -Pe ssh Eden-VM.zip flavour@eden.sahanafoundation.org:.

Info only

The next 2 steps are unnecessary if exporting to OVF?

Overwrite the freespace with zeroes:

Compress the VDI disk image:


InstallationGuidelinesVirtualMachine

Note: See TracWiki for help on using the wiki.