Lecture 1. Introduction to the environment.
During the course you will have a set of homework assignments and projects. You need to keep all your
result files on the IST server. All of you have an account on the
server. Use your Marshall login name and password to access the server. Your own directory on the server is
/home/your_login_name. All your html files are to be stored in
/home/your_login_name/perl directory.
There are two ways of doing your projects. You can either build all files locally and then transfer
them to the server or login to the server and create all files on the server. To write your Perl scripts on
WIndows computers you need to install Active Perl.
You can download it either from the home page or from
IST server.
I would suggest to use the first way, because it's more convenient and a little faster.
Transferring files to IST server.
If you decide to work locally and then transfer all your files to the server, then there are two ways
to copy the files. On any computer connected to the Internet you can use Secure Shell Client to do this and
from any IST computer you can map your directory on the server and just copy files like you usually do
in Windows.
Secure Shell File Transfer.
First, you'll need a SSH Client. There are several programs you can use. I personally like
this one. You can download it from its home page or from
IST server.
Once you download and installed the SSH Client you get two more icons on your desktop:
Run SSH Secure File Transfer Client click on Profiles tab and chose Add Profile....
You will be prompted for a profile name. Enter any name you want it's for your usage only.
When a new profile created you need to edit it to make it point to the right server and use the right login
name. To edit the profile click again on Profiles tab and chose Edit profile.... In the
new window enter the server ist.marshall.edu and your Marshall login name:
Click OK when done. Now click on Profiles and chose the newly created profile. You'll be prompted
for a password. If everything works fine you should see a window like this with your login name where
the red arrow points at.
If you see my name there it means you hacked into my account. Contact me
immediately if it is so. Also contact me if something doesn't
go as it described. When you get the window above you can drag and drop your files to copy them. Just
remember that all your project files are to be in www directory.
Windows Mapped Drive.
If you work in one of the computers in PH200, PH207, or G31 in Morrow you can just map your IST directory
using usual Windows Network Drive. To do so right click on My Computer
and chose Map Network Drive.... Type \\ist\homes in the Folder prompt:
and click finish. If you are logged on under your Marshall login name you should be connected to your
own directory on the IST server. Contact me if you have
any problem getting to the server. Otherwise just copy your files.
Creating/editing files on the server.
Sometimes you may want to work directly on the server. It is convenient if you need just make a small
correction in files you have transferred or you are on a computer without any GUI. In this situation
you again will need an SSH Client. You can use the same client described above, but you need to create
another profile for working on the server not transferring files. To create this new profile start
SSH Secure Shell Client click on Profiles tab, ... all other steps are exactly the same.
However, since you used Secure Shell Client, not File Transfer, the profile will be different.
To connect to the IST server click on Profiles and select the profile you just created. You'll
be prompted for the password. When you get connected to you'll see a window like this:
This means you are working on the IST server in Linux environment. Please be gentle and don't crash it
.
To start working on your files you need to go to your www directory. Use cd
command to do it: cd perl. ls command will show you the list of files in you
directory. To edit files you can use one the editors:
vi
pico
jed.
As for me, I prefer pico, but all Unix/Linux guru use vi. This choice is yours.
The next screen shows pico editor used to create file myfile.html
When the file is created you can run the script by executing
> perl script_name.pl
command.