Lab Questions

 < Day Day Up > 



Lab 1

1. 

You want to upgrade the video card in your Linux system. Your old video card is slow and doesn't have enough display memory to provide you with the resolution and color depth you require. You have obtained a new ATI 32MB Radeon card (I'm using this product for example purposes only). What steps might you follow to replace your old card with your new card?

 lab 1 a. before you stop linux on your computer, you should configure it so it no longer attempts to start the x server when linux boots. this is controlled by the initdefault line in the /etc/inittab file. edit this file and change the second field from 5 (multi-user with x support) to 3 (multi-user with no x support). you could use vi, pico, or any other suitable text editor to do this job. b. perform an orderly shutdown on your system at a safe time. use the shutdown -h now command. c. now that the system is off, replace your video card. d. start your computer and boot into rhel 3. during the boot process, the red hat kudzu command automatically probes for new hardware. if this probe finds your new video card, you can configure it when prompted. e. if kudzu fails to find your new hardware, you should log in as root and run the red hat display settings tool. f. the red hat display settings tool should correctly identify your new hardware. you should select the correct amount of display memory (32mb) and the graphics resolutions and color depths you desire. if it does not, you can configure it manually using the available settings. g. test the result. run the startx or init 5 command to start the linux gui.

Answers

1. 

Lab 1

  1. Before you stop Linux on your computer, you should configure it so it no longer attempts to start the X Server when Linux boots. This is controlled by the initdefault line in the /etc/inittab file. Edit this file and change the second field from 5 (Multi-User With X Support) to 3 (Multi-User With No X Support). You could use vi, pico, or any other suitable text editor to do this job.

  2. Perform an orderly shutdown on your system at a safe time. Use the shutdown -h now command.

  3. Now that the system is off, replace your video card.

  4. Start your computer and boot into RHEL 3. During the boot process, the Red Hat kudzu command automatically probes for new hardware. If this probe finds your new video card, you can configure it when prompted.

  5. If kudzu fails to find your new hardware, you should log in as root and run the Red Hat Display Settings tool.

  6. The Red Hat Display Settings tool should correctly identify your new hardware. You should select the correct amount of display memory (32MB) and the graphics resolutions and color depths you desire. If it does not, you can configure it manually using the available settings.

  7. Test the result. Run the startx or init 5 command to start the Linux GUI.

Lab 2

2. 

You want to see what happens when there are problems starting the Linux GUI. With RHEL 3, the XFree86 Version 4.x server is configured by default. The configuration of the X Server is stored in the /etc/X11/XF86Config configuration file. Before Linux starts the X Server, it reads this file. To do so, you'll want to back up your current /etc/X11/XF86Config file, delete it, and then reboot your computer into runlevel 5. You can restore it after the lab is complete.

 lab 2 a. back up /etc/x11/xf86config to a safe location such as your home directory. b. as the root user, delete or rename the /etc/x11/xf86config file. c. open /etc/inittab in your favorite text editor. look at the line with initdefault. change the number right before this variable from a 3 to a 5 if required. d. when you reboot your computer, observe what happens when linux tries to find the default login display manager. e. restore your original settings. if you are interested in more experiments, try deactivating the x font server. run the chkconfig xfs off command. change your initdefault in /etc/inittab from 3 to 5 again. restart your computer and observe what happens.

Answers

2. 

Lab 2

  1. Back up /etc/X11/XF86Config to a safe location such as your home directory.

  2. As the root user, delete or rename the /etc/X11/XF86Config file.

  3. Open /etc/inittab in your favorite text editor. Look at the line with initdefault. Change the number right before this variable from a 3 to a 5 if required.

  4. When you reboot your computer, observe what happens when Linux tries to find the default login display manager.

  5. Restore your original settings.

If you are interested in more experiments, try deactivating the X Font Server. Run the chkconfig xfs off command. Change your initdefault in /etc/inittab from 3 to 5 again. Restart your computer and observe what happens.

Lab 3

3. 

For this lab, you'll need two Linux computers connected over a network. You'll need a shared NFS directory from the local computer. You can use the same directory that you may have used in Chapter 2 to share the RHEL 3 installation files. Start a Secure Shell connection between the two computers. Start the GUI on the local computer, and use the Secure Shell to log in remotely to the other computer. Finally, set and export an appropriate DISPLAY variable. You can then see what happens when you start X Clients from the remote computer.

Once you do, run the Red Hat root password program from the remote computer. Make changes to the password. When you log out and try to log back into the remote computer, you should be able to confirm that the root password on the remote computer has changed.

 lab 3 for this lab, you ll need two linux computers connected over a network. you ll need a shared nfs directory from the local computer. you can use the same directory that you may have used in chapter 2 to share the rhel 3 installation files. you ll start a secure shell connection between the two computers. you ll start the gui on the local computer, and use the secure shell to log in remotely to the other computer. finally, you ll set and export an appropriate display variable. you can then see what happens when you start x clients from the remote computer. once you do, run the red hat gui firewall program from the remote computer. make changes to the firewall, and see what happens. finally, a. on the local computer, start the gui. if you re currently at the text interface, you can do so with the startx command. b. open a command line interface. assuming you re using the default gnome desktop, right-click on the desktop and click new terminal in the pop-up menu that appears. c. in the new terminal, confirm any currently exported directories with the showmount -e command. based on /etc/exports, select a directory that is set as writable. use the techniques described in chapter 9 if required to make it so. you ll be connecting back to one of these directories from your remote computer. d. authorize access from the remote computer. for example, if you re connecting to a computer named desktop2, run the following command (you can substitute the ip address): # xhost +desktop2 e. connect to the remote computer using the secure shell. assuming the remote computer is named desktop2, run the following command: # ssh root@desktop2 (if you have a problem making the connection, you may need to go to the remote computer and activate the secure shell service with the service sshd start command. you can also substitute the ip address for the computer name.) a. enter the root password on the remote computer when prompted. b. set and export the display variable on the remote computer. make sure it points to the local computer. if the local computer is named desktop1, you would use the following command: # export display=desktop1:0.0 c. now try running the redhat-config-rootpassword command. if successful, you ll be changing the root password on the remote computer. d. log out of the remote computer. log back in using the ssh command from step 5. did the root password change? e. restore the original root password on the remote computer. reset the display variable on the remote computer with the following command: # export display=localhost:0.0

Answers

3. 

Lab 3

For this lab, you'll need two Linux computers connected over a network. You'll need a shared NFS directory from the local computer. You can use the same directory that you may have used in Chapter 2 to share the RHEL 3 installation files. You'll start a Secure Shell connection between the two computers. You'll start the GUI on the local computer, and use the Secure Shell to log in remotely to the other computer. Finally, you'll set and export an appropriate DISPLAY variable. You can then see what happens when you start X Clients from the remote computer.

Once you do, run the Red Hat GUI firewall program from the remote computer. Make changes to the firewall, and see what happens. Finally,

  1. On the local computer, start the GUI. If you're currently at the text interface, you can do so with the startx command.

  2. Open a command line interface. Assuming you're using the default GNOME desktop, right-click on the desktop and click New Terminal in the pop-up menu that appears.

  3. In the new terminal, confirm any currently exported directories with the showmount -e command. Based on /etc/exports, select a directory that is set as writable. Use the techniques described in Chapter 9 if required to make it so. You'll be connecting back to one of these directories from your remote computer.

  4. Authorize access from the remote computer. For example, if you're connecting to a computer named desktop2, run the following command (you can substitute the IP address):

    # xhost +desktop2
  5. Connect to the remote computer using the Secure Shell. Assuming the remote computer is named desktop2, run the following command:

    # ssh root@desktop2

(If you have a problem making the connection, you may need to go to the remote computer and activate the Secure Shell service with the service sshd start command. You can also substitute the IP address for the computer name.)

  1. Enter the root password on the remote computer when prompted.

  2. Set and export the DISPLAY variable on the remote computer. Make sure it points to the local computer. If the local computer is named desktop1, you would use the following command:

    # export DISPLAY=desktop1:0.0
  3. Now try running the redhat-config-rootpassword command. If successful, you'll be changing the root password on the remote computer.

  4. Log out of the remote computer. Log back in using the ssh command from step 5. Did the root password change?

  5. Restore the original root password on the remote computer. Reset the display variable on the remote computer with the following command:

    # export DISPLAY=localhost:0.0

Lab 4

4. 

In this lab, you'll set up a GUI workstation. It'll start with the xdm login manager, and automatically start GNOME, open the Mozilla Web browser, and start a gnome-terminal session when you boot this Linux computer.

 lab 4 a. since you re setting up this workstation for a user, you ll want it to start automatically in the gui. to do so, open the /etc/inittab file in a text editor, and make sure the initdefault variable is set to runlevel 5 as follows: id:5:initdefault b. make sure you don t have other settings defined in the local home directory, in the ~/.xinitrc file. c. as you want to start with the xdm login manager, you ll want to set it as the preferred login manager in the /etc/x11/prefdm file. you can do it by setting the preferred variable as shown: preferred=xdm d. make sure that gnome is the default desktop. if you see an .xclients-default file, it should contain the following line: exec gnome-session e. if you don t see this line, or the file does not exist, you can set it up and make gnome the default desktop with the following command: # switchdesk gnome f. now reboot your computer. from the command line, you can just run the reboot command. alternatively, if you re already in gnome, click main menu | log out and select the reboot option. g. if you ve taken the steps described, you should now see the xdm login manager. log in through that interface. h. now in gnome, click main menu | preferences | more preferences | sessions. this opens the sessions utility. i. click the startup programs tab. click add. this opens the add a new session window. j. enter the gnome-terminal command and click ok. k. repeat step 9. l. enter the mozilla command in add a new session window and click ok. m. click close in the session window. n. log out of gnome, and log back in. o. you should now see the gnome desktop with the gnome-terminal command line interface and mozilla web browser.

Answers

4. 

Lab 4

  1. Since you're setting up this workstation for a user, you'll want it to start automatically in the GUI. To do so, open the /etc/inittab file in a text editor, and make sure the initdefault variable is set to runlevel 5 as follows:

    id:5:initdefault
  2. Make sure you don't have other settings defined in the local home directory, in the ~/.xinitrc file.

  3. As you want to start with the xdm login manager, you'll want to set it as the preferred login manager in the /etc/X11/prefdm file. You can do it by setting the preferred variable as shown:

    preferred=xdm
  4. Make sure that GNOME is the default desktop. If you see an .Xclients-default file, it should contain the following line:

    exec gnome-session
  5. If you don't see this line, or the file does not exist, you can set it up and make GNOME the default desktop with the following command:

    # switchdesk gnome
  6. Now reboot your computer. From the command line, you can just run the reboot command. Alternatively, if you're already in GNOME, click Main Menu | Log Out and select the Reboot option.

  7. If you've taken the steps described, you should now see the xdm login manager. Log in through that interface.

  8. Now in GNOME, click Main Menu | Preferences | More Preferences | Sessions. This opens the Sessions utility.

  9. Click the Startup Programs tab. Click Add. This opens the Add A New Session window.

  10. Enter the gnome-terminal command and click OK.

  11. Repeat step 9.

  12. Enter the mozilla command in Add A New Session window and click OK.

  13. Click Close in the Session window.

  14. Log out of GNOME, and log back in.

  15. You should now see the GNOME desktop with the gnome-terminal command line interface and Mozilla Web browser.



 < Day Day Up > 



RCHE Red Hat Certified Engineer Linux Study Guide[c] Exam (Rh302)
RCHE Red Hat Certified Engineer Linux Study Guide[c] Exam (Rh302)
ISBN: 71765654
EAN: N/A
Year: 2003
Pages: 194

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net