I recently upgraded my desktop workstation from an old 32-bit version of Gentoo to 64-bit CentOS 5. I downloaded and installed the latest version of Sage, and the process went smoothly.
If you find this post helpful, please check out the Sage Beginner’s Guide at Packt Publishing. Since I don’t use Sage every day, I actually refer to my own book on a regular basis!
Download
Since CentOS is designed to be binary compatible with Red Hat Enterprise Linux, the correct binary to download is
sage-4.7.2-linux-64bit-red_hat_enterprise_linux_server_release_5.6_tikanga-x86_64-Linux.tar.gz
Install
Uncompress the file with tar xfz <filename> The result is a huge directory (3.1Gb) with a self-contained version of Sage that can be run right where you uncompressed it. As root, I moved the directory to /opt, changed ownership to root, and changed the name to sage-4.7.2. I then edited the script /opt/sage-4.7.2/sage so that the variable SAGE_ROOT contains the correct path:
SAGE_ROOT="/opt/sage-4.7.2"
Run sage once as root to set the paths correctly.
User Access
To make it easier to run Sage, I created a symbolic link to the Sage run script in /usr/bin/:
cd /usr/bin ln -s /opt/sage-4.7.2/sage sage
Since this directory is on every user’s default path, a user can now start Sage by simply typing sage in a terminal.
Notebook Interface
When you first start Sage you will get a comnand-line interface in a terminal, which is very similar to iPython. If you want to use a more graphical interface, type notebook() at the Sage command prompt:
You will have to create an admin password, as shown above. Follow the advice and create a secure password. If a new browser tab or window doesn’t automatically open, open one manually and paste http://localhost:8000 into the address field. You are now logged in as a user called admin, so I suggest creating a separate user account for yourself (for the same reason that you should only use the root account for system administration on a Linux system). From the links at the top of the screen choose Settings->Manage Users->Add User. After entering a user name, you will be given a temporary password. Copy the temporary password, log out, and log in with your new user name and temporary password. I suggest that you go to Settings and change your password to something easier to remember.