Version 4 (modified by 13 years ago) ( diff ) | ,
---|
Installation Guidelines: Linux - Developer (Script)
Ubuntu
#!/bin/bash set -e # # Install a Sahana Eden Developer environment in Ubuntu # - tested on 11.10 # f_Quick() { MODE="quick" } f_Medium() { MODE="medium" } f_Full() { MODE="full" } if [[ -z "$1" ]]; then # Offer a menu echo "Welcome to the Sahana Eden Dev Installation script for Ubuntu." echo "This will install a working verion of Sahana Eden into ~/web2py." echo echo "Select the Installation Type:" echo echo "1. Medium - installs all mandatory and some common optional dependencies. It is the normal recommended option." echo "2. Quick - installs only mandatory dependencies. This is recommended if you are on a slow Internet connection or need to get operational quickly." echo "3. Full - installs all optional dependencies & the Eclipse debugger. It is only recommended if you are on a fast Internet connection & are prepared to be patient." echo echo -n "Your choice? : " read choice case "$choice" in 1) f_Medium ;; 2) f_Quick ;; 3) f_Full ;; *) echo "\"$choice\" is not valid" ; exit ;; esac elif [[ "$1" = "quick" ]]; then # Set the option direct MODE="quick" elif [[ "$1" = "medium" ]]; then # Set the option direct MODE="medium" elif [[ "$1" = "full" ]]; then # Set the option direct MODE="full" else echo >&2 "$1 is not a valid option!\nPlease use either 'quick', 'medium' or 'full'" exit 1 fi # Install Python Libs #sudo apt-get install -y python2.7 python-dateutil sudo apt-get install -y python-lxml python-shapely bzr if [[ "$MODE" = "medium" ]]; then sudo apt-get -y install python-reportlab python-xlwt elif [[ "$MODE" = "full" ]]; then sudo apt-get -y install python-reportlab python-xlwt sudo apt-get -y install python-matplotlib python-numpy python-scipy python-xlrd sudo apt-get -y install eclipse fi # Install Web2Py cd if [[ "$MODE" = "full" ]]; then # Install Bzr Trunk bzr branch lp:~mdipierro/web2py/devel web2py else # Install the stable version wget http://www.web2py.com/examples/static/web2py_src.zip unzip web2py_src.zip fi cat << EOF > ~/web2py/routes.py #!/usr/bin/python default_application = 'eden' default_controller = 'default' default_function = 'index' routes_onerror = [ ('eden/400', '!'), ('eden/401', '!'), ('eden/*', '/eden/errors/index'), ('*/*', '/eden/errors/index'), ] EOF # Install Eden cd ~/web2py/applications bzr branch lp:sahana-eden eden sed -i 's|EDITING_CONFIG_FILE = False|EDITING_CONFIG_FILE = True|' ~/web2py/applications/eden/models/000_config.py echo "Installation is now complete - you can run Sahana either by using the Eclipse debugger or else by running:" echo "cd ~/web2py ; python web2py.py -a eden" echo "Then run Sahana by pointing your web browser at htp://127.0.0.1:8000"
Install Eclipse
If you want a graphical debugger to set breakpoints & step through code then it is recommended to install Eclipse:
Developer Guidelines
Now, see how to put your installation to work:
Attachments (2)
-
debian_ubuntu_eden_dev.3.2.2.sh
(4.6 KB
) - added by 10 years ago.
Debian Installation Script after moving templates
-
install_eden_fedora.2.sh
(3.0 KB
) - added by 10 years ago.
Installation Script for Fedora after moving templates
Download all attachments as: .zip
Note:
See TracWiki
for help on using the wiki.