debian 6.0 func 安装 局域网基本测试完成

来源:互联网 发布:明基显示器知乎 编辑:程序博客网 时间:2024/05/19 02:16
Python-2.7.3.tgzpyOpenSSL-0.13.tar.gzcertmaster-0.28.tar.gzfunc-0.28.tar.gztar -jxvf Python-2.7.2.tar.bz2cd Python-2.7.2/./configuremake && make install cd ../tar -zxvf pyOpenSSL-0.13.tar.gzcd pyOpenSSL-0.11//usr/local/bin/python setup.py install cd ../tar -zxvf certmaster-0.28.tar.gzcd certmaster-0.28//usr/local/bin/python setup.py install cd ../tar -zxvf func-0.28.tar.gzcd func-0.28//usr/local/bin/python setup.py installcd ../




       分别在Master和Slaver端进行func的安装。

       Master:snode8  10.0.31.40  slaver:gv220  10.0.31.220;在master和slaver端的hosts文件里添加如下内容:

       snode8 10.0.31.40

       gv220 10.0.31.220

       
      1、Master端配置

            1.1、修改修改/etc/init.d/certmaster文件中低28、29行的PROCESS和DAEMON变量的值为/usr/local/bin/certmaster。 (这步可能不要,忘记了)
            1.2、修改/etc/certmaster/minion.conf文件中certmaster的值为master的主机名。
             1.3、修改/etc/func/minion.conf文件中minion_name变量值为自己的主机名。    

  2、Slaver端配置

            2.1、修改/etc/certmaster/minion.conf文件中的certmaster变量的值为master的主机名。
             2.2、修改/etc/func/minion.conf文件中变量minion_name的值为自己的主机名。如图:    
            2.3、Master端重启certmaster和funcd服务。
            2.4、Slaver端重启funcd服务
            
软件使用
Service certmaster restart
Slave端需要启动certmaster和func服务
service certmaster restart

service funcd restart           

funncd启动报错,whereis报错的文件,然后将文件ln -s 到需要位置.


3.证书查看
 在SERVER那边
 certmaster-ca -l
4. 证书分发
在Master端通过certmaster-ca –l查看salve端的服务器的请求,然后通过certmaster-ca –s hostname命令颁发证书


========================================参考===========================================================

http://www.cnblogs.com/wang1988ming/archive/2012/04/13/2445410.html

http://linuxfun.me/?p=1034

http://blog.csdn.net/cheungjustin/article/details/5829659

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

·  下载:[http://download.fedora.redhat.com/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 模块

·  格式:

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 <parameter> func “*” call sysctl set <parameter> <value>

func ssh-1 call sysctl set net.ipv4.tcp_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’


原创粉丝点击