Installing Sage 4.7 on CentOS 5
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. Asroot, 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 sageSince 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: Launching Sage Notebook