+ All Categories
Home > Documents > CIS 191 – Lesson 7

CIS 191 – Lesson 7

Date post: 06-Jan-2016
Category:
Upload: rianna
View: 27 times
Download: 0 times
Share this document with a friend
Description:
CIS 191 – Lesson 7. Lesson Module Status Slides – done Properties - done Flash cards Lessons 4-7 - No-stress quiz – done Web Calendar summary – done Web book pages – Commands – Howtos – Skills pacing - Lab – done Final Preparation (Test, Trouble, Build) - done - PowerPoint PPT Presentation
Popular Tags:
71
CIS 191 – Lesson 7 Lesson Module Status • Slides – done • Properties - done • Flash cards Lessons 4-7 - • No-stress quiz – done • Web Calendar summary – done • Web book pages – • Commands – • Howtos – • Skills pacing - • Lab – done • Final Preparation (Test, Trouble, Build) - done • Class & lab ISOS debian-40r4a-i386-DVD-1.iso (for class exercise) CentOS-5.0-i386-bin-DVD.iso (for Lab 5) xampp-linux-1.6.8a.tar.gz (final) diagboot.img (final) Fedora 8 (Lab 4) • Class VMs Star – for X demonstration and Lab 5 Trouble (Final and XC) Duke (Lab 4) Dutch (Class exercise – Instructor station only)
Transcript
Page 1: CIS 191 – Lesson 7

CIS 191 – Lesson 7

Lesson Module Status• Slides – done• Properties - done• Flash cards Lessons 4-7 -• No-stress quiz – done • Web Calendar summary – done• Web book pages – • Commands –• Howtos – • Skills pacing -• Lab – done• Final Preparation (Test, Trouble, Build) - done • Class & lab ISOS

• debian-40r4a-i386-DVD-1.iso (for class exercise)• CentOS-5.0-i386-bin-DVD.iso (for Lab 5)• xampp-linux-1.6.8a.tar.gz (final)• diagboot.img (final)• Fedora 8 (Lab 4)

• Class VMs • Star – for X demonstration and Lab 5• Trouble (Final and XC)• Duke (Lab 4)• Dutch (Class exercise – Instructor station only)

Page 2: CIS 191 – Lesson 7

CIS 191 - Lesson 7

Quiz

Please close your books, turn off your monitor, take out a blank piece of paper and answer the following questions:

•True or False? - Package managers like RPM check for dependencies.

•Which compression tool is faster, gzip or bzip2?

•What command would install the VMwareTools-1.0.5-80187.i386.rpm package?

Page 3: CIS 191 – Lesson 7

CIS 191 – Lesson 7

Objectives Agenda

• Hour 1 - Debian Installation• Hour 2 - Network• Hour 3 – X Windows• Hour 4 – Lab 5 and Final preparation• Lab Time

• Quiz

• Questions from last week

• The Networking Layer

• Understanding X

• Debian Install

• Wrap up

= hands on exercise for topic

X Windows

Page 4: CIS 191 – Lesson 7

CIS 191A

Lesson 1

VMware ServerUbuntu 8.04

Lesson 2

PartitioningMake file systemsRH9

Lesson 3

BootingDual bootFedora 9/DOS

Lesson 6

RPM, apt-getTarballs

Lesson 5

TroubleshootingCentOS Install

Lesson 4

RootingopenSUSE 11

Lesson 7

X windowsDebian InstallReview

Final

Course Skills Pacing

Page 5: CIS 191 – Lesson 7

CIS 191 - Lesson 7

Last weeks Assignment

• Questions on previous material or assignments?

Page 6: CIS 191 – Lesson 7

CIS 191 - Lesson 7

Debian

Page 7: CIS 191 – Lesson 7

CIS 191 - Lesson 7

Debian GNU/Linux

• Debra and Ian Murdock

• "Social Contract" with the Free Software Community1. Debian will remain 100% free2. We will give back to the free software community3. We will not hide problems4. Our priorities are our users and free software5. Works that do not meet our free software standards

•APT package management system

•Ubuntu, Damn Small Linux, Knoppix many others based on

Debian

•buzz, rex, bo, hamm, slink, potato, woody, sarge, etch

releases

Page 8: CIS 191 – Lesson 7

CIS 191 - Lesson 7

Debian GNU/LinuxInstallation

TUI based Installation

Page 9: CIS 191 – Lesson 7

CIS 191 - Lesson 7

Debian GNU/LinuxAPT Package Manager

Adding chess program

Page 10: CIS 191 – Lesson 7

CIS 191 - Lesson 7

Debian GNU/LinuxAPT Package Manager

Removing chess program

Page 11: CIS 191 – Lesson 7

CIS 191 - Lesson 7

DebianInstall

Page 12: CIS 191 – Lesson 7

CIS 191 - Lesson 7

Exercise: Debian installation

1. Install Debian 4.0

• debian-40r4a-i386-DVD-1.iso• Create a VM named dutch with 5 GB hard drive• Install Debian any way you want on the VM• Use APT to install the chess program

• apt-get install gnuchess

Page 13: CIS 191 – Lesson 7

CIS 191 - Lesson 7

NetworkingLayer

Page 14: CIS 191 – Lesson 7

CIS 191 - Lesson 7

Networking LayerTCP/IP Configuration

• IP Addresses • Netmask • Gateway • Name Server

Page 15: CIS 191 – Lesson 7

CIS 191 - Lesson 7

Networking LayerNetwork Files

• /etc/hosts - Contains host name/ip-address pairs

• /etc/resolv.conf - Contains DNS name server

• /etc/sysconfig/network - Contains host name and default gateway

• /etc/sysconfig/network-scripts/ifcfg-eth0 - Contains IP address and network mask

Note: To make permanent network configuration changes, modify these files then restart the network. For Red Hat use:

service network restart

Page 16: CIS 191 – Lesson 7

CIS 191 - Lesson 7

Networking LayerNetwork Files

/etc/hosts - Contains host name/ip-address pairs

[root@star ~]# cat /etc/hosts# Do not remove the following line, or various programs# that require network functionality will fail.127.0.0.1 star.localdomain star localhost.localdomain localhost::1 localhost6.localdomain6 localhost6[root@star ~]#

Page 17: CIS 191 – Lesson 7

CIS 191 - Lesson 7

Networking LayerNetwork Files

/etc/resolv.conf - Contains DNS name server

[root@star ~]# cat /etc/resolv.confnameserver 192.168.0.1[root@star ~]#

Page 18: CIS 191 – Lesson 7

CIS 191 - Lesson 7

Networking LayerNetwork Files

• /etc/sysconfig/network - Contains host name and default gateway

Example gateway configuration:Edit /etc/sysconfig/networkTo look like:

NETWORKING=yesHOSTNAME=station01.mordor.rivendell.middleearthGATEWAY=172.24.1.100

Page 19: CIS 191 – Lesson 7

CIS 191 - Lesson 7

Networking LayerNetwork Files

/etc/sysconfig/network-scripts/ifcfg-eth0 - Contains IP address and network mask

Example DHCP IP configuration:Edit /etc/sysconfig/network-scripts/ifcfg-eth0To look like:

DEVICE=eth0BOOTPROTO=dhcpHWADDR=00:0C:29:22:F2:91ONBOOT=yesDHCP_HOSTNAME=star.localdomain

Page 20: CIS 191 – Lesson 7

CIS 191 - Lesson 7

Networking LayerNetwork Files

/etc/sysconfig/network-scripts/ifcfg-eth1 - Contains IP address and network mask

Example static IP configuration:Edit /etc/sysconfig/network-scripts/ifcfg-eth1To look like:

DEVICE=eth1BOOTPROTO=staticBROADCAST=192.168.0.255HWADDR=00:0C:29:22:F2:9BIPADDR=192.168.0.50IPV6ADDR=IPV6PREFIX=NETMASK=255.255.255.0NETWORK=192.168.0.0ONBOOT=yes

Page 21: CIS 191 – Lesson 7

CIS 191 - Lesson 7

Networking LayerNetwork commands

• ping ip-address - tests network connectivity.

• ifconfig - sets or displays network parameters.

• netconfig - configures the host network.

• ftp ip-address - file transfer protocol.

• ssh -l login_name [hostname] [command]• scp login@hostname:sourcefile login@hostname:sourcefile

- remote secure copy.

Page 22: CIS 191 – Lesson 7

CIS 191 - Lesson 7

Networking LayerNetwork commands

• ping ip-address - tests network connectivity.

[root@star ~]# ping 192.168.0.1PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.64 bytes from 192.168.0.1: icmp_seq=1 ttl=254 time=8.44 ms64 bytes from 192.168.0.1: icmp_seq=2 ttl=254 time=2.93 ms64 bytes from 192.168.0.1: icmp_seq=3 ttl=254 time=2.89 ms64 bytes from 192.168.0.1: icmp_seq=4 ttl=254 time=2.83 ms

--- 192.168.0.1 ping statistics ---4 packets transmitted, 4 received, 0% packet loss, time 3001msrtt min/avg/max/mdev = 2.830/4.275/8.441/2.406 msYou have new mail in /var/spool/mail/root[root@star ~]#

Note: Used Ctrl-C to end pinging

Page 23: CIS 191 – Lesson 7

CIS 191 - Lesson 7

Networking LayerNetwork commands

• ifconfig - sets or displays network parameters.

[root@star ~]# ifconfigeth0 Link encap:Ethernet HWaddr 00:0C:29:22:F2:91 inet addr:192.168.0.25 Bcast:192.168.0.255 Mask:255.255.255.0 inet6 addr: fe80::20c:29ff:fe22:f291/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:27512 errors:0 dropped:0 overruns:0 frame:0 TX packets:23667 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:3439418 (3.2 MiB) TX bytes:2180665 (2.0 MiB) Interrupt:185 Base address:0x1400

lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:35927 errors:0 dropped:0 overruns:0 frame:0 TX packets:35927 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:2443383 (2.3 MiB) TX bytes:2443383 (2.3 MiB)

[root@star ~]#

Page 24: CIS 191 – Lesson 7

CIS 191 - Lesson 7

Networking LayerNetwork commands

• netconfig - configures the host network.

Page 25: CIS 191 – Lesson 7

CIS 191 - Lesson 7

Networking LayerNetwork commands

• ftp ip-address - file transfer protocol.

[root@star ~]# ftp 192.168.0.42Connected to 192.168.0.42.220 (vsFTPd 2.0.5)530 Please login with USER and PASS.KERBEROS_V4 rejected as an authentication typeName (192.168.0.42:root): cis191331 Please specify the password.Password:230 Login successful.Remote system type is UNIX.Using binary mode to transfer files.ftp> ls227 Entering Passive Mode (192,168,0,42,195,109)150 Here comes the directory listing.drwxr-xr-x 2 1000 1000 1024 Aug 22 15:18 Desktop-rw------- 1 1000 1000 1923179 Oct 06 08:18 lab4.simmsmar226 Directory send OK.ftp> mget *mget Desktop? nmget lab4.simmsmar? y227 Entering Passive Mode (192,168,0,42,103,188)150 Opening BINARY mode data connection for lab4.simmsmar (1923179 bytes).226 File send OK.1923179 bytes received in 0.44 seconds (4.3e+03 Kbytes/s)ftp> bye221 Goodbye.[root@star ~]#

Page 26: CIS 191 – Lesson 7

CIS 191 - Lesson 7

X

Page 27: CIS 191 – Lesson 7

CIS 191 - Lesson 7

Understanding XOverview

• One of the original open source projects • Developed at MIT • Criticisms of X• Handles fonts poorly • Security issues• Overly complex

• Recent improvements to XFree86

Page 28: CIS 191 – Lesson 7

CIS 191 - Lesson 7

Understanding XOverview

X server

Local X clients

Remote X clients

Network

X clients are programs with a graphical user interface:

• xeyes• xlogo• firefox• gimp• etc.

User's System

Page 29: CIS 191 – Lesson 7

CIS 191 - Lesson 7

Understanding XThe Components of X

• Server Component• most important component • controls input devices • controls video hardware • VGA and hardware specific servers

• Client Component• clients are what the user sees • window manager provides access to individual clients

and windows e.g. metacity, mwm, twm, sawfish, enlightenment ... • file manager - client that acts as a graphical shell

allowing access to the file system • desktop manager - provides login sessions,

authentication, and taskbar support

Page 30: CIS 191 – Lesson 7

CIS 191 - Lesson 7

Understanding XUnderstanding the XF86config File

• General Format of the File: 1. File Section 2. Keyboard Section 3. Pointer Section 4. Monitor Section 5. Graphics Device Section 6. Screen Section

• Testing the Configuration

Page 31: CIS 191 – Lesson 7

• startx shell script – starts up your GUI desktop

• x, xinit commands

• xdm command• can be run only by root • usually used in startup scripts • shows graphical logon screen

CIS 191 - Lesson 7

Understanding XStarting an X Window Session

xinit (bare bones X server and xterm)x (bare bones X server)

Page 32: CIS 191 – Lesson 7

CIS 191 - Lesson 7

Understanding XWindow Managers – widgets level (look and feel)

• AfterStep• Enlightenment• Fvwm95• IceWM• Sawfish• Window Maker• mwm• twm

twm (Tom's Window Manager)

Page 33: CIS 191 – Lesson 7

CIS 191 - Lesson 7

Understanding XWindow Managers – widgets level (look and feel)

• AfterStep• Enlightenment• Fvwm95• IceWM• Sawfish• Window Maker• mwm• twm

mwm (Motif Window Manager)

Page 34: CIS 191 – Lesson 7

CIS 191 - Lesson 7

Understanding XDesktop Environments

Mandriva with KDE

Debian with Gnome

Page 35: CIS 191 – Lesson 7

CIS 191 - Lesson 7

Understanding XGUI File Managers

• File Manager Features• Accomplish same tasks as shell without

lengthy commands• Have drag and drop support

• Midnight Commander• Nautilus

• Easy to use visual file manager• Use mouse to eliminate excessive key

strokes • File Managers on KDE

• KFM• Konqueror

Page 36: CIS 191 – Lesson 7

CIS 191 - Lesson 7

Understanding X

Observe how many hidden files there are now for a fresh account that has never run the gnome desktop yet.

Page 37: CIS 191 – Lesson 7

CIS 191 - Lesson 7

Understanding X

TypeX (a capital X)to run the X server

Page 38: CIS 191 – Lesson 7

CIS 191 - Lesson 7

Understanding X

To end, typeCtrl-Alt-BS keys at the same time

Page 39: CIS 191 – Lesson 7

CIS 191 - Lesson 7

Understanding X

After exiting X you will see all the messages written to tty1.

Page 40: CIS 191 – Lesson 7

CIS 191 - Lesson 7

Understanding X

Type xinit to run the X server and an xterm terminal

Page 41: CIS 191 – Lesson 7

CIS 191 - Lesson 7

Understanding X

To end, typeexit

Page 42: CIS 191 – Lesson 7

CIS 191 - Lesson 7

Understanding X

After exiting X you will see all the messages written to tty1.

Page 43: CIS 191 – Lesson 7

CIS 191 - Lesson 7

Understanding X

To start the full desktop, typestartx

Page 44: CIS 191 – Lesson 7

CIS 191 - Lesson 7

Understanding X

Look familiar?

Page 45: CIS 191 – Lesson 7

CIS 191 - Lesson 7

Understanding X

ps –u cis191 shows that thee are a lot more processes used now that with the earlier xinit example

Log out to end

Page 46: CIS 191 – Lesson 7

CIS 191 - Lesson 7

Understanding X

After exiting X you will see all the messages written to tty1.

Page 47: CIS 191 – Lesson 7

CIS 191 - Lesson 7

Understanding X

There are quite a few new hidden files and hidden directories now

Page 48: CIS 191 – Lesson 7

CIS 191 - Lesson 7

Understanding X

Copy the system xinitrc file to the home directory.

cp /etc/X11/xinit/xinitrc .xinitrc

Make it a hidden file.

Page 49: CIS 191 – Lesson 7

CIS 191 - Lesson 7

Understanding X

Enter the xinit command again

Page 50: CIS 191 – Lesson 7

CIS 191 - Lesson 7

Understanding X

Look familiar?

Page 51: CIS 191 – Lesson 7

CIS 191 - Lesson 7

Understanding X

Create a file named .Xclients and add:

xclock -geometry 100x100-5+5 &exec xterm -geometry 80x24+50+150

Give the file execute permissions then enter

xinit

Page 52: CIS 191 – Lesson 7

CIS 191 - Lesson 7

Understanding X

You have just started to create your own personal desktop

Page 53: CIS 191 – Lesson 7

CIS 191 - Lesson 7

Understanding X

Page 54: CIS 191 – Lesson 7

CIS 191 - Lesson 7

Understanding X

Note &'s to run xclock and xterm in the background. Also note there is only one exec command and that is at the end

Edit .Xclients to be:

xclock -geometry 100x100-5+5 &xterm -geometry 80x24+50+150 &exec twm

Page 55: CIS 191 – Lesson 7

CIS 191 - Lesson 7

Understanding X

TWM is Tom's Window Manager (Tom LaStrange)

Page 56: CIS 191 – Lesson 7

CIS 191 - Lesson 7

Understanding X

Now run firefox

Page 57: CIS 191 – Lesson 7

CIS 191 - Lesson 7

Understanding X

Position the frame for the Firefox window

Page 58: CIS 191 – Lesson 7

CIS 191 - Lesson 7

Understanding X

Enter the xinit command again

Page 59: CIS 191 – Lesson 7

CIS 191 - Lesson 7

One last X example

[cis191@star ~]$ cat .Xclientsxclock -geometry 100x100-5+5 &xterm -geometry 80x24+50+150 &xkbwatch -geometry 100x100+50+5 &xlogo -geometry 80x80+600+480 &xsetroot -solid "azure2"exec twm[cis191@star ~]$

Page 60: CIS 191 – Lesson 7

CIS 191 - Lesson 7

One last X example

To close windows or exit using Tom's Window Manager, left click and hold on the background to get a pop-up menu, then select choice.

Page 61: CIS 191 – Lesson 7

CIS 191 - Lesson 7

Xover

Network

Page 62: CIS 191 – Lesson 7

CIS 191 - Lesson 7

X over the NetworkClient – Server model (just reversed)

We will use Duke's X server to serve up a graphical display from a program running on Star.

StarDuke

localremote

The xclient runs hereThe xclient graphical output is displayed here using the local X server

Normally we refer to the remote computer running an application as the "server". It is the reverse with X.

Page 63: CIS 191 – Lesson 7

CIS 191 - Lesson 7

ssh remote login with –X option

Note: the processes running on Star before and after the remote ssh login

Note: Using the –X option on ssh command to log into Star

Page 64: CIS 191 – Lesson 7

CIS 191 - Lesson 7

Note: xeyes process running on Star

Note: xeyes graphical output is displayed on Duke

Using X to run xeyes client program remotely

Page 65: CIS 191 – Lesson 7

CIS 191 - Lesson 7

Using X to run firefox client program remotely

Note: xfirefox processes running on Star

Note: firefox graphical output is displayed on Duke

Page 66: CIS 191 – Lesson 7

CIS 191 - Lesson 7

X over the NetworkClient – Server model (just reversed)

We will use Duke's X server to serve up a graphical display from a program running on a Windows PC

StarWindowsVistaPC

localremote

The xclient runs hereThe xclient graphical output is displayed here using the local X server (cygwin)

Normally we refer to the remote computer running an application as the "server". It is the reverse with X.

Page 67: CIS 191 – Lesson 7

CIS 191 - Lesson 7

Using X with Microsoft Windows PC

2) Connect to Star (CentOS) with:ssh –X [email protected] run xeyes and xclock

1) Run Cygwin Bash Shell and enter:startx

Page 68: CIS 191 – Lesson 7

CIS 191 - Lesson 7

New X commands:redhat-config-xfree86 - configures X server on RedHatstartx - runs the graphics desktopX - starts X serverxinit - starts X server and xterm terminalxhost - grants remote X-client access to serverxwd, xwud - create and view window dumps

New X Files and Directories:/etc/X11/XF86Config/etc/X11/xinit/xinitrc and $HOME/.xinitrc/etc/X11/xinit/Xclients$HOME/.xauthority

New network commandsdhclient - request DHCP addresshostname - Show and set name of the systemifconfig - show current TCP/IP configurationping - Test connectivity to other hostsssh - runs secure login shell on remote systemscp - remote secure copyftp, telnet, rsh - Unsecure remote access commandswall, write, talk - local communication

New network related files/etc/sysconfig/network - hostname/etc/resolv.conf - DNS servers/etc/hosts - manual host and IP mappings

Page 69: CIS 191 – Lesson 7

CIS 191 – Lesson 7

Next Class

Assignment: Check Calendar Page on web site to see what is due next week.

http://simms-teach.com/cis191ABcalendar.php

Page 70: CIS 191 – Lesson 7

CIS 191 – Lesson 7

Backup

Page 71: CIS 191 – Lesson 7

CIS 191 - Lesson 7

Understanding XConfiguring X

• Vital part of any Linux Installation• XF86Setup • xf86config • redhat-config-xfree86 (RedHat)

• Gathering Hardware Information• Monitor • Video card • Mouse • Keyboard


Recommended