csdalpha1 config - London South Bank University

jockeyropeInternet and Web Development

Feb 2, 2013 (4 years and 8 months ago)

119 views











Page
1

of
8




London South Bank University,

Student Linux Services
on
meno.lsbu.ac.uk(mypages.lsbu.ac.uk)

Version 1



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


22
nd

Feb 2011


Tom Swigg

Completed removal of UNIX references


1.1


24
th

Oct
2011





Contents

Student Linux Services

................................
................................
...................

1

1.

Introduction

................................
................................
................................
.

2

2.

Inte
ractive shell login

................................
................................
.................

3

2.1 Access

................................
................................
................................
..............................

3

2.2.2 Shell

................................
................................
................................
........................

3

2.2.3 Authentic
ation

................................
................................
................................
.........

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 Man
agement

................................
................................
.............................

6

4 Mysql Support

................................
................................
...............................

7

4..1 Mysql Server

................................
................................
................................
............

7

4.2 Connection
details

................................
................................
................................
.....

7

4.3 Command Line Utilities

................................
................................
..............................

7

5 Summary
................................
................................
................................
........

8












Page
2

of
8




London South Bank University,

Student Linux Services
on
meno.lsbu.ac.uk(mypages.lsbu.ac.uk)

Version 1




1.

Introduction



The purpose of this documen
t 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 s
er
vices covered in this document include


1)

I
nteractive 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.
















Page
3

of
8




London South Bank University,

Student Linux Services
on
meno.lsbu.ac.uk(mypages.lsbu.ac.uk)

Version 1




2.


Interactive shell logi
n





2.1

Access

The
Linux server for
S
tudent 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 fo
r
S
tudent 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 S
tudent’s Username on Linux again is the same as th
e Windows
Active
Directory
Username and
the

password is

th
e same as the Windows password
.


If a S
tudent 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
th
e Active Directory pass
word and therefore affects the
S
tudent

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.u
k/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.












Page
4

of
8




London South Bank University,

Student Linux Services
on
meno.lsbu.ac.uk(mypages.lsbu.ac.uk)

Version 1





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

Version

Comment

Operating System

Red Hat Enterprise Linux
5.1 64
bit

Kernel 2.6.18
-
53.el5

Bash

3.1

Bundled with OS

PHP

5.1.6

Bundled

Perl

5.8.8

Bundled

Python

2.4.3

Bundled

Ruby

1.8.5

Bundled

GCC C compiler

4.1.2

Bundled

Mysql

5.0.22

Bundled

TCL

8.4

Bundled

JAVA

1.4.2

Bundled

Rubygems

1.2.0

Download

Drupal


6.13

Download

Spring Framework

2.5.5

Download



















Page
5

of
8




London South Bank University,

Student Linux Services
on
meno.lsbu.ac.uk(mypages.lsbu.ac.uk)

Version 1





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 se
cure
ftp access. This access was supported using the Windows Filezilla utility

http://filezilla
-
project.org/




3.
2 Authentication


The S
tudent’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 the
ir 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 defa
ult 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 correc
t 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 configurat
ion 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.










Page
6

of
8




London South Bank University,

Student Linux Services
on
meno.lsbu.ac.uk(mypages.lsbu.ac.uk)

Version 1



Al
l scripts sh
ould be run by a CGI wrapper program via a Script Alias
/php5c
-
cgiwrap

. 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 i
s 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 S
taff on UNIX

and it
has been decided that Staff and S
tudent web sites should be separated and
managed independently. It was felt that th
e myweb URLs should remain for Staff
only as S
taff me
mbers may have established published links

using these URLs.
So a new URL

name
space will be used for S
tudents 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,
w
here 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 f
irst 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/php
-
sessions

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/php
-
sessions











Page
7

of
8




London South Bank University,

Student Linux Services
on
meno.lsbu.ac.uk(mypages.lsbu.ac.uk)

Version 1





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



.

My
sql Server Name

meno
.lsbu.ac.uk

Mysql Database Name

Same as your Linux username

Mysql User Name

Same as your Linux username

Mysql Password


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:

















Page
8

of
8




London South Bank University,

Student Linux Services
on
meno.lsbu.ac.uk(mypages.lsbu.ac.uk)

Version 1




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