This is intended to illustrate tasks that administrators must consider when deploying Linux solutions in their IT careers.
Cups, what is it?
The Common UNIX Printing SystemTM, or CUPS, is the software you use to print from applications like the web browser you are using to read this page. It converts the page descriptions produced by your application (put a paragraph here, draw a line there, and so forth) into something your printer can understand and then sends the information to the printer for printing.
Now, since every printer manufacturer does things differently, printing can be very complicated. CUPS does its best to hide this from you and your application so that you can concentrate on printing and less on how to print. Generally, the only time you need to know anything about your printer is when you use it for the first time, and even then CUPS can often figure things out on its own.
-exerpt from http://cups.org
- Install and Configure the CUPS Printing System on your server
Started off with a Fedora 7 vmware machine, 1 hard drive ( SCUZI, sda)
Firewall and iptables turned off
All updates completed via yum update.
Lets install CUPS, usually it is installed right off the bat.
yum install cups*
The default CUPS configuration limits administration to the local machine. To open up access, edit the /etc/cups/cupsd.conf and comment out the lines reading:
Beneath the AuthType Basic there should be a <location /> section and in there modify it to say:
Order deny,allow
Deny from all
Allow from 127.0.0.1
Allow from xxx.xxx.usr.ips
The last allow is for certain computer IP addresses.
If you want no authentication comment out AuthType Basic.
Note with this configuration: Only local administration unless further modification in <location /admin> and <location /admin/conf>
**NOTE::Only three ITAS Year two stations should have the ability to Print to your cups configuration, so in the <location /> section add more IPs with: Allow from yyy.yyy.yyy.yyy
Access the webconfiguration page via http://localhost:631 in your web browser on the local machine.
CUPS should show printers shared by other systems
At least 5 printers should be configured in CUPS
Ok so we need to add printers, this is very self explanitory. In the Administration tab click the button: Add New printer. It is self explanitory, however in the name field..Make it something simple to remember such as HP1320 because users will be using it later.
A Class of Printers should exist with the name of ITAS
To create a class, hit the create class tab. Name it ITAS, with the printer you added, in the members field select the one you want to use for it. Simple as that and you can modify it further, however we are done here for today.
Adding that printer on a Windows machine and using it:
Select add new printer:
The Printer Wizard:
Select the 2nd option for network printer.
Select the third option and input like so. <IPADDRESSOFCUPSERVER><:631>/printers/<NAMEOFPRINTER> and may take a few trys. I noticed my Windows machine hanging for a few seconds while it attempted to connected to it.

Configure the printer through the wizard like any other printer. Eventually you will get to a success page. Try printing a page using that printer. Should work like a charm:)
LVM, what is it?
Logical volume management provides a higher-level view of the disk storage on a computer system than the traditional view of disks and partitions. This gives the system administrator much more flexibility in allocating storage to applications and users.
Storage volumes created under the control of the logical volume manager can be resized and moved around almost at will, although this may need some upgrading of file system tools.
The logical volume manager also allows management of storage volumes in user-defined groups, allowing the system administrator to deal with sensibly named volume groups.
-exerpt from http://tldp.org/HOWTO/LVM-HOWTO/whatisvolman.html
-
LVM Skills are essential in today’s Linux world, complete the following tasks:
Create an LVM named ITASUSERNAME that is 20MB in size using only the command line
Easiest way to demonstate this is: two new drives via VMWARE, I used SCUZI over IDE. I gave both drives 1 gb in size.
1.) With those drives added to your Linux machine appliance reboot.
In the terminal type fdisk for both sdb and sdc ( sda is my system drive ) & use the below settings when prompted::
Lets create the volume group::
vegcreate ITASBRASHR /dev/sdb /dev/sdc
Now the logical volume
lvcreate -L 20M ITASBRASHR -n flex
**NOTE:: the -L is the size
Create a script that will display the logical volume properties of your new drive, when the command SHOWDRIVE is issued in the terminal
Lets create an ALIAS :
In the terminal type alias SHOWDRIVE ='lvscan'
**Note: that command scans and shows configuration of those LVMS
Expand the size of your ITASUSERNAME LVM by 200MB using only the command line. (HINT lvextend –L +XM /dev…)
Shrink the size of your LVM by 5MB using only the command line.
Reducing & expanding LVMS via commands in terminal
lvreduce -L -8M /dev/ITASBRASHR/flex
lvextend -L 200M /dev/ITASBRASHR/flex
Take a snapshot of your LVM and place it in a location you can demonstrate later.
This happens to be a play on words. It isn't much like snapshots in VMWARE, but more importantly it just is a drive mirrored at a particular moment. In this case I had an extra logical volume kicking around.
lvcreate -L 300 -s /dev/ITASBRASHR/logvol
Working with MySQL & Cron:
Create a cron script that exports all MySQL databases to the /BACKUP/MYSQL directory at 11pm every Mon, Wed and Fri.
This script was created using only the binaries in /usr/bin directory.
|
In the terminal type: crontab -e In the crontab file add the following line: 0 23 * * 1, 3, 5 mysqldump -u root -p INSERTPSWD HERE > /backup/filename.sql Lets make a directory in / called backup/ cd / mkdir backup
|
To do a MySQL Hot Copy of a database in your system:
|
In the terminal:: mysqlhotcopy -u root -p <password> <dbname> /path/to/copy/the/data/to
|
Working with Generic Commands:
- Displays Word Count at top of output
- Displays Line Count at top of output
- Display Inode Block File is Using at top of output (HINT: stat)
- Display size of file at top of output
- Replace all “a”’ with “A”, Replace
- Replace “The” on Lines 1 & 5 with “HANK”
Create a script that meets the following:
SCRIPT asks user for FILENAME
|
#==================================================== #!/bin/sh #==================================================== |
SCRIPT outputs the filename contents but with the following modifications:
|
#====================================================
echo "====inode====" >> shoes echo "====size====" >> shoes echo "====wordcount====" >> shoes echo "====lineCount====" >> shoes echo "=====HANK & A=====" >> shoes #==================================================== |
Project Resources
Linux+ Guide to Linux Certification 2nd Ed
Chapter 7: Red Hat Certified Engineer Linux Study Guide




