今回はFuncのインストールと設定、
なお、
Funcのインストール
第1回で解説したように、
Fedora 7/8でのインストール
Fedora 7/
$ sudo yum -y install func
Fedora 7/8以外のRed Hat系Linuxでのインストール
Fedora 7/
まずはSRPMからリビルドするために必要なパッケージをインストールします。
$ sudo yum -y install rpm-build python-devel python-setuptools
次にFuncのSRPMファイルを取得し、
$ wget http://people.fedoraproject.org/~mdehaan/files/func/func-0.17-1.src.rpm
$ sudo rpmbuild --rebuild func-0.17-1.src.rpm
最後に、
$ sudo yum -y install pyOpenSSL
$ sudo rpm -ivh /usr/src/redhat/RPMS/noarch/func-0.17-1.noarch.rpm
Funcの起動
certmasterの起動
certmasterの起動には特に設定は必要ありません。以下のコマンドを実行することですぐに起動できます。
$ sudo /sbin/chkconfig certmaster on
$ sudo /etc/init.d/certmaster start
minionの起動
minionを起動するには、
# configuration for minions
[main]
log_level = DEBUG
certmaster = certmaster.example.org
cert_dir = /etc/pki/func
acl_dir = /etc/func/minion-acl.d
設定変更が完了したら、
$ sudo /sbin/chkconfig funcd on
$ sudo /etc/init.d/funcd start
Funcでの通信にはSSL証明書での認証が必要であり、
// 証明書リクエスト元ホストの確認
$ sudo certmaster-ca --list
client.example.org
// 証明書リクエストへの署名
$ sudo certmaster-ca --sign client.example.org
/var/lib/func/certmaster/csrs/client.example.org.csr signed - cert located at /var/lib/func/certmaster/certs/client.example.org.cer
これでFuncを利用するための準備が完了です。
Funcの動作確認
certmaster上で以下のようにfuncコマンドを実行することで、
$ sudo func "*" list_minions
['https://client.example.org:51234']
client.example.org
0
上のように、
$ sudo func "*" list_minions
['https://client0.example.org:51234', 'https://client1.example.org:51234']
client0.example.org
client1.example.org
0
Funcを活用するための第一歩は、