admin 管理员组

文章数量: 1086019


2024年2月29日发(作者:asp档案管理系统源码下载)

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/ 编辑,允许autosign == yes

让certmaster启动

1.6. Func 客户端配置

在 /etc/certmaster/ 指定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/

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

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

rm /var/lib/certmaster/certmaster/certs/

1.10. 如果在服务端删掉了客户端的 .cert文件怎么办

可以将client的 /etc/pki/certmaster/ 拷贝过来

将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

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 模块

格式:

func hostname call jboss command

例:

func “*” call jboss status

func “*” call jboss check

func “*” call jboss search_by_instance “default“

func “*” call jboss search_by_address “127.0.0.1“

func “*” call jboss search_by_port 8080

2.1.6. ProcessModule 模块

格式:

Func hostname call process command

例:

func ssh-1 call process info “aux”

func ssh-1 call process mem

func ssh-1 call process kill httpd SIGHUP

2.1.7. SysctlModule 模块

格式:

Func hostname call sysctl command

例:

func ssh-1 call sysctl list

func “*” call sysctl get func “*” call sysctl set

func ssh-1 call sysctl set _syncookies 1

2.1.8. RpmModule模块 ( =rpm –qa )

func ssh-1 call rpms inventory

2.1.9. SmartModule模块 ( 看硬盘信息 )

func ssh-1 call smart info

2.1.10. YumModule模块

func ssh-1 call yumcmd update

func ssh-1 call command run „yum update‟


本文标签: 服务器 自动 客户端 管理 证书