You are on page 1of 8

PRACTICAL 1: ITEC/MODR 2925 http://oldtown.glendon.yorku.

ca/ (Moodle)

Prerequisites for this class: Itec/modr 2915


Due Jan 22, 2018 at midnight.

Glendon cloud computing & html5


Task: Answer the following questions, with the aid of class’ s Notes (class Moodle)
and if you wish, everyone’s friend, Mr. Google. You may write your answer directly on the given Word
or PDF file. In addition, please submit also additional WORD or PDF file(s) for your answer to the longer
questions with clickable links.

Having logged in our serve, web.glendon.yorku.ca, using “x2goclient”, or putty.exe, or MAC terminal
program, as yourself (lastname) to our server web.glendon.yorku.ca

Glendon cloud computing:

To synchronize (incremental copy) to the Directory Dropbox/ (www directory at server), login our server
web.glendon.yorku.ca using a GUI or a terminal program: (x2goclient or putty.exe) at:

SW download

To login our server: a video to help you at http://web.glendon.yorku.ca/~f2017/sw/videos/x2go_login_pprince.mp4

Your web server (host): web.glendon.yorku.ca (port 22)

username: lastname (small letters)

password: glGOOcloud

Having logged in, type passwd (press return) to change the password. Note that you do not see what you type (a
security feature).

*****************************************************************
To synchronize in the Glendon Cloud, type (at our server):
Pour synchroniser le Cloud Glendon liés à GoogleDrive, tapez:

glendonsync_start or gl_sync_start (first time/première fois seulement)


glendonsync or glsync (subsequent times/synchronisation suivante)
*****************************************************************

At server, your Web directory is /home/lastname/www which is a symbolic link to Google-


Drive/Dropbox/myweb

PAGE 1 OF 8
PRACTICAL 1: ITEC/MODR 2925 http://oldtown.glendon.yorku.ca/ (Moodle)

A. Command lines at server oldtown.glendon.yorku.ca

1. Suppose that you have just logged in our server. You know that you may login using a text-based
terminal (with putty.exe) or graphical terminal (lxterminal) or any GUI terminal. Can you explain
the difference between (putty-type) terminal session vs a GUI session?

A putty-type terminal session is also known as a terminal emulator, which allows it to run shells
and commands as well.

Having just logged in,you are in your HOME directory. Which command would you use to :

(a) display the content of this directory? : ls

(b) display your current working directory is: pwd

________________________________

(c) Put yourself next in your WEB directory. Which command do you use to do this?

cd www

2. I would like you now to make a directory named final in your WEB directory (See 3 above).
Which command do you use to do this? Change to the directory just created. What command
did you use to do this?

mkdir january
cd january

3. What are the contents of this directory? What command did you use to find out

ls

4. Now, change back to your home (login) directory. What command did you use?

cd

5. From the working directory in (4), give the command you need to do to put yourself to the
PATH (the new working directory /home/lastname/www/2925/practical1

PAGE 2 OF 8
PRACTICAL 1: ITEC/MODR 2925 http://oldtown.glendon.yorku.ca/ (Moodle)

B. URL & Images & Gallery & Scripting (PHP)

1. Suppose that you are in your HOME directory. Give the command that would put you in your
Web directory: cd www

2. Create a directory named temp in your Web directory. Which commands do you use?

mkdir temp

3. Make temp your current directory. What command(s) did you use?
cd temp

4. Give the URL of your temp directory above (in 3)

http://pprince.glendon.yorku.ca/~hermosa/temp

5. Within temp, create a directory named images. Make images your current directory. What
command(s) did you use?

mkdir images

cd images

pwd--- /home/lastname/www/temp/images

6. Watch the following video here

(http://web.glendon.yorku.ca/~f2017/2018/2925/hw1/image_analysis.mp4).

Could you repeat the steps described on the video? I logged in as user mcduff .
You will do the same but as user your_last_name

I could not watch the video because the web erver is down, and I could not access the link.
However, I was able to acces pprince.glendon.yorku.ca and answer the questions above and
below.

PAGE 3 OF 8
PRACTICAL 1: ITEC/MODR 2925 http://oldtown.glendon.yorku.ca/ (Moodle)

C. Some material review from Itec/MODR 2915

HTML stands for Hyper Text Markup Language, which is the most widely used language on
Web to develop web pages.

1. What is cloud computing?

Cloud computing is the on-demand provision of computational resources (data, software) via a
computer network, rather than from a local computer.

2. What does the program nano do at the server web.glendon.yorku.ca?


The program nano is an HTML text editor.

3. What is Responsive Web Design?


Responsive Web Design uses HTML and CSS to make web pages render well on all devices
(desktop, tablets, and phones).

4. Having logged in our serve, web.glendon.yorku.ca, using “putty.exe”, as user “max”, and having
“synchronized” to the Glendon cloud, please answer the following questions:
(MAC users do: FINDER  terminal  ssh -l yourlastname web.glendon.yorku.ca .)

(a) What is user max’s HOME directory:


User max’s home directory is /home/max

(b) To change the password, for user max, one may use the command ____________________
(press return)
One may use the command passwd (press return) to change the password. When you type
the password in, you do not see what you type (a security feature).

(c) What is the command to synchronize data in the cloud for the first time ever at our server?
And for subsequent times?
The command to synchronize data in the Glendon Cloud for the first time ever is
glendonsync_start or gl_sync_start. For subsequent times, the command is
glendonsync or glsync .

PAGE 4 OF 8
PRACTICAL 1: ITEC/MODR 2925 http://oldtown.glendon.yorku.ca/ (Moodle)

(d) Which directory reside your web pages at your Google-Drive if you were user max? and
what is its “shortcut” (or symbolic link) at our server web.glendon.yorku.ca? What is the
Glendon web address or URL for user max?
If I were user max, my web pages at my Google Drive would reside in home/max/www . Its
‘shortcut’ or symbolic link at our server web.glendon.yorku.ca is MyDrive > Dropbox >
myweb (max’s drive) . The Glendon web address or URL for user max is
web.glendon.yorku.ca/~max/

5. Give the result(s) from the commands, executed by user max, and in the exactly given order,
once he has just logged in to our server web.glendon.yorku.ca, using putty.exe:

pwd, cd www, mkdir gl2915, cd gl2915, mkdir photos, cd photos, pwd

What are the results?

First, Max displayed the current working directory, he then put himself in the WEB directory, he
then made a directory named gl2915, he then changed the directory to gl2915, he then made a
directory named photos, he then changed the directory to photos, and lastly he displayed the
current working directory. The result is:

/home/max/www/gl2915/photos

6. Now I want you to login as yourself (yourlastname) to our server


web.glendon.yorku.ca.

(a) Give the result(s) from the following commands, executed by YOU, and in the exactly given
order: pwd, cd www, mkdir gl2915, cd gl2915, mkdir myphotos, cd myphotos, pwd,
mkdir vactions, cd vacations

First, I displayed the current working directory, I then put myself in the WEB directory, I then
made a directory named gl2915, I then changed the directory to gl2915, I then made a directory
named photos, I then changed the directory to photos, I then displayed the current working
directory, I then created a directory named vacations, and lastly I changed the directory to
vacations. The result is:

home/hermosa/www/gl2915/myphotos/vacations

(b) What do you see now at:


http://web.glendon.yorku.ca/~lastname/gl2915/myphotos/vacations/

Put 5 photos of your favorite vacation at the URL in (b). How do you do that?

Check how they look on the web.

PAGE 5 OF 8
PRACTICAL 1: ITEC/MODR 2925 http://oldtown.glendon.yorku.ca/ (Moodle)

At http://web.glendon.yorku.ca/~hermosa/gl2915/myphotos/vacations/ , I see the title Index


of /~hermosa/gl2915/myphotos/vacations , a hyperlink back to the Parent Directory, and no
contents inside the directory .

To put 5 photos of my favourite vacation at


http://web.glendon.yorku.ca/~hermosa/gl2915/myphotos/vacations/ , I found my 5 photos
on my desktop. I then imported the photos in the vacations folder in dropbox. Lastly, I went into
the terminal in my mac and entered the command glendonsync to synchronize the data into
our server. The results are:
• http://pprince.glendon.yorku.ca/~hermosa/gl2915/myphotos/vacations/buddy_at_bea
ch.jpg
• http://pprince.glendon.yorku.ca/~hermosa/gl2915/myphotos/vacations/buddy_at_bea
ch.jpg
• http://pprince.glendon.yorku.ca/~hermosa/gl2915/myphotos/vacations/hannah%20at
%20beach.jpg
• http://pprince.glendon.yorku.ca/~hermosa/gl2915/myphotos/vacations/hermosa%20fa
mily.jpg
• http://pprince.glendon.yorku.ca/~hermosa/gl2915/myphotos/vacations/philippines_va
cation_2015.jpg

(c) Put yourself now in your home directory, /home/lastname

Give the commands you will use to put yourself into this PATH given below:

/home/lastname/www/gl2915/myphotos

Next, I want you to execute the following command:


fgallery vacations mygallery

To put myself into /home/lastname/www/gl2915/myphotos, first I put myself in the WEB


directory, then I put myself in the gl2915 directory, and lastly I put myself in the myphotos
directory. I used the following command (in order):

cd www cd gl2915 cd myphotos

PAGE 6 OF 8
PRACTICAL 1: ITEC/MODR 2925 http://oldtown.glendon.yorku.ca/ (Moodle)

(d) Then visit your site:


http://web.glendon.yorku.ca/~lastname/2018/2925/myphotos/mygallery
Do you see now anything new and interesting?

After executing the commands fgallery vacations mygallery , several files/content


downloaded unto a directory called mygallery
(/home/lastname/www/gl2915/myphotos/mygallery)
7.
(a) Download the file homework1.zip at:

http://web.glendon.yorku.ca/~f2017/2018/2925/review/homework1.zip

(a) Describe how you would display the content of the file homework1.zip at your own web
site to be seen at:

http://web.glendon.yorku.ca/~lastname/2018/2925/review/

In order to display the content of the file homework1.zip at my website at


http://pprince.glendon.yorku.ca/~lastname/2018/2925/review/ , I would first have to make the
directory 2925 and then the review directory. I would do this using the following commands (in
order):

cd www cd 2018 mkdir 2925 cd 2925 mkdir review cd review

I would then download the zip file unto my computer and drag in into the review folder in my
Dropbox.

I would then open the terminal, go back to the beginning directory, synchronize the data into
our server, go to the my gallery directory, unzip the file to extract homework1.zip, and lastly
change the directory to homework1. I would do this by using the following commands:

cd glsync cd www cd 2018 cd 2925 cd review unzip homework1.zip

The content of the file means the file homework1.zip has to be extracted.

(b) Next, visit

http://pprince.glendon.yorku.ca/~lastname/2018/2925/review/images/geek.png

PAGE 7 OF 8
PRACTICAL 1: ITEC/MODR 2925 http://oldtown.glendon.yorku.ca/ (Moodle)

I want you to replace this image by your own image, say you.png or you.jpg. Using an image
editor (say paint in windows or an equivalent program in MAC), make you.png to be the same
size as geek.png . Once you have done so, you will rename your image you.png to be geek.png .

In order to replace the geek.png image with my own image, first I imported the image in the home
folder in dropbox. I then synchronized the data into our server, opened up the nano to find my .png file,
changed its name to geek.png, and changed the size to 200% 200 px 200 px.I did this using the following
commands:

gl sync nano home.html gl sync

(c) Having done so (b), visit again:

http://pprince.glendon.yorku.ca/~lastname/2018/2925/review/home.html

What do you see now?

After replacing geek.png with my own image, now I see my own image that I imported at the top of my
webpage.

NOTES: (1) In your homework, when indicated, please make a clickable link to your own web site to
that I can quickly appreciate your working example at your own web site; (2) You will/may write the
answers directory onto this PDF file * and * also make your PDF with clickable links, for submission.

Link to my webpage:

http://pprince.glendon.yorku.ca/~hermosa/

PAGE 8 OF 8

You might also like