Func简介
Func是由红帽子公司以Fedora平台统一网络控制器 Func(Fedora Unified Network Controller https://fedorahosted.org/func),目的是为了解决这一系列统一管理监控问题而设计开发的系统管理基础框架。 它是一个能有效的简化我们多服务器系统管理工作的工具,它很容易学习、很容易使用、也很容易被扩展,它功能强大而我们只需要非常非常少的配置和维护。
Func分为master及slave两部分,master为主控端,slave为被控端。以下为两部分的安装配置说明
========================Func 2.5版本安装文档[Master]=========================
环境要求
Linux2.6内核
python2.5或以上(建议源码安装,系统自带的python2.3、2.4对func支持不好)
下载软件包
wget http://people.fedoraproject.org/~alikins/files/certmaster/certmaster-0.25.tar.gz
wget http://people.fedoraproject.org/~alikins/files/func/func-0.25.tar.gz
wget http://ovh.dl.sourceforge.net/sourceforge/pyopenssl/pyOpenSSL-0.9.tar.gz
安装
tar -zxvf pyOpenSSL-0.9.tar.gz
cd pyOpenSSL-0.9
/usr/local/bin/python setup.py installtar -zxvf certmaster-0.25.tar.gz
cd certmaster-0.25
/usr/local/bin/python setup.py installtar -zxvf func-0.25.tar.gz
cd func-0.25
/usr/local/bin/python setup.py install安装
ln -s /usr/local/bin/certmaster /usr/bin/certmaster
ln -s /usr/local/bin/certmaster-request /usr/bin/certmaster-request
ln -s /usr/local/bin/certmaster-ca /usr/bin/certmaster-ca
ln -s /usr/local/bin/certmaster-sync /usr/bin/certmaster-sync
ln -s /usr/local/bin/funcd /usr/bin/funcd
ln -s /usr/local/bin/func /usr/bin/func
ln -s /usr/local/bin/func-create-module /usr/bin/func-create-module
ln -s /usr/local/bin/func-inventory /usr/bin/func-inventory
ln -s /usr/local/bin/func-transmit /usr/bin/func-transmit
ln -s /usr/local/bin/func-build-map /usr/bin/func-build-map
配置
vi /etc/certmaster/certmaster.conf
[main]
autosign = no
listen_addr =#证书交换通讯端口
listen_port = 1998cadir = /etc/pki/certmaster/ca
cert_dir = /etc/pki/certmaster
certroot = /var/lib/certmaster/certmaster/certs
csrroot = /var/lib/certmaster/certmaster/csrs
cert_extension = cert
sync_certs = False
vi /etc/func/minion.conf
[main]
log_level = DEBUG
acl_dir = /etc/func/minion-acl.d
listen_addr =
#(Func通讯端口
listen_port = 1999
minion_name =
启动服务
service certmaster start
=============================2.5版本安装文档[slave]=========================
下载软件包
wget http://people.fedoraproject.org/~alikins/files/certmaster/certmaster-0.25.tar.gz
wget http://people.fedoraproject.org/~alikins/files/func/func-0.25.tar.gz
wget http://ovh.dl.sourceforge.net/sourceforge/pyopenssl/pyOpenSSL-0.9.tar.gz
安装
tar -zxvf pyOpenSSL-0.9.tar.gz
cd pyOpenSSL-0.9
/usr/local/bin/python setup.py installtar -zxvf certmaster-0.25.tar.gz
cd certmaster-0.25
/usr/local/bin/python setup.py installtar -zxvf func-0.25.tar.gz
cd func-0.25
/usr/local/bin/python setup.py install
ln -s /usr/local/bin/certmaster /usr/bin/certmaster
ln -s /usr/local/bin/funcd /usr/bin/funcd
配置
vi /etc/certmaster/certmaster.conf
[main]
autosign = no
listen_addr =#与master端口保持一致
listen_port = 1998
cadir = /etc/pki/certmaster/ca
cert_dir = /etc/pki/certmaster
certroot = /var/lib/certmaster/certmaster/certs
csrroot = /var/lib/certmaster/certmaster/csrs
cert_extension = cert
sync_certs = Falsevi /etc/certmaster/minion.conf
[main]
certmaster = func.master.server.com
#与master端口保持一致
certmaster_port = 1998
log_level = DEBUG
cert_dir = /etc/pki/certmaster
vi /etc/func/minion.conf
[main]
log_level = DEBUG
acl_dir = /etc/func/minion-acl.d
listen_addr =
#与master端口保持一致
listen_port = 1999
#slave主机名
minion_name =NN2007-08-048
启动服务
/sbin/chkconfig –level 345 certmaster on
/sbin/service certmaster start
/sbin/chkconfig –level 345 funcd on
/sbin/service funcd start
*安装完毕后一定要重启服务器操作系统,不然服务器端有时看不到该主机的证书请求。
=============================Master端常用操作==============================
func "*" call --forks="5" command run "date" 启用5个进程来执行date命令。
certmaster-ca --list 可以查看未签名的计算机名。
certmaster-ca --sign NN2004-02-008 对slave服务器进行签名(证书交换)。
certmaster-ca --sign `certmaster-ca --list ` 如证书请求的服务器比较多,可以这样一下子搞定。
certmaster-ca -c NN2004-02-008 删除该主机证书
=============================防火墙配置==============================
Slave主机需对master开放1998(certmaster)、1999(func)端口
master需对所有Slave主机开放1998(certmaster)端口
来源:http://blog.liuts.com/post/186/