Linux_FUNC_使用指南

相关主题
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

FUNC 使用指南

/?p=158

1. Func 简介:

∙Fedora 统一网络控制器

∙Fedora Unified Network Controller

∙可以用在RedHat系列产品上

∙是为了解决统一管理监控问题,而设计开发的系统管理基础框架

1.1. Func 功能特性

∙Func 可以让你在主控机上一次管理任意多台服务器,或任意多个服务器组

∙Func 命令行可以直接发送远程命令或者远程获取数据

∙Func 通讯基于XMLRPC 和SSL 标准协议

∙新装服务器也可以在Kickstart 文件中自动安装Func,自动注册到主控服务器

1.2. Func 基于主控端与被控端

∙建立了Master - Slaves 主从SSL 证书管控体系,可以将证书自动分发到所有受控服务器1.3. Func 网络架构图

1.4. Func 安装

∙主控端与被控端都需安装

∙ Certmaster

Func

∙下载:[/pub/epel/]

1.5. Func 服务端配置

∙/etc/certmaster/certmaster.conf 编辑,允许autosign == yes

∙让certmaster启动

1.6. Func 客户端配置

∙在/etc/certmaster/minion.conf 指定certmaster服务器

∙让funcd服务器启动

1.7. 查看客户端是否注册成功

∙在服务端上看有多少台客户端注册

∙ certmaster-ca --list-sign

∙或

ls /var/lib/certmaster/certmaster/certs/

1.8. 删除客户端主机

certmaster-ca -c hostname

rm /var/lib/certmaster/certmaster/certs/hostname.cert

1.9. 如果客户端主机重装了怎么办

∙必须在服务端删除此客户机的cert文件

rm /var/lib/certmaster/certmaster/certs/hostname.cert 1.10. 如果在服务端删掉了客户端的 .cert文件怎么办

∙可以将client的/etc/pki/certmaster/hostname.cert 拷贝过来

∙将client 的/etc/pki/certmaster/hostname.*也删掉,再重启funcd,cert文件会自动传输过来

2. Func 常用模块功能介绍

2.1. Func Modules 列表

CommandModule -- Running Arbitrary Commands Like SSH Does

IPtablesModule -- iptables management

NetworkTest -- Test out network stuff.

ProcessModule -- Process Info, memory usage, and Killing

ServiceModule --Service Status and Control

JBossModule -- monitoring and control jboss instances

HardwareModule -- Hardware Profilling

MountModule -- mount, unmount, and query mounted resources

NagiosCheck -- be able to call Nagios plugins and get their results,without needing to install nagios. Works with any plugin

Modules 列表参考网址

2.1.1. CommandModule 模块

∙格式:

func hostname call command run command

∙例:

func ‟ssh-1′ call command run /usr/bin/uptime

func ‟ssh-1′ call command run “date -s 09:47:40“

func ‟ssh-1′ call command run “hwclock -w“

func “ssh-1″ call command run “cat /proc/cpuinfo” 不过排列不好看

2.1.2. ServiceModule 模块

∙格式:

Func hostname call service start/stop/restart servername

∙例:

func ssh-1 call service start httpd

func ssh-1 call service stop sendmail

Func ssh-1 call service restart named

2.1.

3. HardwareModule 模块

∙格式:

func hostname call hardware info

-例:

func ‟ssh-1′ call hardware info

如果不能执行一般是因为smolt 没有安装

2.1.4. IPtablesModule 模块

∙格式:

func hostname call iptables command

∙例:

func “ssh-1″ call iptables policy func “ssh-1″ call iptables dump func “ssh-1″ call iptables.port drop_to 53 192.168.0.0/24 udp src

func ‟ssh-1′ call iptables run “-L INPUT” func ‟ssh-1′ call iptables policy OUTPUT DROP

func ‟ssh-1′ call iptables drop_from 192.168.0.10

∙格式: Func hostname call command run command

∙例:func ‟ssh-1′ call command run …iptables -A INPUT -s 192.168.239.233 -j DROP‟ 2.1.5. JBossModule 模块

∙格式:

相关文档
最新文档