Version 13 (modified by 13 years ago) ( diff ) | ,
---|
Installation Guidelines: Linux - Developer (Script)
Ubuntu
Run using:
sudo bash ubuntu_install_eden_dev.sh
Full Script:
#!/bin/bash set -e # # Install a Sahana Eden Developer environment in Ubuntu # - tested on 10.04 and 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-xlrd python-xlwt elif [[ "$MODE" = "full" ]]; then sudo apt-get -y install python-reportlab python-xlrd python-xlwt sudo apt-get -y install python-matplotlib python-numpy python-scipy python-xlrd sudo apt-get -y install eclipse-platform fi # Install Web2Py cd /home if [[ "$MODE" = "full" ]]; then # Install Bzr Trunk # @ToDo: Download from Hg or Git now that Bzr no longer being maintained #bzr branch lp:~mdipierro/web2py/devel web2py # Install the stable version wget http://www.web2py.com/examples/static/web2py_src.zip unzip web2py_src.zip else # Install the stable version wget http://www.web2py.com/examples/static/web2py_src.zip unzip web2py_src.zip fi cat << EOF > /home/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 /home/web2py/applications bzr branch lp:sahana-eden eden cp /home/web2py/applications/eden/deployment-templates/models/000_config.py /home/web2py/applications/eden/models sed -i 's|EDITING_CONFIG_FILE = False|EDITING_CONFIG_FILE = True|' /home/web2py/applications/eden/models/000_config.py echo -n "What is your username? : " read username chown -R $username /home/web2py echo "Installation is now complete - you can run Sahana either by using the Eclipse debugger or else by running:" echo "cd /home/web2py ; python web2py.py -a eden" echo "Then run Sahana by pointing your web browser at http://127.0.0.1:8000" echo "Be patient on the 1st run as the database needs to be created"
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.