On 2 March 2010 21:44, Andrzej Giniewicz <[email protected]> wrote:
>> How about a new "Administering Sage" book added to the documentation?
>> Setting up a campus server, security concerns, etc., could be noted in it.
>
> any news on this topic? I'll need something similar soon so I wonder
> if I should use Byungchuls description and some digging or there is
> already some draft of such document in one place somewhere, first time
> I will use sage outside of my local machine or from server hosted
> elsewhere
>
> Andrzej.
>
> --
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to 
> [email protected]
> For more options, visit this group at 
> http://groups.google.com/group/sage-support
> URL: http://www.sagemath.org
>

There are certainly some aspects which were not mentioned above.

1) How to start the server. You don't want to be in a position that if
the system gets rebooted, a power failure etc, that someone has to
manually restart the server.

The exact method of doing this would depend on your operating system.
I know I did this for Solaris 10, but there's not a lot of point in
sharing that in detail here.

But basically the root user must start the server, but you don't want
to run the server as root. So something like

   su - server /local-bins/start-sage

in a script which starts at boot. The 'su - server' makes whatever
runs in  /local-bins/start-sage run as the user 'server' and not as
'root'.

On Solaris one would ideally use the service management facility (SMF)
to start the process. That can then restart the server should it die
for any reason. When I set up

http://t2nb.math.washington.edu:8000

I did not use SMF, but that is the best way to do it on Solaris. I
used a simple startup script. That means the server would restart if
the system was booted, but it would not restart if a command caused it
to die. Since there have been instances of reported commands that can
crash the server, it would be sensible to have some way of ensuring it
gets restarted if it does crash. However, the SMF in Solaris would not
keep trying and trying - if it failed too often then it would be
considered a fault, and no further attempts made to restart it.

2) Another point is that I do not believe the options that would
appear to be available to sage actually work as they should do. In
particular, I was unable to get the server pool to work as a command
line option. Instead I use a python file - basically a slightly
modified one that William sent me.

# cat  /local-bins/start-sage
#!/usr/bin/env bash
nohup /homes/server/sage-4.3.0.1-Solaris-10-SPARC-sun4u-or-sun4v/sage
/homes/server/notebook.py >>  /homes/server/logfile.out&

The contents of  /homes/server/notebook.py are

# cat notebook.py
import sagenb.notebook.notebook_object as n

server_pool=['sa...@localhost']

n.notebook('sage_notebook', port=8000, accounts=True, address='',
         server_pool = server_pool, ulimit='-u 1000 -v 1000000 -t 3600',
    open_viewer=False, timeout=20*60, secure=False, port_tries=0)


(I've not no idea if those are optimal in any way)

3) When I set this up on Solaris, I set it up in a 'zone'. I don't
know if Linux has any similar thing, but basically it is like a jail.
Even if a hacker manages to get root access in the zone, he is
confined to it. I've also limited the amount of memory and number of
CPUs that can be used in that zone.

I should add, I have never set up a server which is getting much use.
I only ever set them up on Solaris, and only recently has Sage run on
Solaris properly.


Dave

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to