putty WindowUploading your web site to Unix

putty and psftp

When you first get your account, log on using putty.  If you don't have it on your machine, download it; it's small.  Also download psftp.  Put them anywhere; desktop is fine.

When you go in with putty -- do this first -- you'll need to tell it you want SSH protocol; what machine you want; and you'd do well to save that configuration now and then load, so you won't have to type it in again.

You may get a message saying "I don't recognize this host!"; just continue.

Changing your password

Do this before going further.  The command is passwd.

Making your web site

Your web site will be in your folder (the one you get to just by logging in), in the public_html folder.  To find out if it's there, type ls.  To create it, type

mkdir public_html

Uploading your web site

(First:  note that Unix cares about capitalization, whereas Windows does not.  Be sure the case you use for filenames and for the database you have in MySQL is consistent with what your PHP, CSS, and HTML files expect.)

Now you'll need psftp.  Run it, and type

open mintaka                                # connect to the remote machine
cd public_html                              # go into your web folder on the remote machine
lcd  /Users/YourName/Desktop/MyHomework12   # go into your homework folder on the PC
mput *                                      # upload all the files

Restoring your database

This is the same as in earlier notes, but:

mysql -u root -D yourDatabase < yourDatabase.sql

I'm assuming you put yourDatabase.sql in the files you uploaded.

Seeing it work

Now, in your web browser, go to http://cs.mintaka.edu/~yourName/