se101 foundations of software engineering iwalt/se101/slides/how_to... · · 2013-10-09windows...
TRANSCRIPT
• review underlying technologies
• ssh, NFS, X11, Eclipse, git
• how they all fit together
• how to use them
• here, at home
• disclaimer: I'm intentionally skipping some of the details
Tuesday, October 8, 13
ssh
• "secure shell"
• replaced telnet and rsh
• used to login to remote unix boxes
Tuesday, October 8, 13
$ ssh [user@]host
"[user]" means it's optional; you can leave off "user" if it's the same on both boxes
$ ssh tux.cs.drexel.edu
$ ssh [email protected]
Tuesday, October 8, 13
Linux• open a terminal windowOS X• open a terminal window (pref. under
XQuartz)Windows• putty
Running ssh
Tuesday, October 8, 13
NFS
• A way to "mount" files over a network
• like windows drive letters, but more integrated
• Why do you care?
• same homedir on any CS workstation
Tuesday, October 8, 13
X Windows
• Also called "X" and "X11"
• Common on Unix systems (except OS X)
• Needs to be installed separately on Windows and OS X
Tuesday, October 8, 13
X Windows
• client-server (but "reversed)
• windows from remote apps appear on local workstation
• can run Eclipse remotely
Tuesday, October 8, 13
X11 + ssh
To run Eclipse (or any other X11 app) remotely from tux, you need 2 things:1. an X server2. run ssh with "X forwarding" (also
known as "running X over an ssh tunnel")
Tuesday, October 8, 13
Remote X11 from Linux
1. you're already running X2. ssh -X tux.cs.drexel.edu3. eclipse&
Tuesday, October 8, 13
Remote X11 from OS X1. Install XQuartz
http://xquartz.macosforge.org2. Run XQuartz3. Open a terminal (might happen
automatically)4. ssh -X tux.cs.drexel.edu5. eclipse&
Tuesday, October 8, 13
Drexel University Software Engineering Research Grouphttp://serg.cs.drexel.edu 10
Accessing tux off campus
• For Windows, download:• Putty: http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
• Putty is an SSH client used to connect to tux
• Xming: http://www.straightrunning.com/XmingNotes/
• Xming is an X server used for Eclipse
Tuesday, October 8, 13
Drexel University Software Engineering Research Grouphttp://serg.cs.drexel.edu
Accessing tux off campus
• Start putty and type tux.cs.drexel.edu for the host name
• Under Connection – SSH – X11 check “Enable X11 Forwarding”
• Click Open
11
Tuesday, October 8, 13
Drexel University Software Engineering Research Grouphttp://serg.cs.drexel.edu
What is Git?
Git is a distributed version control system enabling you to:•Easily track the changes you make to your code
•Easily collaborate with others when you write code
Useful links:•Git: http://git-scm.com/
•Wikibooks: http://en.wikibooks.org/wiki/Git/Introduction
3
Tuesday, October 8, 13
Drexel University Software Engineering Research Grouphttp://serg.cs.drexel.edu
Git repository hierarchy
15
***Remember to use push and pull commandsto keep working copies synchronized***
Tuesday, October 8, 13
Drexel University Software Engineering Research Grouphttp://serg.cs.drexel.edu
Git workflow• Every time you create a new file or change and existing file you
have to use four commands:
• git pull: make sure your working copy is up to date before doing work to avoid conflicts
• git add: to add the files you created / changed
• git commit –m "message": to commit the changes to your cloned repository
• git push: to push the changes to the master
• Always remember to check the status to make sure your changes are committed
10
Tuesday, October 8, 13
Drexel University Software Engineering Research Grouphttp://serg.cs.drexel.edu
Working off campus (Ubuntu)
12
Install Git if you don’t have it yet:
$ sudo apt-get install git
Change to the directory you want to clone to
$ cd whatever_path_you_want
Remember, this is your computer, so you can put this wherever you want. Somewhere in your home folder would make sense, like ~/se101/
Clone the master:
$ clone [email protected]:~/se101/git/se101.git workspace
** Always remember to “git pull” to avoid conflicts **
Tuesday, October 8, 13
Drexel University Software Engineering Research Grouphttp://serg.cs.drexel.edu
Working off campus (OSX)
14
• Install Git if you don’t have it yet: http://git-scm.com/download
• Start a new terminal window (Apple-Space and then type Terminal)
• You will be in your /users/userid folder on your computer. It would make sense to change to your documents folder
$ cd Documents
• Now, you can follow the Unix instructions (skipping the installation step)
Tuesday, October 8, 13
Drexel University Software Engineering Research Grouphttp://serg.cs.drexel.edu
Working off campus (Windows)
13
• Install Git if you don’t have it yet: http://git-scm.com/download
• Make sure you choose: checkout as-is and commit unix-style during install.
• Now run Git Bash from your start menu and you have a bash shell you can work in.
• By default, you will be in your /c/User/Username folder. Changing to your My Documents folder would be prudent:
$ cd Documents
• Now, you can follow the Unix instructions (skipping the installation step)
Tuesday, October 8, 13
Working off-campus (Windows)
Git Extensions (http://code.google.com/p/gitextensions/)
Tuesday, October 8, 13