------------------------------------------------------------------------------
MC logo
Using The Server
[^] CSc 302 Outlines
------------------------------------------------------------------------------
<<Introduction Starting XHTML>>
We use a Linux server at sanbox.mc.edu to host web pages. Linux is a Unix clone. We need to know a bit about using the server, and getting files to and from it.
  1. Linux/Unix is a time sharing system, often used as a server.
  2. You can usually do what you need from Windows, but it can be very convenient to have a few Unix commands.
  3. Logging in.
    1. Use a program called putty to log in.
      1. Installed on the lab computers.
      2. Putty is a free program. If you would like a copy, you can find it here.
    2. Double click it. Fill in the name of the computer to connect to, sandbox.mc.edu.
    3. Fill in your login name and password.
    4. You might want to use the ssh protocol.
    5. After you get on, use passwd to change your password.
    6. Optional: chfn
  4. Sandbox operates as a command-line system.
    1. Creating a text file. Use pico or another editor.
      Create a file with any contents.
    2. Listing files: ls.
    3. Printing files: lpr, or pr | lpr
      Works from labs on campus
    4. Viewing files: more.
    5. Copying files: cp.
    6. Deleting files rm.
    7. Finding out about commands: man, man -k.
  5. Creating a web directory. (Directory is Unixese for “folder.”)
    1. On Sandbox, web files go in a directory named local_html.
    2. Create it: mkdir local_html. Do ls to see it.
    3. Say cd local_html to go there.
    4. Use pico to create this file as test.html:
      <html><head><title>Hi there</title></head>
      <body>Greetings, Earthlings</body></html>
    5. Point your browser at http://sandbox.mc.edu/~yourid/test.html
  6. Sandbox does not run the FTP protocol; it uses SFTP which encrypts traffic. Here are two clients which work.
    1. FileZilla is an FTP client which also talks SFTP.
    2. Win SCP allows drag-and-drop access to Sandbox files. (It does have a recently-added FTP function which won't work with the campus server.)
  7. Create and transmit a file.
    1. Open Notepad or Wordpad on Windows, and enter the following:
      <html><head><title>The Title</title></head>
      <body>Not the title.</body></html>
    2. Save it on the desktop as myfile.html.
    3. Use FileZilla to put it on the server. Change to the local_html folder and send myfile.html.
    4. View http://sandbox.mc.edu/~yourid/myfile.html
<<Introduction Starting XHTML>>