1 / 41

ECT 250: Survey of e-commerce technology

ECT 250: Survey of e-commerce technology. Publishing pages on a Unix system. Publishing the page. Now that we can create some basic Web pages, we need to discuss how to publish these pages, that is, make them available on the WWW. In this course, all Web pages will be published

ponce
Télécharger la présentation

ECT 250: Survey of e-commerce technology

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ECT 250: Survey of e-commerce technology Publishing pages on a Unix system

  2. Publishing the page Now that we can create some basic Web pages, we need to discuss how to publish these pages, that is, make them available on the WWW. In this course, all Web pages will be published on the students.depaul.edu machine. Next we learn how to move existing pages onto students.depaul.edu.

  3. The steps for publishing • Create the Web page(s) using FrontPage • FTP the page(s) over to students.depaul.edu • Telnet into your account and change the • permissions for all necessary files and • directories. • This will include all files transferred in the • second step.

  4. File transfer protocol • FTP (file transfer protocol) allows files to be • transferred between computers connected • using TCP/IP. • It uses the client/server model. • FTP permits files to be transferred in both • directions, that is, from the client to the server • or from the server to the client. • It can transfer files one at a time or many files • simultaneously.

  5. Files types and FTP • FTP allows the transfer of two types of files: • ASCII text: files containing only characters • available through the keyboard and containing • no formatting information. • Example: Files created using Notepad • Binary data: files containing word processed • documents, worksheets, graphics, etc.

  6. Other functions of FTP • FTP has other useful functions: • Displaying remote and local computers’ directories • Changing the current client’s or server’s active • directories • Creating and removing local and remote directories. • We will use these functions when transferring HTML • documents created on a PC to the students.depaul.edu • machine.

  7. Accessing with FTP • There are two ways to access remote machines: • Full privilege FTP access: This requires that you • have an account on the remote computer and that • you supply your username and password. • Anonymous FTP: If you do not have an account • on the remote computer, you can type anonymous • as the username and your e-mail address as the • password and obtain limited access to the remote • computer.

  8. FTP with a browser • To use a browser as an interface with FTP: • Type ftp://yourlogin@students.depaul.edu • This will bring up a window that prompts you • for your password. • Type in your password (being careful to type • it correctly) and hit enter. • The files in your main directory will appear. • Note: Be sure to check that the browser does not • store your password. In IE look at Tools/Internet • Options/Content/AutoComplete.

  9. Other versions of FTP • You can also directly use FTP programs if they • are installed on your machine. • Examples: • ws_ftp • cuteftp • Most have GUI interfaces and work in a manner • similar to the Web browser interface.

  10. Browsing through files Once you have logged into your account using FTP you can browse through the files located in your account. You do this by double clicking on the folders that appear. Example: ftp://tsettle@condor.depaul.edu

  11. HTML directory A Web server typically requires that any Web pages that are to be published on the site must be located in a particular directory. On students.depaul.edu (and condor.depaul.edu) that directory is public_html. If you do not have a public_html directory you must create one. All your web pages must be in that directory or they will not be visible to browsers.

  12. An additional requirement All pages you will publish for this course must be located in a subdirectory of public_html called ect250. You will NOT receive credit for your homework if they are not located in public_html/ect250. You must create the ect250 subdirectory since it will certainly not exist.

  13. Creating directories with FTP • To create a directory on students.depaul.edu • using FTP with the browser interface: • Select File • Select New • Select Folder • Click on the folder and give it the name • you wish it to have. • Alternatively you can use the new folder icon • (or a similar button) in any GUI interface for • FTP.

  14. Moving files with FTP • Once you have created a public_html directory, you • can move your HTML files into that directory. • In order to do that: • Open up the directory into which you wish to • move the file. • Open the folder where the file is located on your • local machine. • Select Edit/Copy or drag the file directly into the • directory. • Example: Place pages into public_html/ect250.

  15. The next step: Telnet Once you can moved your Web pages into your account, you now need to ensure that they are visible to a Web browser. This involves using Telnet to log into the students machine and changing the access permissions on the files and directories. Note: Some FTP programs allow you to change permissions using the GUI interface. We will use Telnet (and Unix commands) instead.

  16. Some Unix commands • Move to a child directory: cd directory_name • Move up to a parent directory: cd .. • List files/directories in the current directory: ls • List files/directories with permissions: ls –l • Copy a file: cp old_file new_file • Create a new directory: mkdir directory_name • Remove a file: rm file_name • Remove a directory: rmdir directory_name • Rename (move) a file: mv old_name new_name • Help on a Unix command: man commandname

  17. Access permissions • To give directory_name the correct permissions • you must: • Move into the parent directory of directory_name • using cd (change directory) • Type: chmod 755 directory_name • In order to give file_name the correct permissions • you must: • Move into the parent directory of file_name • using cd (change directory) • Type: chmod 644 file_name

  18. The steps for publishing • Create the Web page(s) using FrontPage • FTP the page(s) over to students.depaul.edu • placing them in public_html/ect250 • Telnet into your account and change the • permissions for all necessary files and • directories. (To move from directory to • directory use the cd command). • This will include public_html, ect250, • and all files transferred in Step 2.

  19. Warning about homework! You must make sure that the permissions on your directories and files are set correctly before you submit your web assignments. If your pages are not viewable you will simply receive a zero on the assignment. Helpful hint: Try to view your pages before you submit the assignment to make sure it works!

  20. Viewing your pages • Once you have created a public_html and an ect250 • directory, located your files in it, and changed the • permissions to the correct values, you can view your • pages. To do so: • Open a browser • Type: http://students.depaul.edu/~name/ect250/main.html • This will bring up your 250 main page, that is, the • page called main.html in public_html/ect250/ • Example: http://condor.depaul.edu/~tsettle/ect250/resume.html

  21. Moving through directories • The important commands: • Move to a child directory: cd directory_name • Move up to a parent directory: cd .. • List files/directories in the current directory: ls • List files/directories with permissions: ls –l • Examples: Move up and down the directory • structure in public_html.

  22. Changing permissions • The important commands: • File access permissions: chmod 644 file_name • Directory access: chmod 755 directory_name • Example: Change the permissions on the files in • the public_html directory.

  23. More about access permissions • When deciding who can have access to a file, • UNIX recognizes three categories of users: • Owner: The owner of the file or directory • Group: Other users belonging to the owner’s • group • Public: All other users on the system

  24. Types of access • There are three things that can be done to a file: • Read: Examine (but do not change) the file • Write: Change the file • Execute: If the file contains a program, run • the program • There are also three things that can be done to a • directory: • Read: List the contents of the directory • Write: Change the directory by adding or • removing existing files • Execute: “Search” the directory using ls –l

  25. A permission listing Because there are three types of users with three types of access permission, each file/directory has associated with it 9 different settings. (It also has another setting that indicates whether it is a file or directory. What is that?) Example: A long listing of the ect250 directory.

  26. More about chmod • The chmod (change mode) command can use • the following notation: • u user (owner) of a file/directory • g group • o others (public) • + add a permission • - remove a permission • Examples: chmod o+r resume.html • chmod g-x resume.html

  27. Values associated with types • There are also values associated with each type • of access: • r  4 w  2 x  1 • The sum of these values gives a combination of • the permissions. • Examples: • 4 = r only • 6 = r and w but not x • 7 = r, w, and x

  28. Another way to use chmod • Typing chmod value file_name for certain values • changes the permission of the file. (It also works • for directories). • Examples: • chmod 644 main.html • chmod 755 public_html

  29. Renaming files • The important command: • Rename (move) a file: mv old_name new_name • Examples: • Change the name of resume.html to main.html • Make the name of the image file all lowercase

  30. Copying files • After submitting Web pages, you should not make • changes to them. Any changes should be made to • a copy of the page. • The important commands: • Create a new directory: mkdir directory_name • Copy a file: cp old_name new_name • Example: Copy the main page.

  31. Deleting files/directories • Use with caution! • The important commands: • Remove a file: rm file_name • Remove a directory: rmdir directory_name • Note that a directory must be empty to be • deleted using the above syntax.

  32. Using * with commands • The * may be used to match any string of text • when using a Unix command. • Examples: • chmod 644 *.html • rm *.* • cp ect250/* ect250bk/ • mv old_ect250/* new_ect250/

  33. Condensing commands • Several Unix commands can be condensed into • one command. • Examples: • cd public_html/ect250/ • cd ../../ • cp ctilogo.gif pictures/ctilogo.gif • mv main.html ../index.html

  34. Mistakes in relative paths • You need to be careful that the paths inserted for • relative pages are correct once you transfer them • to students.depaul.edu. • You have two choices if they are not: • Change the relative path in the file • (Use a text editor to modify the file) • Change the directory structure to match the path • (Use Unix commands to shuffle files/directories)

  35. An example • Links between the home and resume page. • Files were moved to condor.depaul.edu • When created: • info/home.htm • info/ctilogo.gif • After the transfer: • home.htm • ctilogo.gif

  36. Viewing files • To view a file, use the more command. • Syntax: more file_name • Move down one line: Use Return key. • Move down one page: Press the space bar. • Move up one page: Type Control-B. • Quit by pressing the q key. • View the resume page to check the path names.

  37. Text editing • To modify a file on students.depaul.edu, you need • to use a text editor. One of the simplest is pico. • A text editor is NOT the same thing as a word • processor. It does not allow you to control the • appearance of the text. • pico was developed at the University of Washington • for composing messages in the pine mail program. • The menu structure is similar to pine. • Syntax: pico file_name

  38. Commands in pico • Note that (^ is the Control button): • ^G: Get Help • ^X: Exit – Ends the pico session, saving the • text that has been modified or created. • ^O: Write Out – Saves your work to a file • without ending the session. • ^R: Read File – Copy a file into the buffer. • ^Y: Previous Page • ^V: Next Page • Move in the file using the arrow keys • Example: Path name in my home page.

  39. When to use pico Since we do not develop HTML directly in this course, you only want to use pico when you need to adjust the path name of hyperlinks, images, etc. Remember that the alternative is to adjust the directory structure in your account to match the path given in the hyperlink, image, etc. This involves moving files and moving/deleting files and directories.

  40. Unix help • If you have any questions about Unix commands • while you are doing the assignment, you should: • Check the online Unix reference at: • http://service.depaul.edu/dpo/support/unix/intro.html • Type man commandname • Check the ECT 250 FAQ • E-mail me to ask a question

  41. Unix references • Just Enough Unix, Andersen, McGraw Hill, 2000, • ISBN 0-07-230297-6. • Unix: The Textbook, Sarwar, Koretsky, and Sarwar, • Addison-Wesley, 2001, ISBN 0-201-61260-7.

More Related