2008年9月17日水曜日

FreeBSD6.3 Sambaのインストール

Sambaは、Linux...Fedora,Knoppix,VineLinuxその他あまたやMacOSX,FreeBSD,OpenBSD,NetBSDなどのBSD系UnixとWindowsとのファイル共有を行う、世界標準的なソフトウエアです。

FreeBSD6.3
Apache2.3
なサーバーにインストールします。
ja-samba 3.0.31_1,1
をインストールします。

FreeBSDではPortsからのインストールができるのでそちらを使います。


#cd /usr/ports/japanese/samba3

lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk
x Options for ja-samba 3.0.31_1,1 x
x lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk x
x x [X] LDAP With LDAP support x x
x x [ ] ADS With Active Directory support x x
x x [X] CUPS With CUPS printing support x x
x x [X] WINBIND With WinBIND support x x
x x [ ] ACL_SUPPORT With ACL support x x
x x [ ] AIO_SUPPORT With Asyncronous IO support x x
x x [ ] FAM_SUPPORT With File Alteration Monitor x x
x x [ ] SYSLOG With Syslog support x x
x x [ ] QUOTAS With Disk quota support x x
x x [X] UTMP With UTMP accounting support x x
x x [ ] PAM_SMBPASS With PAM authentication vs passdb backends x x
x x [ ] CLUSTER With experimental cluster support x x
x x [ ] DNSUPDATE With dynamic DNS update(require ADS) x x
x x [ ] EXP_MODULES With experimental modules x x
x x [X] POPT With system-wide POPT library x x
x x [X] PCH With precompiled headers optimization x x
x x [ ] MAX_DEBUG With maximum debugging x x
x x [ ] SMBTORTURE With smbtorture x x
tqmqqqqqqv(+)qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqjqu
x [ OK ] Cancel x
mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj

オプションは特に設定を変えずにデフォルトで使用します。
キーボード左右を[OK]を選択し、キーボードの[Enter]を押します。

ダウンロード、コンパイルが始まりインストールされます。

  :
  :
Installing bin/script.so as ///usr/local/lib/samba/auth/script.so
install -o root -g wheel -m 444 "/usr/ports/japanese/samba3/work/smb.conf.sample" "/usr/local/share/examples/ja-samba/smb.conf.sample"
install -o root -g wheel -m 555 "/usr/ports/japanese/samba3/work/samba-3.0.31/source/script/mksmbpasswd.sh" "/usr/local/bin/make_smbpasswd"
install -s -o root -g wheel -m 555 "/usr/ports/japanese/samba3/work/samba-3.0.31/source/nsswitch/nss_winbind.so" "/usr/local/lib/nss_winbind.so.1"
install -s -o root -g wheel -m 555 "/usr/ports/japanese/samba3/work/samba-3.0.31/source/nsswitch/nss_wins.so" "/usr/local/lib/nss_wins.so.1"
install -s -o root -g wheel -m 555 "/usr/ports/japanese/samba3/work/samba-3.0.31/source/bin/pam_winbind.so" "/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'.
===============================================================================
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.
===============================================================================
===> Installing rc.d startup script(s)
===> Compressing manual pages for ja-samba-3.0.31_1,1
===> Registering installation for ja-samba-3.0.31_1,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.

For more information, and contact details about the security
status of this software, see the following webpage:
http://www.samba.org/
===> Cleaning for autoconf-2.62
===> Cleaning for libexecinfo-1.1_2
===> Cleaning for cups-base-1.3.8_1
===> Cleaning for popt-1.7_5
===> Cleaning for openldap-client-2.4.11
===> Cleaning for tiff-3.8.2_1
===> Cleaning for gnutls-2.4.1_1
===> Cleaning for libgcrypt-1.4.1_1
===> Cleaning for libgpg-error-1.6_1
===> Cleaning for ja-samba-3.0.31_1,1

で終了。
sambaの設定ファイルを編集します。
#cd /usr/local/etc
設定ファイルsmb.confは最初リードオンリーになっているので書き込み属性を設定します。
#chmod 644 smb.conf

#emacs smb.conf
[smb.conf]
workgroup = <ワークグループ名>

server string = Samba %v on %h FreeBSD

hosts allow = <接続を許可するIPアドレス>

display charset = CP932
unix charset = EUCJP
dos charset = cp932

続いてsambaの起動設定を行います。

#cd /etc
#emacs rc.conf
[rc.conf]

samba_enable="YES"


■いま書きかけ中。

0 件のコメント: