Homework week 1 advanced Linux
Page 556 chapter 13 questions 1-6
Why would you use http or ftp instead of bit torrent for downloading large files? == you would use ftp because it does not have client authorization needed, and you would use http because it connects directly to a server to download when with bit torrent uses more TCP connections which can be blocked by firewalls.. Which command would you give to update all installed packages using yum? == yum update but if you are using older versions the yum update might not work you would need to use the yum up2date command Why would you build a package from a source code when a (binary) rpm file is available? = because a source code you can modify the shell and with a binary you cannot also some binary distributions require that you unpack the software from the root directory Suggest two advantages that rpm files have over source distributions? = automatic dependency resolution, faster installation, easier to deploy. When you compile a package yourself rather from an rpm file, which directory hierarchy should you put it in? = /usr/local/man What are some steps you should take before performing an upgrade on a mission critical server? = Perform the upgrade on an identically configured spare system and see what breaks and how to fix it. In particular, look for .rpmsave files and see what configuration information needs to be changed manually, when would you use rpm –i instead of rpm –u? You would use –i (followed by the name) to leave the old kernel intact when you install a new kernel and the –u (command) followed by the name of the file you would use when you want to upgrade the package and install the new package. And make sure you have everything backed up also as a safety precaution Page 582 chapter 14 questions 1-10
Which commands can you use from the command line to send a file to the default printer? == lp filename or you can use lpr filename and either of those commands will print to the default printer or the only printer on the system. What command would you give to cancel all print jobs on the system? == you can use either cancel –a or lprm – but you have to be in root in order to have this command work Which commands list your outstanding print jobs? == you can use lpq or you can use lpstat and either one of those will tell you what print jobs are in the queue What is the purpose of sharing a Linux printer using a samba? == Sharing a Linux printer using Samba allows Windows and OS/2 clients to send print jobs to the printer Name three printing protocols that cups supports? == http, lpd/lpr,smb and jetdirect (socket) protocols and ipp is the native protocol Which command list the installed printer drivers available to cups? == lpinfo –m | head How would you send a text file to a printer connected to a first parallel port without using the print queue? == cat file > dev/par that is a command you can use, the bad thing is that it does not check to see if there is other files being printed and you could get a bunch of garbled output which ends up wasting paper and the other bad thing about it is that you do not get another command prompt till the printing is finished unless you add an ampersand to the end of the command. What command would you use to add the printer to the first usb port with the name usb printer lpadmin -p USBPrinter -E -v usb:/dev/usb/lp0 -P newprinter.ppd How would you define a quota that allows each user to print up to 50 pages per week to a printer named Laserjet? == lpadmin –p laserjet –o job page-limit=50 Define a set of access control rules for a <Location> container inside etc/cups/cupsd.conf that would allow anyone to print to all printers as long as they were either on the local machine or in the mydomain.com domain? == <Location /printers>
Allow from *
Allow from @LOCAL
Page 598-599 chapter 15...
Please join StudyMode to read the full document