お薦め ページ


メニュー

ハワイ島 遊覧飛行ツアー

ハワイ島 B&B・ホテル

ハワイ島 不動産情報

ハワイ島 情報・観光ガイド

ブログ(Blog)

その他

関連サイト

: 日付別 アーカイブ :

2008年2月15日

2008年2月15日

samba の FreeBSD へのインストール

samba を FreeBSD へインストールしてみる。 今回は、基本的にFreeBSDがもつ ports を利用して インストールする。

FreeBSDのportsの場合、/usr/ports/ 下に準備してある 導入ソフトウェア用のディレクトリへ移動してから、 「make install」とするだけで あとは自動的に ソースコードのダウンロードから コンパイル、インストールまでを行ってくれる。 現在の sambaの場合、net の下にある 「samba3」ディレクトリで makeすればよい。
# cd /usr/ports/net/samba3
# make install


すると「Options for samba 3.0.28,1」という 以下のような
 [X] LDAP         With LDAP support                         
 [ ] ADS          With Active Directory support             
 [X] CUPS         With CUPS printing support                
 [X] WINBIND      With WinBIND support                      
 [ ] ACL_SUPPORT  With ACL support                          
 [ ] FAM_SUPPORT  With File Alteration Monitor              
 [ ] SYSLOG       With Syslog support                       
 [ ] QUOTAS       With Disk quota support                   
 [X] UTMP         With UTMP accounting support              
 [X] MSDFS        With MSDFS support                        
 [ ] PAM_SMBPASS  With PAM authentication vs passdb backends
 [ ] CLUSTER      With experimental cluster support         
 [ ] DNSUPDATE    With dynamic DNS update                   
 [ ] EXP_MODULES  With experimental modules                 
 [X] POPT         With system-wide POPT library             
 [ ] MAX_DEBUG    With maximum debugging                    
 [ ] SMBTORTURE   With smbtorture                           
ウィンドウが表示され、オプションが選択できるようになる。 今回のインストールではデフォルトのままで「OK」ボタンとする。 すると、
===>  NOTICE: This version of port has changed location of Samba password
===>  NOTICE: (smbpasswd) directory. Files in '/usr/local/private'
===>  NOTICE: have moved to '/usr/local/etc/samba'.
===>  Vulnerability check disabled, database not found
===>  Found saved configuration for samba-3.0.28,1
===>  -------------------------------------------
===>  Run 'make config' to (re)configure the port
===>  -------------------------------------------
=> samba-3.0.28.tar.gz doesn't seem to exist in /usr/ports/distfiles/.
=> Attempting to fetch from http://us1.samba.org/samba/ftp/./.
というメッセージを表示後、samba-3.0.28.tar.gz のダウンロードが始まり、 その後、自動的にコンパイルが始まった。

しばらくコンパイルやリンクを行った後、 Installが始まる。 まず、
Installing bin/smbd as ///usr/local/sbin/smbd
Installing bin/nmbd as ///usr/local/sbin/nmbd
Installing bin/swat as ///usr/local/sbin/swat
Installing bin/winbindd as ///usr/local/sbin/winbindd
======================================================================
The binaries are installed. You may restore the old binaries (if there
were any) using the command "make revert". You may uninstall the binaries
using the command "make uninstallbin" or "make uninstall" to uninstall
binaries, man pages and shell scripts.
======================================================================
と表示されて、smbd, nmbd, swat, winbindd の4つが ディレクトリ /usr/local/sbin にインストールされたことがわかる。

その後、netコマンドをはじめ、いくつかのコマンドが /usr/local/bin にインストールされる。
Installing bin/wbinfo as ///usr/local/bin/wbinfo
Installing bin/smbclient as ///usr/local/bin/smbclient
Installing bin/net as ///usr/local/bin/net
Installing bin/smbspool as ///usr/local/bin/smbspool
Installing bin/testparm as ///usr/local/bin/testparm
Installing bin/smbstatus as ///usr/local/bin/smbstatus
Installing bin/smbget as ///usr/local/bin/smbget
Installing bin/smbcontrol as ///usr/local/bin/smbcontrol
Installing bin/smbtree as ///usr/local/bin/smbtree
Installing bin/tdbbackup as ///usr/local/bin/tdbbackup
Installing bin/nmblookup as ///usr/local/bin/nmblookup
Installing bin/pdbedit as ///usr/local/bin/pdbedit
Installing bin/tdbdump as ///usr/local/bin/tdbdump
Installing bin/tdbtool as ///usr/local/bin/tdbtool
Installing bin/smbpasswd as ///usr/local/bin/smbpasswd
Installing bin/rpcclient as ///usr/local/bin/rpcclient
Installing bin/smbcacls as ///usr/local/bin/smbcacls
Installing bin/profiles as ///usr/local/bin/profiles
Installing bin/ntlm_auth as ///usr/local/bin/ntlm_auth
Installing bin/smbcquotas as ///usr/local/bin/smbcquotas
Installing bin/eventlogadm as ///usr/local/bin/eventlogadm
======================================================================
The binaries are installed. You may restore the old binaries (if there
were any) using the command "make revert". You may uninstall the binaries
using the command "make uninstallbin" or "make uninstall" to uninstall
binaries, man pages and shell scripts.
======================================================================
上記のような注意書きが表示される。

それから
Installing scripts in /usr/local/bin
Installing /usr/local/bin/smbtar
Installing /usr/local/bin/findsmb
======================================================================
The scripts have been installed. You may uninstall them using
the command "make uninstallscripts" or "make install" to install binaries,
man pages and shell scripts. You may recover the previous version (if any
by "make revert".
======================================================================
のように スクリプト smbtar と findsmb がイントールされる。

次に、
Installing /usr/ports/net/samba3/work/samba-3.0.28/source//codepages/lowcase.dat as ///usr/local/lib/samba/lowcase.dat
Installing /usr/ports/net/samba3/work/samba-3.0.28/source//codepages/upcase.dat as ///usr/local/lib/samba/upcase.dat
Installing /usr/ports/net/samba3/work/samba-3.0.28/source//codepages/valid.dat as ///usr/local/lib/samba/valid.dat
======================================================================
The dat files have been installed.  You may uninstall the dat files
using the command "make uninstalldat" or "make uninstall" to uninstall
binaries, man pages, dat files, and shell scripts.
======================================================================
datファイルが /usr/local/lib/samba/ にインストールされる。

そして、SWAT 関連のメッセージ・ファイルが
Installing /usr/ports/net/samba3/work/samba-3.0.28/source//po/de.msg as ///usr/local/lib/samba/de.msg
Installing /usr/ports/net/samba3/work/samba-3.0.28/source//po/en.msg as ///usr/local/lib/samba/en.msg
Installing /usr/ports/net/samba3/work/samba-3.0.28/source//po/fi.msg as ///usr/local/lib/samba/fi.msg
Installing /usr/ports/net/samba3/work/samba-3.0.28/source//po/fr.msg as ///usr/local/lib/samba/fr.msg
Installing /usr/ports/net/samba3/work/samba-3.0.28/source//po/it.msg as ///usr/local/lib/samba/it.msg
Installing /usr/ports/net/samba3/work/samba-3.0.28/source//po/ja.msg as ///usr/local/lib/samba/ja.msg
Installing /usr/ports/net/samba3/work/samba-3.0.28/source//po/nl.msg as ///usr/local/lib/samba/nl.msg
Installing /usr/ports/net/samba3/work/samba-3.0.28/source//po/pl.msg as ///usr/local/lib/samba/pl.msg
Installing /usr/ports/net/samba3/work/samba-3.0.28/source//po/tr.msg as ///usr/local/lib/samba/tr.msg
==============================================================================
The SWAT msg files have been installed.  You may uninstall the msg files using
the command "make uninstallmsg" or "make uninstall" to uninstall binaries, man
pages, msg files, and shell scripts.
==============================================================================
のように /usr/local/lib/samba/ に、 また、SWATで 利用される html や gif ファイルが /usr/local/share/swat/ 以下にインストールされる。

それから
Installing bin/recycle.so as ///usr/local/lib/samba/vfs/recycle.so
Installing bin/audit.so as ///usr/local/lib/samba/vfs/audit.so
Installing bin/extd_audit.so as ///usr/local/lib/samba/vfs/extd_audit.so
Installing bin/full_audit.so as ///usr/local/lib/samba/vfs/full_audit.so
Installing bin/netatalk.so as ///usr/local/lib/samba/vfs/netatalk.so
Installing bin/fake_perms.so as ///usr/local/lib/samba/vfs/fake_perms.so
Installing bin/default_quota.so as ///usr/local/lib/samba/vfs/default_quota.so
Installing bin/readonly.so as ///usr/local/lib/samba/vfs/readonly.so
Installing bin/cap.so as ///usr/local/lib/samba/vfs/cap.so
Installing bin/expand_msdfs.so as ///usr/local/lib/samba/vfs/expand_msdfs.so
Installing bin/shadow_copy.so as ///usr/local/lib/samba/vfs/shadow_copy.so
Installing bin/readahead.so as ///usr/local/lib/samba/vfs/readahead.so
Installing bin/CP850.so as ///usr/local/lib/samba/charset/CP850.so
Installing bin/CP437.so as ///usr/local/lib/samba/charset/CP437.so
Installing bin/script.so as ///usr/local/lib/samba/auth/script.so
のように /usr/local/lib/samba/ の vfs/ や charset/ 、auth/ に 各種 .so ファイルがインストールされる。

その後、
/bin/cp -p "/usr/ports/net/samba3/work/smb.conf.sample" "/usr/local/share/examples/samba"
とあるように、smb.conf ファイルのサンプルが /usr/local/share/examples/samba にコピーされていることがわかる。

最後に、
install  -o root -g wheel -m 555 "/usr/ports/net/samba3/work/samba-3.0.28/source/script/mksmbpasswd.sh" "/usr/local/bin/make_smbpasswd"
install  -s -o root -g wheel -m 555 "/usr/ports/net/samba3/work/samba-3.0.28/source/nsswitch/nss_winbind.so" "/usr/local/lib/nss_winbind.so.1"
install  -s -o root -g wheel -m 555 "/usr/ports/net/samba3/work/samba-3.0.28/source/nsswitch/nss_wins.so" "/usr/local/lib/nss_wins.so.1"
install  -s -o root -g wheel -m 555 "/usr/ports/net/samba3/work/samba-3.0.28/source/bin/pam_winbind.so" "/usr/local/lib"
シェルスクリプト make_smbpasswd が、/usr/local/bin/ に また いくつかの shared object が /usr/local/lib/ にインストールされる。

最後の注意書きとして、再び
===============================================================================
NOTICE: This version of port has changed location of Samba password
NOTICE: (smbpasswd) directory. Files in '/usr/local/private'
NOTICE: have moved to '/usr/local/etc/samba'.
===============================================================================
と記述されている。これにより、 Samba password (smbpasswd) が /usr/local/etc/samba に作られることがわかる。 ちなみに、インストール直後には このディレクトリには何もファイルが作られていない。

次の注意書きが
===============================================================================
Samba3 *package* now doesn't include ADS support due the portability problems
with Kerberos5 libraries on different installations. You need to compile port
yourself to get this functionality.

For additional hints and directions, please, look into the README.FreeBSD file.
===============================================================================
とある。ここで言う「ADS」とは「Active Directory support」このことであろう。

それから
===> Installing rc.d startup script(s)
===>   Compressing manual pages for samba-3.0.28,1
===>   Registering installation for samba-3.0.28,1
===> SECURITY REPORT:
      This port has installed the following files which may act as network
      servers and may therefore pose a remote security risk to the system.
/usr/local/bin/smbspool
/usr/local/bin/smbtree
/usr/local/bin/smbcontrol
/usr/local/bin/nmblookup
/usr/local/bin/testparm
/usr/local/sbin/winbindd
/usr/local/bin/smbget
/usr/local/bin/profiles
/usr/local/lib/nss_wins.so.1
/usr/local/bin/smbstatus
/usr/local/bin/pdbedit
/usr/local/bin/net
/usr/local/bin/wbinfo
/usr/local/bin/smbcacls
/usr/local/bin/smbclient
/usr/local/sbin/swat
/usr/local/sbin/nmbd
/usr/local/bin/eventlogadm
/usr/local/bin/rpcclient
/usr/local/bin/ntlm_auth
/usr/local/sbin/smbd
/usr/local/bin/smbpasswd
/usr/local/bin/smbcquotas
と、どんな実行ファイルがインストールされたかが一覧されている。

      This port has installed the following startup scripts which may cause
      these network services to be started at boot time.
/usr/local/etc/rc.d/samba

      If there are vulnerabilities in these programs there may be a security
      risk to the system. FreeBSD makes no guarantee about the security of
      ports included in the Ports Collection. Please type 'make deinstall'
      to deinstall the port if this is a concern.
とあるので、ディレクトリ /usr/local/etc/rc.d/ の下に「samba」というスクリプトが インストールされたことがわかる。 FreeBSDでは、ディレクトリ /usr/local/etc/rc.d/ の下にある スクリプトが 起動に自動実行されることになっている。

そして、最後の最後に
      For more information, and contact details about the security
      status of this software, see the following webpage:
http://www.samba.org/
と表示されて samba 3 の「make install」が終了した。

【参考リンク】

カテゴリー: samba     22:29 | コメント (0) | トラックバック (0)

 
ハワイ島での遊覧飛行ツアーとB&Bのスペシャリスト、スカイメリカ
Copyright © 2003,2009 Skymerica Corp. All rights reserved.