The Sage Cell Server installer
Project description
Introduction
Yep, you can use this NOT simple installation. Oops, does not work. Use the Sage Cell Server installer, because it is just easier :).
Portability
The Sage Cell Server installer tested on Ubuntu 14.04.2 LTS, Ubuntu 15.04 and Debian 7.8.
Installation
Install the sagecell from PyPI
$ sudo pip install sagecell
Install the sagecell from GitHub
$ sudo pip install git+git://github.com/korniichuk/sagecell#egg=sagecell
Upgrade the sagecell from PyPI
$ sudo pip install -U sagecell
or:
$ sudo pip install --upgrade sagecell
Uninstall the sagecell
$ sudo pip uninstall sagecell
Development installation
$ git clone git://github.com/korniichuk/sagecell.git $ cd sagecell $ sudo pip install .
Quickstart
First, install the Sage Cell Server:
$ sagecell install
Second, make sure that you can login to a localhost without entering password:
$ ssh localhost
Third, start the Sage Cell Server:
$ sagecell start
Fourth, open a new terminal for the next command:
$ sagecell open
This command open browser with the Sage Cell Server.
Express
$ sagecell install $ sagecell ssh $ sagecell start # In a new terminal $ sagecell open
User guide
Help
The standard output for –help:
$ sagecell -h
or:
$ sagecell --help
For information on using subcommand “SUBCOMMAND”, do:
$ sagecell SUBCOMMAND -h
or:
$ sagecell SUBCOMMAND --help
Example:
$ sagecell install -h
Version
The standard output for –version:
$ sagecell -v
or:
$ sagecell --version
Install the Sage Cell Server
$ sagecell install
Start the Sage Cell Server
$ sagecell start
Open browser with the Sage Cell Server
$ sagecell open
Setup SSH for auto login to localhost without a password
$ sagecell ssh
If you are familiar with ssh-keygen, ssh-copy-id and ssh-add, this code also setup SSH for auto login to localhost without a password [1]:
$ ssh-keygen -t rsa -b 4096 -N '' -f ~/.ssh/id_rsa $ ssh-copy-id localhost $ eval "$(ssh-agent -s)" $ ssh-add ~/.ssh/id_rsa
Start the Sage Cell Server automatically on boot
With the Sage Cell Server
$ sagecell auto
For changing a port number. First, edit the /usr/local/bin/sagecellscript file:
$ sudo nano /usr/local/bin/sagecellscript
or:
$ su -c "nano /usr/local/bin/sagecellscript"
Second, change the last line from:
../sage web_server.py
to:
../sage web_server.py -p PORT_NUMBER
Where:
PORT_NUMBER – a port number.
Example:
../sage web_server.py -p 6363
Without the Sage Cell Server
First, install screen:
$ sudo apt-get install screen
or:
$ su -c "apt-get install screen"
Second, create the /usr/local/sbin/sagecellscript file:
#! /bin/sh cd ~/sc_build/sage/sagecell ../sage web_server.py
or:
#! /bin/sh cd ~/sc_build/sage/sagecell ../sage web_server.py -p PORT_NUMBER
Where:
PORT_NUMBER – a port number.
Example:
#! /bin/sh cd ~/sc_build/sage/sagecell ../sage web_server.py -p 6363
Third, make the /usr/local/sbin/sagecellscript file executable:
$ sudo chmod 755 /usr/local/sbin/sagecellscript
or:
$ su -c "chmod 755 /usr/local/sbin/sagecellscript"
Fourth, edit the /etc/rc.local file:
$ sudo nano /etc/rc.local
or:
$ su -c "nano /etc/rc.local"
Add the next command below the comment, but leave the line exit 0 at the end, then save the file and exit:
sudo -u USERNAME screen -dmS sagecell /usr/local/sbin/sagecellscript
or:
su USERNAME -c "screen -dmS sagecell /usr/local/sbin/sagecellscript"
Where:
USERNAME – a username.
Example:
sudo -u albert screen -dmS sagecell /usr/local/sbin/sagecellscript
or:
su albert -c "screen -dmS sagecell /usr/local/sbin/sagecellscript"
Transfer a short temporary links
Replace the ~/sc_build/sage/sagecell/sqlite.db file with a shortened temporary links:
$ scp SOURCE_FILE REMOTE_USERNAME@REMOTE_HOST:~/sc_build/sage/sagecell/sqlite.db
Example:
$ scp ~/Downloads/sqlite4transfer.db albert@192.168.0.1:~/sc_build/sage/sagecell/sqlite.db
Disable the terms of service requirement
For disabling the terms of service requirement. First, edit the ~/sc_build/sage/sagecell/config.py file:
$ nano ~/sc_build/sage/sagecell/config.py
Second, change the line of code from:
requires_tos = True
to:
requires_tos = False
Third, reboot a server from command line:
$ reboot
Footnotes
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.