1 / 17

红帽企业 Linux 用户基础 RHA030

红帽企业 Linux 用户基础 RHA030. 10 单元. 基本系统配置工具. 目标. 本单元你将学习到 : 配置日期、网络和打印设置 传送数据到打印机 设置系统日期和时间 懂得如何处理 read 命令的输入以及位置参数. TCP/IP 网络配置. 重要的网络配置 IP 地址配置 设备激活 DNS 配置 缺省网关. 管理以太网连接. 网络接口按循序命名为: eth0 , eth1 等 通过别名,一个设备能分配多个 ip 地址 别名标记为 eth0:1,eth0:2 等 别名可看待为独立的接口 通过 ifocnfig [ethX] 可查看接口配置

Download Presentation

红帽企业 Linux 用户基础 RHA030

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 红帽企业Linux用户基础RHA030

  2. 10单元 基本系统配置工具

  3. 目标 • 本单元你将学习到: • 配置日期、网络和打印设置 • 传送数据到打印机 • 设置系统日期和时间 • 懂得如何处理read命令的输入以及位置参数

  4. TCP/IP网络配置 重要的网络配置 IP地址配置 设备激活 DNS配置 缺省网关

  5. 管理以太网连接 网络接口按循序命名为:eth0,eth1等 通过别名,一个设备能分配多个ip地址 别名标记为eth0:1,eth0:2等 别名可看待为独立的接口 通过ifocnfig [ethX]可查看接口配置 通过ifup ethX可激活接口 通过ifdown ethX可禁止接口

  6. 图形化的网络配置 – system-config-network System->Administration->Network 激活/禁止接口 分配ip地址/DHCP 修改DNS设置 修改网关ip地址

  7. 网络配置文件 – 以太网设备 设备配置保存在文件中 /etc/sysconfig/network-scripts/ifcfg-ethX 完整的选项列表在/usr/share/doc/initscripts-*/sysconfig.txt

  8. 网络配置文件 – 其它全局网络设置 全局设置在/etc/sysconfig/network中 许多可通过dhcp来提供 网关可以ifcfg文件中重配 NETWORKING=yes HOSTNAME=server.example.com GATEWAY=192.168.2.254

  9. 网络配置文件 – DNS配置 Domain Names Service转换主机名到网络ip地址 DNS服务器地址通过dhcp指定,也可通过在/etc/resolv.conf中配置 Search example.com cracker.org nameserver 192.168.0.254 nameserver 192.168.1.254

  10. Linux中的打印 打印机可以是本地的也可在网络上 打印请求被送到队列 任务队列被送到打印机基于先进先出原则 在打印前或打印过程中任务可取消

  11. System-config-printer System->Administration->Printing 支持打印连接 本地(并行、串行或USB) Unix/Linux打印服务 Windows打印服务 Netware打印服务 HP JetDirect 配置保存在/etc/cups/printers.conf

  12. 打印命令 lpr 传送一个任务给队列准备打印 接收ASCII,PostScript,PDF以及其它 lpq 查看队列中的内容 lprm 从队列中删除一个任务 System V打印命令例如lp,lpstat,cancel也都支持

  13. 打印应用 evince 查看PDF文档 lpstat –a 显示配置的打印机列表 enscript 和a2ps转换文本成PostScript ps2pdf 转换PostScript成PDF mpage 每张打印多个页面

  14. 设置系统日期和时间 GUI:system-config-date System->Administration->Date &Time 使用NTP可手工设置日期和时间 能添加其它的NTP服务 使用本地时间或者UTC时间 CLI:date [MMDDHHMM[[CC][.ss]] # date 01011330 # date 010113302007.05

  15. 脚本:处理输入时的位置参数 位置参数是获取命令行参数给脚本的特殊变量 可用的位置参数为$1,$2,$3等,它们通常分配给其它更有意义的变量以提高程序可读性 $* 获取所有命令行参数 $# 获取命令行参数的个数

  16. 脚本:处理read输入命令 使用read分配输入值给一个或多个shell变量 -p 指明提示符显示 read 从标准输入读取并且指派一个词给任意变量 其它剩余的次被分配给最后一个变量 read –p “Enter a filename:” FILE

  17. 结束 问题和答案 摘要 system-config-network /etc/sysconfig/network-scripts/* Ifup,ifdown Lpr发送文本到打印机 date 从CLI配置日期或者时间 system-config-date以图形方式配置日期或者时间 read VAR 从标准输入设置变量 $1,$2等映射到命令行参数 $# 呈现参数个数 位置参数和read命令

More Related