Student Linux Services - London South Bank University

advertisement
Page 1 of 8
Student Linux Services
meno.lsbu.ac.uk
mypages.lsbu.ac.uk
AUTHOR
DESCRIPTION
ISSUE
ISSUE DATE
Tom Swigg
Updated from Migration Guide removing UNIX
references
1
22nd Feb 2011
Tom Swigg
Completed removal of UNIX references
1.1
24th Oct 2011
Contents
Student Linux Services ................................................................................... 1
1. Introduction................................................................................................. 2
2. Interactive shell login ................................................................................. 3
2.1 Access .............................................................................................................................. 3
2.2.2 Shell ........................................................................................................................ 3
2.2.3 Authentication ......................................................................................................... 3
2.2.4 Software Details ...................................................................................................... 4
3. Web development ....................................................................................... 5
3.1 Access ....................................................................................................................... 5
3.2 Authentication ........................................................................................................... 5
3.3 Site Management....................................................................................................... 5
3.2.4 Session Management ............................................................................................. 6
4 Mysql Support ............................................................................................... 7
4..1 Mysql Server ............................................................................................................ 7
4.2 Connection details ..................................................................................................... 7
4.3 Command Line Utilities .............................................................................................. 7
5 Summary........................................................................................................ 8
London South Bank University,
Student Linux Services on
meno.lsbu.ac.uk(mypages.lsbu.ac.uk)
Version 1
Page 2 of 8
1. Introduction
The purpose of this document is to inform students of the technical details
involved in using the Linux server meno.lsbu.ac.uk and the associated web services
http://mypages.lsbu.ac.uk. The Linux services covered in this document include
1) Interactive shell login and some key Linux commands
2) Web development including how to run PHP, Perl and CGI scripts in general
from http://mypages.lsbu.ac.uk
3) Mysql database services, how to apply for and use a mysql database.
London South Bank University,
Student Linux Services on
meno.lsbu.ac.uk(mypages.lsbu.ac.uk)
Version 1
Page 3 of 8
2. Interactive shell login
2.1 Access
The Linux server for Student interactive login is meno.lsbu.ac.uk. It is a 64 bit
Red Hat Enterprise Linux Server release 5.1. 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.2 Shell
The default login shell for Student users in this new environment is 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.2.3 Authentication
The Student’s Username on Linux again is the same as the Windows Active
Directory Username and the password is the same as the Windows password .
If a Student wishes to change their password then this can be done in one of five
ways
a) From the Linux command line using the passwd command. This will update
the Active Directory password and therefore affects the Student’s next login
to the LSBU domain. Note, the Linux passwd command is quite strict on
choice of passwords.
b) Via self service http://www.lsbu.ac.uk/ict/selfservice/
c) By going to the LRC and requesting a password change
d) Via Outlook Web Access
http://www.lsbu.ac.uk/ict/email/OWApassword.shtml
e) By hitting CTRL-ALT-DEL and selecting Change Password when logged into
Windows on your PC.
London South Bank University,
Student Linux Services on
meno.lsbu.ac.uk(mypages.lsbu.ac.uk)
Version 1
Page 4 of 8
2.2.4 Software Details
Unlike the Staff Linux Server ICT is not providing any backward compatibility
features for Students working on the assumption that it is a better learning
experience to use more up to date software versions. The list below is as applies at
the time of writing. Further software packages may be made available should a
suitable case be made for their inclusion.
Software
Operating System
Bash
PHP
Perl
Python
Ruby
GCC C compiler
Mysql
TCL
JAVA
Rubygems
Drupal
Spring Framework
London South Bank University,
Student Linux Services on
meno.lsbu.ac.uk(mypages.lsbu.ac.uk)
Version
Red Hat Enterprise Linux
5.1 64 bit
3.1
5.1.6
5.8.8
2.4.3
1.8.5
4.1.2
5.0.22
8.4
1.4.2
1.2.0
6.13
2.5.5
Version 1
Comment
Kernel 2.6.18-53.el5
Bundled with OS
Bundled
Bundled
Bundled
Bundled
Bundled
Bundled
Bundled
Bundled
Download
Download
Download
Page 5 of 8
3. Web development
3.1 Access
The Linux server for Student personal web services is meno.lsbu.ac.uk. It is
a 64 bit Red Hat Enterprise Linux Server (release 5.1). It also only supports secure
ftp access. This access was supported using the Windows Filezilla utility
http://filezilla-project.org/
3.2 Authentication
The Student’s Username on Linux again is the same as the Windows Active
Directory Username, however, the student’s password is now the same as the
Windows password and so there are no longer two passwords to manage.
If a student wishes to change their password then this can be done in one of five
ways
a) From the Linux command line using the passwd command. This will update
the Active Directory password and therefore affects the Students next login to
the LSBU domain. Note, the Linux passwd command is quite strict on choice
of passwords.
b) Via self service http://www.lsbu.ac.uk/ict/selfservice/
c) By going to the LRC and requesting a password change
d) Via Outlook Web Access http://www.lsbu.ac.uk/ict/email/OWApassword.shtml
e) By hitting CTRL-ALT-DEL and selecting Change Password when logged into
Windows on your PC.
3.3 Site Management
Once a Student has uploaded their web site files, the default setting for folders
and files should ensure that ownerships and permissions are correct. If there 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.
London South Bank University,
Student Linux Services on
meno.lsbu.ac.uk(mypages.lsbu.ac.uk)
Version 1
Page 6 of 8
All scripts should be run by a CGI wrapper program via a Script Alias /php5ccgiwrap . This has the following advantages
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 has changed to
http://mypages.lsbu.ac.uk/~username This is because the
http://myweb.lsbu.ac.uk/~username URLs were shared with Staff on UNIX and 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.
New student accounts should be created with a private session directory. A
manual method fo creating the required structure is as follows
1. 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/phpsessions but best done in the cgi-bin directory
For PHP5, make a copy of /etc/php.ini into the directory where your scripts
live.
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,
Student Linux Services on
meno.lsbu.ac.uk(mypages.lsbu.ac.uk)
Version 1
Page 7 of 8
4 Mysql Support
4..1 Mysql Server
Mysql support is now be based on a Mysql 5 server running on
meno.lsbu.ac.uk.
4.2 Connection details
.
Mysql Server Name
Mysql Database Name
Mysql User Name
Mysql Password
meno.lsbu.ac.uk
Same as your Linux username
Same as your Linux username
A separate password distinct from your
AD password
4.3 Command Line Utilities
The bundled mysql commands on meno will connect to the local server as normal
[swiggtc@meno ~]$ mysql -u username -p dbname
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@meno ~]$ mysqldump -u username -p dbname > dbname.dmp
Enter password:
London South Bank University,
Student Linux Services on
meno.lsbu.ac.uk(mypages.lsbu.ac.uk)
Version 1
Page 8 of 8
5 Summary
Server Detail
Login Server Name
meno.lsbu.ac.uk
Login Password
Windows Password
Login Shell
Bash Shell (bash/sh)
Web Server Name
mypages.lsbu.ac.uk
SFTP User Password
Windows Password
PHP Version
PHP 5.1.6
MySQL Version
Mysql 5.0.22
Site Base Folder
~/.public_html
CGI Folder
~/.public_html/cgi-bin
Session Directory```
~/.public_html/cgi-bin/php-sessions
CGIWrapper Script Alias
/php5c-cgiwrap
London South Bank University,
Student Linux Services on
meno.lsbu.ac.uk(mypages.lsbu.ac.uk)
Version 1
Download