Staff Linux Services - London South Bank University

advertisement
Page 1 of 10
Staff Linux Services
crito.lsbu.ac.uk
myweb.lsbu.ac.uk
Staff Information: Summary of changes to Staff UNIX based services
AUTHOR
DESCRIPTION
ISSUE
ISSUE DATE
Tom Swigg
First Draft
1
6th June 2010
Tom Swigg
Updated with session directory recommendations
2
14th Oct 2010
Tom Swigg
Removed legacy UNIX references
3
24th Oct 2011
London South Bank University,
Staff Linux Services on
crito.lsbu.ac.uk(myweb.lsbu.ac.uk)
Version 1
Page 2 of 10
Contents
Staff Linux Services......................................................................................... 1
1. Background................................................................................................. 3
2. Interactive shell login ................................................................................. 4
2.1 Access ....................................................................................................................... 4
2.2 Shell .......................................................................................................................... 4
2.3 Authentication ............................................................................................................ 4
2.4 Software Details ......................................................................................................... 5
3. Web development ....................................................................................... 6
3.1. Access ............................................................................................................................. 6
3.2 Authentication .................................................................................................................. 6
3.3 Site Management ............................................................................................................. 6
3.2.4 Session Management .................................................................................................... 7
4 Mysql Support ............................................................................................... 8
4.1 Mysql Servers ................................................................................................................... 8
4.2 Connection details ............................................................................................................ 8
4.3 Command Line Utilities..................................................................................................... 9
5. Summary ................................................................................................... 10
London South Bank University,
Staff Linux Services on
crito.lsbu.ac.uk(myweb.lsbu.ac.uk)
Version 1
Page 3 of 10
1. Background
Staff UNIX based services at LSBU were migrated to Linux during the Summer
recess of 2010.
Three main services are available on Linux Servers. These services are
1) Interactive shell login
2) Web development
3) Mysql database services
This document is a summary of these services for Staff who wish to use Linux
based services.
.
London South Bank University,
Staff Linux Services on
crito.lsbu.ac.uk(myweb.lsbu.ac.uk)
Version 1
Page 4 of 10
2. Interactive shell login
2.1 Access
The Linux server for Staff interactive login is crito.lsbu.ac.uk. It is a 64 bit
Red Hat Enterprise Linux Server release 5.1. This server is not used by students. It
also only supports secure shell access. This access is supported using the Windows
ssh client putty which can be downloaded from
http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html.
2.2 Shell
The default login shell for Staff users in this environment is now set as the Bash
Shell. Customisations to the user login environment can now be made by editing the
user login script ~/.bash_profile or the shell specific startup script ~/.bashrc
2.3 Authentication
The Staff member’s Username on Linux is the same as the Windows Active
Directory Username and the password is now the same as the Windows password
If a Staff member wishes to change their password then this can be done in one of
four ways
a) From the Linux command line using the passwd command. This will update
the Active Directory password and therefore affects the staff members next
login to the LSBU domain. Note, the Linux passwd command is quite strict on
choice of passwords.
b) Requesting a password change via the ICT Help Desk.
c) Via Outlook Web Access
http://www.lsbu.ac.uk/ict/email/OWApassword.shtml
d) By hitting CTRL-ALT-DEL and selecting Change Password when logged into
Windows on your PC.
London South Bank University,
Staff Linux Services on
crito.lsbu.ac.uk(myweb.lsbu.ac.uk)
Version 1
Page 5 of 10
2.4 Software Details
Software
Operating System
Bash
PHP
PHP
Version
Red Hat
Enterprise
Linux 5.1 64
bit
3.1
5.1.6
4.2.3
PHP
4.4
PHP
3.0.18
Perl
Python
Ruby
GCC C compiler
Mysql
5.8.8
2.4.3
1.8.5
4.1.2
5.0.22
Mysql
3.23.32
TCL
JAVA
Rubygems
Drupal
Spring Framework
8.4
1.4.2
1.2.0
6.13
2.5.5
London South Bank University,
Staff Linux Services on
crito.lsbu.ac.uk(myweb.lsbu.ac.uk)
Comment
Kernel 2.6.18-53.el5
Bundled with OS
Bundled
For backwards compatibility
/usr/local/php-4.2.3/bin/php
For backwards compatibility
/usr/local/php4-ssl/bin/php
For backwards compatibility
/usr/local/php-3.0.18/bin/php
Bundled
Bundled
Bundled
Bundled
Via the separate mysql 5 server called
mysql5.lsbu.ac.uk
For backwards compatibility
Local to crito so connection strings will
need to be changed
Bundled
Bundled
TBD Download
TBD Download
TBD Download
Version 1
Page 6 of 10
3. Web development
3.1. Access
The new Linux server for Staff personal web services is crito.lsbu.ac.uk. It
is 64 bit Red Hat Enterprise Linux Server (release 5.1) It also only supports secure
ftp access. This access is supported using the Windows Filezilla utility
http://filezilla-project.org/
3.2 Authentication
The Staff member’s Username on Linux again is the same as the Windows Active
Directory Username and the password is now the same as the Windows
password.
If a staff member wishes to change their password then this can be done in one of
four ways
a) From the UNIX command line using the passwd command. This will update
the Active Directory password and therefore affects the Staff member’s next
login to the LSBU domain. Note, the Linux passwd command is quite strict on
choice of passwords.
b) Requesting a password change via the ICT Help Desk.
c) Via Outlook Web Access http://www.lsbu.ac.uk/ict/email/OWApassword.shtml
d) By hitting CTRL-ALT-DEL and selecting Change Password when logged into
Windows on your PC.
3.3 Site Management
Once a user has uploaded their web site files, the default setting for folders and
files should ensure that ownerships and permissions are correct. If there are any
problems they are advised to log in interactively and run the command wwwset
whose purpose is to ensure web pages, folders and scripts have the correct user
and group ownership as well as permissions.
The location of web site files and scripts has been a matter of contention over
the duration of the overall UNIX to Linux Migration project and pilot usage. The
rationale surrounding the final configuration is dealt with in a separate
document. In short we will continue to use the legacy structure.
So web site files will still be located in the user’s ~/.public_html directory
and any scripts should be placed in the ~/.public_html/cgi-bin directory.
All scripts should be run by a CGI wrapper program via a Script Alias such as
/php5c-cgiwrap . This has the following advantages
London South Bank University,
Staff Linux Services on
crito.lsbu.ac.uk(myweb.lsbu.ac.uk)
Version 1
Page 7 of 10
a) The execution of scripts takes place in the context of the account holder thus
providing isolation
b) The execution of scripts is logged
c) The execution of scripts from off campus can be controlled.
The URL used to access the web site remains as
http://myweb.lsbu.ac.uk/~username Whilst URLs were shared with Students on
UNIX, it has been decided that Staff and Student web sites should be separated
and managed independently. It was felt that the myweb URLs should remain for
Staff only as Staff members may have established published links using these
URLs. So a new URL namespace will be used for Students from Academic Year
2010/2011 onwards.
3.2.4 Session Management
There is a problem, that may very well have been present before the migration,
where a second tab connection to a different www site generates a permission
denied error when trying to open a session file.
Here is an explanation and workaround.
This problem occurs if you run both scripts in different tabs in the same browser.
The first one starts a session and opens a session file. The second one tries to
use the same session file, but cant because it is running under a different
account, so does not have the right permissions.
The solution is to have each account keep its session files in its own location.
For each account:
Create a new directory to hold session files. This can be anywhere the account
has read/write access, e.g. /users/ms/ms/ercrecru/web/cgi-bin/php-sessions
For PHP4 copy the php.ini file from /usr/local/php-4.2.3/bin/php.ini
into the directory where your scripts live.
For PHP5, make a copy of /etc/php.ini instead of /usr/local/php4.2.3/bin/php.ini
Edit the session.save_path entry in your copy of php.ini to point to the new
directory, e.g.
session.save_path = /users/ms/ms/ercrecru/web/cgi-bin/phpsessions
London South Bank University,
Staff Linux Services on
crito.lsbu.ac.uk(myweb.lsbu.ac.uk)
Version 1
Page 8 of 10
4 Mysql Support
4.1 Mysql Servers
As part of the migration process any Staff member with a personal mysql
database will be able to access that database from the new Linux Server
crito.lsbu.ac.uk by using the following connection information. The migration will be
to a mysql 3 database running on crito.lsbu.ac.uk. In addition we will be supporting
mysql5 on a server mysql5.lsbu.ac.uk
4.2 Connection details
Mysql Version
Mysql Server Name
Mysql Database Name
Mysql User Name
Mysql Password
.
Mysql Version
Mysql Server Name
Mysql Database Name
Mysql User Name
Mysql Password
3.23.32
crito.lsbu.ac.uk
Same as your Linux username
Same as your Linux username
Same as the Mysql password used for
accessing your database before
migration
5.0.22
mysql5.lsbu.ac.uk
Same as your Linux username
Same as your Linux username
A separate password distinct from your
AD password
Should you request this facility you will be expected to migrate the database
from mysql3 to mysql5 yourself.
London South Bank University,
Staff Linux Services on
crito.lsbu.ac.uk(myweb.lsbu.ac.uk)
Version 1
Page 9 of 10
4.3 Command Line Utilities
The bundled mysql commands on crito will not work out of the box so wrapper
scripts have been provided to connect to the local mysql 3 server or to the new
mysql 5 server
For Mysql3
[swiggtc@crito ~]$ mysql3 -u username -p dbname
This is a wrapper script for the legacy mysql 3.23.32
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 500662 to server version: 3.23.32
Type 'help;' or '\h' for help. Type '\c' to clear the buffer
mysql>
[swiggtc@crito ~]$ mysqldump3 -u username -p dbname > dbname.dmp
This is a wrapper script for
Enter password:
the legacy mysql 3.23.32
For Mysql5
[swiggtc@crito ~]$ mysql5 -u username -p dbname
This is a wrapper script for
mysql 5
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 500662 to server version: 3.23.32
Type 'help;' or '\h' for help. Type '\c' to clear the buffer
mysql>
[swiggtc@crito ~]$mysqldump5 -u username -p dbname > dbname.dmp
This is a wrapper script for
Enter password:
London South Bank University,
Staff Linux Services on
crito.lsbu.ac.uk(myweb.lsbu.ac.uk)
mysql 5
Version 1
Page 10 of 10
5. Summary
New Server Detail
Login Server Name
crito.lsbu.ac.uk
Login Password
Windows Password
Login Shell
Bash Shell (bash/sh)
Web Server Name
myweb.lsbu.ac.uk
SFTP User Password
Windows Password
PHP Version
PHP 5.1.6 (with 3.0.18/4.2.3/4.4 for compatibility)
Mysql Server
mysql5.lsbu.ac.uk (crito.lsbu.ac.uk for mysql 3 compatibility)
MySQL Version
Mysql 5.0.22 (with 3.23.32 for compatibility)
Site Base Folder
~/.public_html
CGI Folder
~/.public_html/cgi-bin
Session directory
~/.public_html/cgi-bin/php-sessions
CGIWrapper Script Alias
/php5c-cgiwrap
(with /php4-cgiwrap and
/php-cgiwrap for backwards compatibility)
London South Bank University,
Staff Linux Services on
crito.lsbu.ac.uk(myweb.lsbu.ac.uk)
Version 1
Download