2017年7月10日月曜日

FreeBSDでpkgでのインストール時に最後に表示されるメッセージを再び確認する

FreeBSDでpkgでのインストール時に最後に表示されるメッセージを再び確認するには、
以下のようにします。
$ pkg query "%M" samba44
Always:
=================================================================
How to start: http://wiki.samba.org/index.php/Samba4/HOWTO

* Your configuration is: /usr/local/etc/smb4.conf

* All the relevant databases are under: /var/db/samba4

* All the logs are under: /var/log/samba4

* Provisioning script is: /usr/local/bin/samba-tool

For additional documentation check: http://wiki.samba.org/index.php/Samba4

Bug reports should go to the: https://bugzilla.samba.org/

==================================================================
もしくはつぎのようにします。
$ pkg info -R samba44-4.4.5_1

How to start: http://wiki.samba.org/index.php/Samba4/HOWTO

* Your configuration is: /usr/local/etc/smb4.conf

* All the relevant databases are under: /var/db/samba4

* All the logs are under: /var/log/samba4

* Provisioning script is: /usr/local/bin/samba-tool

For additional documentation check: http://wiki.samba.org/index.php/Samba4

Bug reports should go to the: https://bugzilla.samba.org/

===================================================================
EOD;
    }
]
$
また、すでにインストールされているコマンドがどのパッケージに含まれているかを知りたい場合は、pkg whichを使います。
FreeBSD入門 pkg 
http://kaworu.jpn.org/freebsd/pkg

インストールされているファイルからパッケージを調べる

任意のファイルがどのパッケージによってインストールされたのか調べるには、以下のコマンドを実行します。

$ pkg which /usr/local/libexec/apache24/mod_remoteip.so
/usr/local/libexec/apache24/mod_remoteip.so was installed by package apache24-2.4.9