CIS 140U – LAB #7 – FALL XXXXXXXXXXNAME: ______________________________ Ch. 8 – System Initialization and X Enter your answers into this document in bold, and then upload it to the instructor via...

1 answer below »
CIS 140U – LAB #7 – FALL 2012 NAME: ______________________________
Ch. 8 – System Initialization and X
Enter your answers into this document in bold, and then upload it to the instructor via Moodle.
PART ONE
Answer each question posed in these projects and insert the answers in order into this document in bold directly under the project description. No need to enter the questions, only the answers. If asked to login to user1, use your personal account instead. When asked for passwords, use the ones you created on your system.
1. Additional Project.
a. Boot your system
b. Press Ctrl+Alt+F2 and login to the root account.
c. Enter the runlevel command. What is the current runlevel? _____ How is the previous runlevel indicated? ________________________
d. Enter less /etc/inittab and use the PageUp and PageDn keys to move around in the file. Note the comment area which defines the various run levels. Is this the same as shown in Table 8-3, pg. 360? _____ If not, what are the differences? ______________________________________Which runlevel does the id line at the bottom of the file indicate is the default? _______ Press q to exit the less command.
e. Enter init 1. Which mode are you now in (underline or bold the correct answer): Single user, Multiuser, Full or Extended multiuser
f. Enter the runlevel command. Is the previous runlevel display? ________ Note the idiosyncrasy with the runlevel output when in single user mode described on pg. 361.
g. Enter less /etc/inittab and use PageUp and PageDn. Has the default runlevel been changed? ________ Press q to exit the less command.
h. Enter init 5. Are there daemon processes started? _______ Are you asked to login? _______ If so, login. Is the login in GUI mode or command line interface mode? ___________________
i. Enter the runlevel command from the GUI terminal window. What is the current runlevel? _____ What is the previous runlevel? _____
j. Enter less /etc/inittab and use PageUp and PageDn. Has the default runlevel been changed? _____ Press q to exit the less command.
k. Enter the su - root command and login to root from the terminal window. Enter init 6 and wait a few seconds. What does the system do as a result of this command? _____________________
l. When your system is ready, press Ctrl+Alt+F2 and login to the root account.
m. Enter the runlevel command. What is displayed? ________
n. Enter less /etc/inittab and use PageUp and PageDn. Has the default runlevel been changed? _____ Press q to exit the less command.
o. Enter exit to logout of the terminal session.
2. Do Project 8-3, pp. 386-387. In step 2, in the second question when asked what is contained in each directory, don’t answer with the individual file names, but with a brief description of what these files are or do (see pp. 362-365). Add this step between steps 15 and 16 Step 15.5, enter the command chkconfig --list httpd. In which runlevels are Apache (httpd) daemons started? _________________________________
3. Do Project 8-4, pp. 387-388. In step 3, put a space on each side of the equal (=) sign in the three if statements like this: if [ $1 = "start" ]
and begin each of the strings in the three echo commands with asterisks like this:
echo "*** The sample daemon has started" instead of echo "The sample daemon has started"

Also, use sleep 4 rather than sleep 2 in those three lines.

In step 6, there is a space missing between the file name sample and the second /etc, that is, the command should be:

ln -s /etc/rc.d/init.d/sample /etc/rc.d/rc5.d/S50sample
Add this step between steps 11 and 12 Step 11.5, remove your test daemon and its symbolic linked file with the commands rm /etc/rc.d/rc5.d/S50sample and rm /etc/rc.d/init.d/sample.
4. Additional Project.

a. What should happen if you changed the line id:5:initdefault: to id:3:initdefault: in the /etc/inittab file? __________________________________________________________________________
b. Try this by editing the file and rebooting. Then login and enter the runlevel command. What run level are you now in? ______
c. Try pressing Ctrl+Alt+F1. Are you able to get to GUI mode? ______
d. Enter startx at the command line. What happens? ___________________________________
e. Enter less /etc/inittab from the command line and use PageUp and PageDn to move around. Is the default run level still at 3? _____ If you reboot now, do you think you will be in GUI or command line mode? ____________________
f. Change the id line in the inittab file so that the default runlevel is back to 5, then reboot your system. Did you get a GUI login? _____ Login and enter the runlevel command. What runlevel are you in? _____
5. Additional Project – Working with X client programs.
a. Login from the GUI login dialog box to your end user account.
b. Press Ctrl+ALT+F2 and login to the root account from a shell terminal session. This would be the tty2 session. Use the who command to confirm this.
c. We want to use the xclock program. Let’s check to see if it is available in the root account’s search path. Enter whereis xclock from the shell terminal session. Does it show the path to the program’s location? ____ Let’s search the entire hard drive for xclock by entering find / -name xclock Is it found? ____ Let’s find the package in the Internet yum repositories that contains xclock.

Enter yum whatprovides xclock The display is a little hard to read the first time you see it, but do you see the package name xorg-x11-apps displayed (disregard the version number after the string)? ____ Let’s confirm that that package is not on our system by entering rpm -qa | grep -i xorg-x11-apps (this command uses the rpm command to check the database of packages on our system then the output is piped into the grep command which searches for the desired package). Did that last command find the xorg-x11-apps package? ____ Now, let’s install the package using the command yum install xorg-x11-apps Afterward, use the whereis command like you did above to check to see if the xclock program is in the root account’s search path. What command line did you enter to do this? _____________________________________________ What is the pathname for the xclock program? _____________________________________________
d. From the tty2 terminal session, logout of the root account and login to your end user account.
e. From that terminal session, enter xclock. Did you receive an error that you can’t open the display? ___ Press Ctrl+Alt+F1 to move to the GUI window. Is there a clock window? ___
f. Press Ctrl+Alt+F2 to return to tty2, then enter xclock -display :0 Ignore the warning messages.
g. Now, press Ctrl+Alt+F1. Is the clock window present? ___
h. Press Ctrl+Alt+F2 to return to tty2. Press Ctrl+C to cancel the xclock program. Then press Ctrl+Alt+F1 to go back to the GUI. Has the clock window closed? ___
i. Now, press Ctrl+Alt+F2 to go back to tty2. Let’s enter two X client programs from the same session by using the & character to run them as background processes (we cover this concept in Ch. 10 in detail). Enter xclock -display :0 & (ignore the warning messages but press enter to get the prompt). Then again enter xclock -display :0 & (ignore the warning messages and press enter to get the prompt).
j. Now, press Ctrl+Alt+F1. Are both the xclock windows displayed? ___
k. Close both windows by clicking on the close buttons.
l. Let’s experiment with options. Try this command from the tty2 terminal session:
xclock -digital -bg red -fg white -title "Pacific" -display :0 &
(ignore the warning messages and press enter to get the prompt).
m. Switch back to the GUI. Did the clock appear in digital format with background color red and foreground color white and the specified title? ___

n. Close the clock window.
Upload this document with your answers in bold through Moodle.
Answered Same DayDec 21, 2021

Answer To: CIS 140U – LAB #7 – FALL XXXXXXXXXXNAME: ______________________________ Ch. 8 – System...

David answered on Dec 21 2021
125 Votes
1. Additional Project.
a. Boot your system
b. Press Ctrl+Alt+F2 and login to the root account.
c. Enter the runlevel command.
What is the current runlevel?
[root@(none) ~]# runlevel
N S
How is the previous runlevel indicated? The most recent runlevel prior to entering
the runlevel is shown as ‘N’ [nonexistent].
d. Enter less /etc/inittab and use the PageUp and PageDn keys to move around in the
file.
Note the comment area which defines t
he various run levels.
Is this the same as shown in Table 8-3, pg. 360? _____ If not, what are the differences?
___________
Which runlevel does the id line at the bottom of the file indicate is the default? _______
Press q to exit the less command.
# inittab is no longer used when using systemd.
#
# ADDING CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM.
#
# Ctrl-Alt-Delete is handled by /etc/systemd/system/ctrl-alt-del.target
#
# systemd uses 'targets' instead of runlevels. By default, there are two main targets:
#
# multi-user.target: analogous to runlevel 3
# graphical.target: analogous to runlevel 5
#
# To set a default target, run:
#
# ln -s /lib/systemd/system/.target /etc/systemd/system/default.target
#
e. Enter init 1. Which mode are you now in (underline or bold the correct answer):
Single user, Multiuser, Full or Extended multiuser - Single User
f. Enter the runlevel command. Is the previous runlevel display? ___Yes_____
Note the idiosyncrasy with the runlevel output when in single user mode described on pg.
361.
g. Enter less /etc/inittab and use PageUp and PageDn.
Has the default runlevel been changed? ___No_____
Press q to exit the less command.
h. Enter init 5. Are there daemon processes started? ___YES____
Are you asked to login? __Desktop appears and then terminal was chosen to login_____ If
so, login.
Is the login in GUI mode or command line interface mode? GUI
i. Enter the runlevel command from the GUI terminal window.
What is the current runlevel? ___5__
What is the previous runlevel? _S 5 was displayed (It shows the current and most
recent runlevels)
j. Enter less /etc/inittab and use PageUp and PageDn.
Has the default runlevel been changed? __No___
Press q to exit the less command.
k. Enter the su - root command and login to root from the terminal window.
Enter init 6 and wait a few seconds.
What does the system do as a result of this command? ___Restarted_____
When your system is ready, press Ctrl+Alt+F2 and login to the root account.
m. Enter the runlevel command.
What is displayed? ___N 2_____
n. Enter less /etc/inittab and use PageUp and PageDn.
Has the default runlevel been changed? __No___
Press q to exit the less command.
o. Enter exit to logout of the terminal session.
2. Do Project 8-3, pp. 386-387. In step 2, in the second question when asked what is
contained in each directory, don’t answer with the individual file names, but with a brief
description of what these files are or do (see pp. 362-365). Add this step between steps 15
and 16 Step 15.5, enter the command chkconfig --list httpd. In which runlevels are
Apache (httpd) daemons started? _
Project 8-3
In this hands-on project, you examine the system runlevel directories, start and stop
daemons
manually, and configure daemon startup by runlevel.
1. Once your system has booted, switch to a command-line terminal (tty2) by pressing Ctrl+
Alt+F2 and log in to the terminal using the user name of root and the password of
secret.
2. At the command prompt, type ls /etc/rc.d and press Enter.
What directories are listed?
[root@(none) ~]# ls /etc/rc.d
init.d rc0.d rc1.d rc2.d rc3.d rc4.d rc5.d rc6.d
What is contained within each directory?
a. [root@(none) ~]# ls /etc/rc.d
init.d rc0.d rc1.d rc2.d rc3.d rc4.d rc5.d rc6.d
b. [root@(none) ~]# ls /etc/init.d
functions netconsole spice-vdagentd vmware-tools
myscript network tomcat vmware-tools-thinprint
These files check which which rc*.d scrips to be executed.
c. [root@(none) ~]# ls /etc/rc1.d
K30spice-vdagentd K50netconsole K90network
K43vmware-tools-thinprint K80tomcat K99vmware-tools
These files setup an enviornemnt wich is enough to let single user login and perform
some actions.
d. [root@(none) ~]# ls /etc/rc2.d
K30spice-vdagentd K90network S20tomcat
K50netconsole S03vmware-tools S57vmware-tools-thinprint
They start daemon for multi-user environment.
e. [root@(none) ~]# ls /etc/rc3.d
K30spice-vdagentd K90network S20tomcat
K50netconsole S03vmware-tools ...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here