Pogoplugにsambaをセットアップ

By kennyNo Comments

先日、PogoplugにOpenPogoをインストールした。

もともとの目的はPogoplugにsambaをインストールして使い勝手をよくすることである。
ということで、先日の続き。

まず、PogoplugにSSHでログインして、ipkgのアップデートから始める。
ipkgのリポジトリを修正しないとアップデートできないので、まずそれを実施。
/opt/etc/ipkg/armel-feed.conf内の情報を以下のように修正。

#src cross http://openpogo.com/repo ←コメントアウト
src cross http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/stable

アップデートしてみる。

# mount -o rw,remount /
# ipkg update
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/stable/Packages
wget: unrecognized option '--passive-ftp'
BusyBox v1.16.1 (2010-12-01 15:27:23 PST) multi-call binary.

Usage: wget [-csq] [-O file] [-Y on/off] [-P DIR] [-U agent] url

An error ocurred, return value: 1.
Collected errors:
ipkg_download: ERROR: Command failed with return value 1: `wget --passive-ftp   -q -P /opt/ipkg-CwEuDu http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/stable/Packages'

ありゃりゃ、エラーだ。ちょっとググってみると、wgetがダメダメらしいからと書いてある。
ダメダメと言われてもアップデートできないと為す術がないので以下のようにwget.shを作成した。

#!/bin/sh
arg=`echo $* | sed -e 's/--passive-ftp//g'`
/bin/busybox wget $arg

これを既存のwgetにラッピングする。

# cd /usr/bin/
# mv -i wget wget.busybox
# ln -s wget.sh wget
# ls -al /usr/bin/wget*
lrwxrwxrwx    1 root     root             7 May 25 15:49 /usr/bin/wget -> wget.sh
lrwxrwxrwx    1 root     root            12 Dec  1 23:29 /usr/bin/wget.busybox -> /bin/busybox
-rwxr-xr-x    1 root     root            77 May 25 15:49 /usr/bin/wget.sh

これでipkg updateできるようになった。

# ipkg update
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/stable/Packages
Updated list of available packages in /opt/lib/ipkg/lists/cross
Successfully terminated.

そして目的のsambaをインストール。

# ipkg install samba35 samba35-swat
Installing samba35 (3.5.8-2) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/stable/samba35_3.5.8-2_arm.ipk
・・・・・・・・・・
・・・・・・・・・・
Successfully terminated.

/opt/etc/samba/smb.confが存在しなかったので、下記で作成。

[global]
workgroup = WORKGROUP
server string = POGOPLUG
netbios name = POGOPLUG
security = shareload
printers = noguest
account = root
null passwords = Yes
dns proxy = nodos
charset = CP932
unix charset = UTF8
display charset = UTF8
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=131072 SO_SNDBUF=131072 SO_KEEPALIVE
cups options = raw

[cap-share]
vfs objects = cap

[POGOPLUG]
path = /tmp/.cemnt/mnt_sdb1/
read only = no
public = yes
writable = yes
force create mode = 0666
force directory mode = 0777
guest ok = yes

ということで、早速起動!

# /opt/etc/init.d/S08samba start
Starting nmbd:
/opt/sbin/nmbd: error while loading shared libraries: libnsl.so.1: cannot open shared object file: No such file or directory
Starting smbd:
/opt/sbin/smbd: error while loading shared libraries: libnsl.so.1: cannot open shared object file: No such file or directory

がーん!起動しないぞっ!libnslのインストールが必要ということでインストール。

# ipkg install libnsl
Installing libnsl (2.5-4) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/stable/libnsl_2.5-4_arm.ipk
Configuring libnsl
Successfully terminated.

インストールも無事に終了し、再度起動を試みる。

# /opt/etc/init.d/S08samba start
Starting nmbd:
Starting smbd:

無事に起動!
あとはPogoplug再起動時にsambaが自動起動するように/etc/init.d/rcSの最後尾に以下を追加。

/opt/etc/init.d/S08samba start

ということで、Windowsからアクセスできるか確かめてみる。

エクスプローラーからPogoplugのディスクへアクセス

おーっ!ばっちり!ということで、これでNASとしてのバックアップが行い易くなったということで、ひとまずの目的は完了。
ちなみに、swatを使おうと思ったらinet.dなんかも入れて設定しないといけないので、それはまた余裕ができたらやるということで。

サービス, 独り言, 環境設定


この記事へのトラックバック

Leave your Comment

メールアドレスが公開されることはありません。

*

★ロリポップ!★WordPressやMovableTypeの簡単インストール、cron、共有SSL対応!


Blue Taste Theme created by Jabox