Differences between revisions 1 and 2
Revision 1 as of 2011-12-19 20:13:16
Size: 7057
Editor: vbraun
Comment:
Revision 2 as of 2011-12-19 20:44:00
Size: 6928
Editor: vbraun
Comment:
Deletions are marked like this. Additions are marked like this.
Line 14: Line 14:
  1. Download VirtualBox (available at http://www.virtualbox.org/wiki/Downloads). Install it anywhere you want. Version 4 or later is required.   1. Download !VirtualBox (available at http://www.virtualbox.org/wiki/Downloads). Install it anywhere you want. Version 4 or later is required.
Line 37: Line 37:
  1. Start VirtualBox.   1. Start !VirtualBox.
Line 44: Line 44:
message saying "Open your web browser to ..." Open your web broswer
(it's best to use Firefox) to the address specified.

  1. Login with username 'admin' and the password you selected upon
installing Sage.
  message saying "Open your web browser to ..." Open your web broswer
  (it's best to use Firefox or Chrome) to the address specified.
Line 51: Line 48:
on the same local virtual machine, you will first need to complete some
further steps in the Sage shell (see the next section on how to use the
Sage shell)
.
  on the same local virtual machine, you will first need to complete some
  further steps. See the advanced options section below.
Line 56: Line 52:
as usual. In the running VirtualBox window, click 'Machine', then 'Close'.
Select 'Power off the machine' then click 'OK'. You may now close
VirtualBox.
  as usual. In the running !VirtualBox window, click '''Machine''', then '''Close'''.
  Select '''Send the shutdown signal''' then click '''OK'''. You may now close
  !VirtualBox.
Line 63: Line 59:
  1. Start VirtualBox if you have not already done so.   1. Start !VirtualBox if you have not already done so.
Line 65: Line 61:
  1. Power on Sage-x.y.z (if you have not already done so) by selecting it
  and clicking 'Start'.
  1. Power on `sage-x.y.z` (if you have not already done so) by selecting it
  and clicking '''Start'''.
Line 68: Line 64:
  1. Once the virtual machine is powered on, press 'Ctrl C' twice to quit   1. Once the virtual machine is powered on, press '''Ctrl C''' twice to quit
Line 71: Line 67:
  1. Type './sage' to start a shell interface in Sage.   1. Type
  {{{
./sage
  }}}
  on the command line
to start a shell interface in Sage.
Line 74: Line 74:
  enabled), type 'attach /media/sf_<volume name>/filename'

  1. Advanced users may want to note that Sage is not
  release 4.7, so you may need to type 'su' (password: sage), or press Alt-F1
  to get a different tty and login as root, if they have trouble with file
  permissions. These are advanced options, and you should be careful when
  accessing or altering files.
  enabled), type
  {{{
attach /media/sf_<volume name>/filename
  }}}
  in the Sage command line session.
Line 93: Line 91:
== Advanced Options == = Advanced Options =
Line 98: Line 96:

  * List available optional packages with the optional_packages()
  command and type install_package("exact package name") to install a
  package. You can do this from an input box in the notebook.


  * Upgrading: To upgrade between stable releases, you can type the following
  at the command prompt:
  {{{
[sage@localhost sage]$ sage -upgrade
...
takes a while
   }}}
   This *will* merge your changes to /usr/local/sage/devel/ with the
   latest version of Sage and build everything.

   WARNING: This will use up more disk space and is *not* guaranteed to
   result in a working upgraded Sage installation.


== Giving Others Access to the Sage Virtual Machine ==

You can run the Sage appliance as a server on the network, so that others can access it similar to [http://www.sagenb.org].
Line 117: Line 138:
3. List available optional packages with the optional_packages()
   command and type install_package("exact package name") to install a
   package. You do this from an input box in the notebook.

4. Upgrading: To upgrade between stable releases, you can type "sage -upgrade"
   at the command prompt:

      [sage@localhost sage]$ sage -upgrade
      ...
      takes a while

    This *will* merge your changes to /usr/local/sage/devel/ with the
    latest version of Sage and build everything.

    WARNING: This will use up more disk space and is *not* guaranteed to
    result in a working upgraded Sage installation.
Line 142: Line 146:
  {{{
[sage@localhost directory]$ cd
[sage@localhost ~]$ cd sage
[sage@localhost sage]$
  }}}
Line 143: Line 152:
     [sage@localhost directory]$ cd
     [sage@localhost ~]$ cd sage
     [sage@localhost sage]$

  2
. To actually edit files, you'll perhaps want to install the editor
  1. To actually edit files, you'll perhaps want to install the editor
Line 149: Line 154:

   [sage@localhost sage]$ apt-get inst
      ...
  {{{
[sage@localhost sage]$ sudo yum install emacs
  }}}
Line 155: Line 159:
Line 157: Line 160:

   [sage@localhost sage]$ cd devel/sage/sage/rings/
     [sage@localhost rings]$ emacs arith.py
     [edit the file]
  {{{
[sage@localhost sage]$ cd devel/sage/sage/rings/
[sage@localhost rings]$ emacs arith.py
[edit the file]
  }}}

1. The Sage Virtual Machine

This page describes how to use the virtual machine that you can download from http://www.sagemath.org/download-windows.html. If you want to create your own virtual machine, go to the VirtualBox wiki page instead.

1.1. Requirements

The Sage appliance (packaged virtual machine) can be used on any operating system that supports the free VirtualBox player, for example Microsoft Windows. Your computer must have at least 2.5 GB (!) of free disk space and at least 512 MB of RAM. The virtual machine can also be used with other hypervisors like VMware. However, unless you are already familiar with VMware, we recommend that you use VirtualBox. In our experience, it is easier for non-technical users.

1.2. Installation

  1. Download VirtualBox (available at http://www.virtualbox.org/wiki/Downloads). Install it anywhere you want. Version 4 or later is required.

  2. Download the file Sage-x.y.z.ova located in the directory where this README is.
  3. Open VirtualBox. Import sage-x.y.z.ova by clicking File, then Import Appliance. Make sure you read the Information boxes that appear, as they explain how to type and use the mouse pointer in the running VirtualBox window.

  4. If you only want to access Sage through the web browser notebook interface (i.e., to write or run worksheets), you do not need to complete any further installation. You may go on to the next section to find out how to use Sage.
  5. If you want to enable shared folders between Sage and your Windows system, complete the following steps:
    1. In the running VirtualBox window, click Devices, then Shared Devices.

    2. Click on the icon with a green + in the upper right corner.

    3. Select the path of the Windows folder that you want to share.
    4. Check auto-mount and make permanent. Click OK, then click OK again.

    5. From the menu, select Machine, then Reset. The files will be in /media/sf_<volume name>.

1.3. Using the Sage Notebook

  1. Start VirtualBox.

  2. To start the Sage notebook server, power on Sage-x.y.z by selecting it and clicking 'Start'. (This may take awhile. You may see some warning messages you can safely ignore.)
  3. Wait a few moments until the running VirtualBox window displays a message saying "Open your web browser to ..." Open your web broswer (it's best to use Firefox or Chrome) to the address specified.

  4. If you would like other users to be able to create additional accounts on the same local virtual machine, you will first need to complete some further steps. See the advanced options section below.
  5. When you are finished working with Sage, logout and close your browser

    as usual. In the running VirtualBox window, click Machine, then Close. Select Send the shutdown signal then click OK. You may now close VirtualBox.

1.4. Using the Sage shell

  1. Start VirtualBox if you have not already done so.

  2. Power on sage-x.y.z (if you have not already done so) by selecting it and clicking Start.

  3. Once the virtual machine is powered on, press Ctrl C twice to quit the Sage notebook.

  4. Type
    ./sage
    on the command line to start a shell interface in Sage.
  5. To work with files attached in a shared folder (if you have shared folders enabled), type
    attach /media/sf_<volume name>/filename
    in the Sage command line session.

1.5. Troubleshooting

2. Advanced Options

  • You can log into the virtual machine from the text-mode console. Press Alt-F1 for a different tty. The user account running the Sage notebook server is called sage with password sage. The root account password is sage, too.

  • Advanced users may want to note that the sage user is in the sudoers file now. You can run any command with administrative rights by sudo <command>.

  • List available optional packages with the optional_packages() command and type install_package("exact package name") to install a package. You can do this from an input box in the notebook.
  • Upgrading: To upgrade between stable releases, you can type the following at the command prompt:
    [sage@localhost sage]$ sage -upgrade
    ...
    takes a while 
    • This *will* merge your changes to /usr/local/sage/devel/ with the latest version of Sage and build everything. WARNING: This will use up more disk space and is *not* guaranteed to result in a working upgraded Sage installation.

2.1. Giving Others Access to the Sage Virtual Machine

You can run the Sage appliance as a server on the network, so that others can access it similar to [http://www.sagenb.org].

2. To allow for the creation of new users (other than 'admin') on your local

  • virtual machine,
  • Type 'cd', then hit 'Enter' b. Type 'nano .bash_profile' c. At the end of the line that begins with 'notebook', type ',accounts=True',
    • then hit 'Enter'.
    d. Type 'exit' e. This enables a link on the Sage notebook login in the web browser that
    • reads 'Sign up for a new Sage Notebook account'. Users can then click on the link and follow the instructions to create a new account.

== How to be a Sage developer (even more advanced) ==

Some Unix familiarity is assumed below. If you've never used anything but Windows, some of this won't make sense.

  1. Change to the SAGE_ROOT directory:
    [sage@localhost directory]$ cd
    [sage@localhost ~]$ cd sage
    [sage@localhost sage]$ 
  2. To actually edit files, you'll perhaps want to install the editor of your choice. For example, to install Emacs do this:
    [sage@localhost sage]$ sudo yum install emacs
    The nano editor is included.
  3. Now type, for example,
    [sage@localhost sage]$ cd devel/sage/sage/rings/
    [sage@localhost rings]$ emacs arith.py
    [edit the file]
    or
    • [sage@localhost rings]$ nano arith.py [edit the file]
  4. Save the file and type "sage -br" to build the changes and install them.
    • [sage@localhost rings]$ cd [sage@localhost ~]$ cd sage [sage@localhost sage]$ sage -br

  • sage: Building and installing modified SAGE library files.
  • ..

  • | SAGE Version x.y.z, Release Date: .........