Func简介
Func是由红帽子公司以Fedora平台统一网络控制器 Func(Fedora Unified Network Controller https://fedorahosted.org/func),目的是为了解决这一系列统一管理监控问题而设计开发的系统管理基础框架。 它是一个能有效的简化我们多服务器系统管理工作的工具,它很容易学习、很容易使用、也很容易被扩展,它功能强大而我们只需要非常非常少的配置和维护。
Func分为master及slave两部分,master为主控端,slave为被控端。以下为两部分的安装配置说明
FUNC模块学习笔记
========================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 install
tar -zxvf certmaster-0.25.tar.gz
cd certmaster-0.25
/usr/local/bin/python setup.py install
tar -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 = 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 = 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 install
tar -zxvf certmaster-0.25.tar.gz
cd certmaster-0.25
/usr/local/bin/python setup.py install
tar -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 = False
vi /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)端口
如大家有什么疑问或感兴趣的话题可以通过weibo与我交流:http://t.qq.com/yorkoliu
Func是由红帽子公司以Fedora平台统一网络控制器 Func(Fedora Unified Network Controller https://fedorahosted.org/func),目的是为了解决这一系列统一管理监控问题而设计开发的系统管理基础框架。 它是一个能有效的简化我们多服务器系统管理工作的工具,它很容易学习、很容易使用、也很容易被扩展,它功能强大而我们只需要非常非常少的配置和维护。
Func分为master及slave两部分,master为主控端,slave为被控端。以下为两部分的安装配置说明
FUNC模块学习笔记
========================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 install
tar -zxvf certmaster-0.25.tar.gz
cd certmaster-0.25
/usr/local/bin/python setup.py install
tar -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 = 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 = 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 install
tar -zxvf certmaster-0.25.tar.gz
cd certmaster-0.25
/usr/local/bin/python setup.py install
tar -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 = False
vi /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)端口
如大家有什么疑问或感兴趣的话题可以通过weibo与我交流:http://t.qq.com/yorkoliu
[root@test Python-2.5.2]# func "func-slave" call conmand run ls
{'func-slave': ['REMOTE_ERROR',
'socket.gaierror',
"(-2, 'Name or service not known')",
' File "/usr/local/lib/python2.5/site-packages/func/overlord/client.py", line 468, in process_server\n retval = getattr(conn, meth)(*args[:])\n File "/usr/local/lib/python2.5/xmlrpclib.py", line 1147, in __call__\n return self.__send(self.__name, args)\n File "/usr/local/lib/python2.5/xmlrpclib.py", line 1437, in __request\n verbose=self.__verbose\n File "/usr/local/lib/python2.5/xmlrpclib.py", line 1183, in request\n self.send_content(h, request_body)\n File "/usr/local/lib/python2.5/xmlrpclib.py", line 1297, in send_content\n connection.endheaders()\n File "/usr/local/lib/python2.5/httplib.py", line 860, in endheaders\n self._send_output()\n File "/usr/local/lib/python2.5/httplib.py", line 732, in _send_output\n self.send(msg)\n File "/usr/local/lib/python2.5/httplib.py", line 699, in send\n self.connect()\n File "/usr/local/lib/python2.5/site-packages/certmaster/SSLCommon.py", line 106, in connect\n self.sock.connect((self.host, self.port))\n File "<string>", line 1, in connect\n']}
请问是您知道可能是什么原因造成的呢
不知道是不是这个问题??我现在certmaster-ca --list能看到了
[root@feikutest ~]# certmaster-ca --list
/usr/local/lib/python2.6/site-packages/certmaster/certmaster.py:25: DeprecationWarning: the sha module is deprecated; use the hashlib module instead
import sha
No certificates to sign
再加一句,我用的是PYTHON2.6,跟这个有关系吗?PYTHON每个版本都有很大的差别,这东西太变态。。。。