Skip to content

Scientific Linux

Personal tools
You are here: Home » Members » SalSA's Home » SageWorldMath » Sage public server installation procedure (english)

Sage public server installation procedure (english)

Document Actions
setup log:

# after successful build of Sage into /usr/local/ add users to your linux machine:

$ groupadd sageusers

$ adduser -g sageusers sageadm

$ adduser -g sageusers sagenb1

$ adduser -g sageusers sagenb2

$ adduser -g sageusers sagenb3

$ adduser -g sageusers sagenb4

$ adduser -g sageusers sagenb5

# create passwordless ssh

#under sageadm do:

$ ssh-keygen

#copy the key in /home/sageadm/.ssh/

#add this key to file .ssh/authorized_keys under every sagenb1-5 user

$ mkdir .ssh

$ chmod 700 .ssh

$ vim .ssh/authorized_keys2

$ chmod 600 .ssh/authorized_keys2

#do not change permissions for files and dirs

$ vim /etc/ssh/sshd_config

#uncomment or add:

RSAAuthentication yes

PubkeyAuthentication yes

AuthorizedKeysFile .ssh/authorized_keys2

$ vim /etc/ssh/ssh_config

#uncomment or add to the HOST section:

RSAAuthentication yes

IdentityFile ~/.ssh/id_rsa

# try out:

$ su - sageadm

$ ssh sagenb1@localhost

# create dir for notebooks:

$ mkdir /home/sageadm/sagenbfiles

$ chown sageadm:sageusers /home/sageadm/sagenbfiles

$ ll -d /home/sageadm/sagenbfiles

$ chmod 2775 /home/sageadm/sagenbfiles

$ ll -d /home/sageadm/sagenbfiles

# one also needs to set permission for the group "sageusers" on "sageadm" home dir

# because otherwise notebook returns error :Permission denied"

$ chown sageadm:sageusers /home/sageadm

$ chmod 750 /home/sageadm

# create the template for notebook-startup config file:

$ vim start_notebook.sage

#copy to /home/sageadm/

# A script for starting the Sage notebook with the options you like.

# Change the options to your needs, save this script and do "sage

# start_notebook.sage" to start the notebook with these options.


# by Dan Drake; see

# we'll stuff everything into a dictionary and pass that on to notebook()

nbopts = {}

# listen on port

nbopts['port'] = '8000'

# listen on all addresses

nbopts['address'] = 'public IP'

# use https, not http

nbopts['secure'] = True

# don't open a viewer, I'll do that myself thankyouverymuch

nbopts['open_viewer'] = False

# use this directory for nb files; must be writable by the nb? users

nbopts['directory'] = '/home/sageadm/sagenbfiles'

# at most 500MB memory, 100MB files, 100 processes for nb? users

nbopts['ulimit'] = '-v 500000 -f 100000 -u 100'

# time out idle sessions after two hours

nbopts['timeout'] = 7200

# yes, can create new accounts

#nbopts['accounts'] = True

# use these minions to do our bidding

#nbopts['server_pool'] = ['sagenb%s@localhost' % n for n in [1..5]]

nbopts['reset'] = True

# Go!


$ cp /root/start_notebook.sage /home/sageadm/

$ chown sageadm:sageadm /home/sageadm/start_notebook.sage

# edit the file to your needs

Last modified 2009-08-06

Powered by Plone

This site conforms to the following standards: