First Steps due Thu 31 Aug 13:20

\begin{purpose}
In this assignment you will:
\begin{itemize}
\item Learn to ...
...ommand-line.
\item Write a simple HTML document.
\end{itemize}
\end{purpose}

Preparation for Lab Day

In preparation for lab day, do these actions:
  1. From your own computer (not the JB 202 computers) establish an ssh connection to csci.hsutx.edu. In doing so you will be prompted to enter your username and password which are the ones you would use when using the JB 202 computers. Here are basic instructions for various platforms. You may need to use your favorite search engine to get more details:
    Windows
    Download, install, and execute PuTTY:

    https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html

    When you run PuTTY enter csci.hsutx.edu as the hostname and then click ``Open''.

    Mac
    Launch the ``terminal'' application. From the command-line enter: ssh yourusername@csci.hsutx.edu and then follow prompts.
    Linux
    Launch one of the ``terminal'' applications. From the command-line enter:

    ssh yourusername@csci.hsutx.edu

    and then follow prompts.

  2. Once you are logged into your csci.hsutx.edu account you are ready to practice using some helpful commands:
    • Use ls to list the files in the current directory.
    • Use mkdir labday to make a new directory (folder) called labday
    • Use cd labday to make the new directory to be the default
    • Use wget http://josephus.hsutx.edu/classes/w1/source/helloworld.html to download an HTML file named helloworld.html into the current folder.
    • Use ls -l to list (and get details about) the files in the current directory (you should see the newly downloaded file).

  3. Based on our discussion of text editors in class decide which text editor you would like to use: vim or nano. Then follow the instructions for the editor of your choice below:
    vim
    Make sure you have the cheat sheet handy as a reference. At the command-line enter the command: vimtutor and read and follow the instructions for lessons 1 and 2 (each lesson has quite a few parts so this will take about an hour).
    nano
    Make sure you have the cheat sheet handy as a reference. Read and follow the tutorial found at:

    https://www.howtogeek.com/howto/42980/the-beginners-guide-to-nano-the-linux-command-line-text-editor/

  4. Using your chosen editor modify the helloworld.html file you downloaded so that it displays ``Hello, World. [Your name] has arrived!''

  5. Be prepared to show your work to the instructor on lab day.

Lab Day

  1. When you arrive to class connect to the csci server using either your computer or one of the lab computers. Show your prep work to the instructor.

  2. Set up your web space on csci.hsutx.edu by following these instructions:
    • Connect in a terminal session to the csci server.
    • Create a directory named public_html (mkdir public_html) (NOTE: this is case-sensitive)
    • Set permissions on your home directory files to be unreachable by others (chmod -R o-rxw *)
    • Set home directory itself to be viewable by all (chmod o+rx ~)
    • Set web space to be viewable by all (chmod o+rx public_html)
    • Set web space as working directory (cd public_html)
    • Make a subfolder called hw01 (mkdir hw01)
    • Set hw01 as working directory (cd hw01)

  3. Copy helloworld to your web space and view it from a browser:
    • Copy helloworld.html into working directory (cp ~/labday/helloworld.html .)
    • Verify that your web space is properly configured by, in a browser, visiting http://csci.hsutx.edu/~yourloginname ... then browse to the hw01 directory and view your hello world document.

  4. Create a new HTML document in the hw01 directory called widgets.html that will be a web page for advertising widgets. Feel free to copy helloworld.html as a starting point. On the web page make use of an h1 header, a list, a paragraph, a photo, and a link. Refer to http://josephus.hsutx.edu/classes/w1/source/htmldemo.html as needed.

  5. Show your work to the instructor.

Quick Links