RH133读书 笔记(4) - Lab 4 System Services
Lab 4 System Services
Goal: Develop skills using system administration tools and setting up and administering CUPS.
Estimated Duration: 30
Sequence 1: Using cron
Scenario: You want to know some information about the status of the system every ten minutes today to help investigate some performance issues you have been having. You suspect it might be memory or I/O related and want to keep an eye on those resources.
Deliverable: A cron job that runs every ten minutes today between the hours of 0800 (8:00 AM) and 1700 (5:00 PM).
Instructions:
1. Using crontab -e create a cron job that executes /usr/bin/free and /bin/ps every 10 minutes between 0800 (8:00 am) and 1750 (5:50 pm).
a. As root, use the command crontab -e to edit your cron file. (If you are not comfortable with vi, export an EDITOR environment variable to set another editor.)
b. Enter the following line in your crontab file:
*/10 8-17 * * * /usr/bin/free; /bin/ps
2. How could you send the output from these cron jobs to another e-mail address?
You can set the MAILTO=user variable or use command | mail -s test user
3. Use mail, or mutt as root to check for email from the cron job you have scheduled.
4. Be sure to delete your cron job when you have received several emails from it.
Sequence 2: Logging to a centralized log host
Scenario: Your boss thinks it is a great idea to have one central logging host.
Work together with your neighbor. Set up one machine as the log server and the other as a log client
Instructions:
1. First, on the log server set up syslogd to accept remote messages.
a. Edit /etc/sysconfig/syslog:
SYSLOGD_OPTIONS=“-r -m 0”
b. Restart syslogd:
# service syslog restart
2. On the log client set up syslogd to send messages from the user facility to the log server.
a. Append in /etc/syslog.conf the following line:
user.* @192.168.0.X
b. Restart syslogd.
# service syslog restart
3. Test the new setup by using logger to generate a syslog message. Does the message appear in your neighbor's /var/log/messages?
# logger -i -t yourname "This is a test"
Sequence 3: Setting up a printer and administering a printer with CUPS.
Instructions:
1. Use system-config-printer to create a local queue named testprinter using the generic Postscript printer driver
a. As root run system-config-printer or select System->Administration->Printing in the graphical interface.
b. Click New Printer
c. Enter the text: testprinter in the Printer Name field and click Forward.
d. Select Serial Port #1 from the Select Connection. This describes a locally-connected printer. Click Forward.
e. Select Generic from the Makes list and click Forward.
f. Scroll down to and select Postscript Printer from the Models list and click Forward.
g. Click Apply.
h. After a short pause, you should see your new printer in the Local Printers section of the main interface.
2. Make testprinter your default printer and print a test page.
a. Select testprinter from system-config-printer's Local Printers list to display its settings interface. Note that there are many new configuration options available once the printer has been created.
b. Click Make Default Printer.
c. Click Print Test Page. Click OK in the confirmation dialog.
d. If you are using Gnome, a printer icon should appear in in the corner of your screen. Click this icon and you will see your test page waiting to print. Since your printer does not actually exist, this will never happen, so you may wish to remove the print job by right-clicking on it and selecting Cancel Documents.
3. Use the lp command to print the file /root/install.log from the command line. Since you do not have a real printer attached, this job will be queued forever. Verify the status of the print queue with lpstat and then remove the print job with cancel.
a. # lp /root/install.log
b. # lpstat
(Note: you should see at least one print job active for root with Job number 1. If your test page is still in the queue, you should see it as well)
c. Type the command: cancel 1 to remove the job.
d. Type the command: lpstat The job should now be removed.
RH133读书 笔记(4) - Lab 4 System Services的更多相关文章
- RH133读书笔记(11)-Lab 11 System Rescue and Troubleshooting
Lab 11 System Rescue and Troubleshooting Goal: To build skills in system rescue procedures. Estimate ...
- RH253读书笔记(2)-Lab 2 System Resource Access Controls
Lab 2 System Resource Access Controls Goal: To become familiar with system resource access controls. ...
- RH253读书笔记(1)-Lab 1 System Monitoring
Lab 1 System Monitoring Goal: To build skills to better assess system resources, performance and sec ...
- RH133读书笔记(1)-Lab 1 Managing Startup
Lab 1 Managing Startup Goal: To familiarize yourself with the startup process System Setup: A system ...
- RH133读书笔记(2)-Lab 2 Working with packages
Lab 2 Working with packages Goal: To gain working experience with package management System Setup: A ...
- RH133读书 笔记(5) - Lab 5 User and Group Administration
Lab 5 User and Group Administration Goal: To build skills for user and group administration. Estimat ...
- RH133读书 笔记(3) - Lab 3 Configuring the kernel
Lab 3 Configuring the kernel Goal: Develop skills tuning the /proc filesystem. Gain some experience ...
- RH133读书笔记(6) - Lab 6 Adding New Filesystems to the Filesystem Tree
Lab 6 Adding New Filesystems to the Filesystem Tree Goal: Develop skills and knowlege related to par ...
- RH133读书笔记(9)-Lab 9 Installation and System-Initialization
Lab 9 Installation and System-Initialization Goal: Successfully install Red Hat Enterprise Linux. Sy ...
随机推荐
- Androidclient和server端数据交互的第一种方法
网上有非常多样例来演示Android客户端和server端数据怎样实现交互只是这些样例大多比較繁杂,对于刚開始学习的人来说这是不利的.如今介绍几种代码简单.逻辑清晰的交互样例,本篇博客介绍第一种: 一 ...
- zoj3209(DLX)
题目链接:http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=16234 题意:给p张小纸片, 问能不能选出尽量少的一部分或全部数量 ...
- WPF界面设计技巧(11)-认知流文档 & 小议WPF的野心
原文:WPF界面设计技巧(11)-认知流文档 & 小议WPF的野心 流文档是WPF中的一种独特的文档承载格式,它的书写和呈现方式都很像HTML,它也几乎具备了HTML的绝大多数优势,并提供了更 ...
- pcie inbound、outbound及EP、RC间的互相訪问
Inbound:PCI域訪问存储器域 Outbound:存储器域訪问PCI域 RC訪问EP: RC存储器域->outbound->RC PCI域->EP PCI域->inbou ...
- Linux 安装之U盘引导
说到装系统最简单的方法无非就是找个系统安装光盘来然后就一步一步慢慢的安装.简单是简单但好似大多数人好像都木有Linux的安装光盘. 因此仅仅能用U盘来模拟光盘的功能来装系统咯. 电脑上装有Window ...
- C++ Primer 学习笔记_57_类和数据抽象 --管理指针成员
复印控制 --管理指针成员 引言: 包括指针的类须要特别注意复制控制.原因是复制指针时.一个带指针成员的指针类 class HasPtr { public: HasPtr(int *p,int i): ...
- Windows Phone开发(18):变形金刚第九季——变换
原文:Windows Phone开发(18):变形金刚第九季--变换 变换不是一个好理解的概念,不是吓你,它涉及很多有关代数,几何,以及线性代数的知识.怎么?被我的话吓怕了?不用怕,尽管我们未必能够理 ...
- 优化数据页面(18)——标注keyword
优化数据页面(18)--标注keyword 设计要点:优化数据页面.界面设计.美化exce 秀秀:事实上俺认为,相同是数据项,它们的重要程度也不同. 阿金:嗯? 秀秀:每一行数据时描写叙述一条信息的, ...
- 阅读:AirBag Boosting Smartphone Resistance to Malware Infection
- TMS320F28335项目开发记录2_CCS与JTAG仿真器连接问题汇总
CCS与仿真器连接问题 实际使用过程中.仿真器和CCS连接可能出现这样或那样的问题,或许你的连接非常成功,没碰到过什么问题.但我的问题的确不少,可能与电脑配置有关吧,也可能与人品有关吧. 以下的自己的 ...