Time Machineサーバ構築 【Ubuntu Server 11.10版】

[Ubuntu Server 11.10]を利用した「Time Machine」サーバ構築メモです。
1. Linux環境確認
2. Linuxリリース確認
3. netatalkインストール
4. avahi-daemonインストール
5. netatalk conf設定
6. Time Machineフォルダ準備
7. Avahi conf設定
8. Netatalk&Avahiを起動する
9. Time Machineクライアント設定(MacPC側)

1. Linux環境確認
# uname -a
Linux hostname 3.0.0-19-server #33-Ubuntu SMP Thu Apr 19 20:32:48 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

2. Linuxリリース確認
# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 11.10
Release: 11.10
Codename: oneiric

3. netatalkインストール
# apt-get install netatalk
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following extra packages will be installed:
cracklib-runtime db-util db5.1-util libcrack2 libpam-cracklib rc wamerican
Suggested packages:
texlive-base-bin groff quota db4.2-util
The following NEW packages will be installed:
cracklib-runtime db-util db5.1-util libcrack2 libpam-cracklib netatalk rc wamerican
0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.
Need to get 2,208 kB of archives.
After this operation, 6,529 kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Get:1 http://jp.archive.ubuntu.com/ubuntu/ oneiric/main libcrack2 amd64 2.8.18-3 [180 kB]
Get:2 http://jp.archive.ubuntu.com/ubuntu/ oneiric/main cracklib-runtime amd64 2.8.18-3 [20.6 kB]
Get:3 http://jp.archive.ubuntu.com/ubuntu/ oneiric/main db5.1-util amd64 5.1.25-11 [82.5 kB]
Get:4 http://jp.archive.ubuntu.com/ubuntu/ oneiric/main wamerican all 6-3 [269 kB]
Get:5 http://jp.archive.ubuntu.com/ubuntu/ oneiric-updates/main libpam-cracklib amd64 1.1.3-2ubuntu2.1 [13.1 kB]
Get:6 http://jp.archive.ubuntu.com/ubuntu/ oneiric/universe rc amd64 1.7.1-3ubuntu1 [72.1 kB]
Get:7 http://jp.archive.ubuntu.com/ubuntu/ oneiric/main db-util all 5.1.4 [2,762 B]
Get:8 http://jp.archive.ubuntu.com/ubuntu/ oneiric/universe netatalk amd64 2.2~beta4-1 [1,569 kB]
Fetched 2,208 kB in 1s (1,624 kB/s)
Preconfiguring packages …
Selecting previously deselected package libcrack2.
(Reading database … 54315 files and directories currently installed.)
Unpacking libcrack2 (from …/libcrack2_2.8.18-3_amd64.deb) …
Selecting previously deselected package cracklib-runtime.
Unpacking cracklib-runtime (from …/cracklib-runtime_2.8.18-3_amd64.deb) …
Selecting previously deselected package db5.1-util.
Unpacking db5.1-util (from …/db5.1-util_5.1.25-11_amd64.deb) …
Selecting previously deselected package wamerican.
Unpacking wamerican (from …/archives/wamerican_6-3_all.deb) …
Selecting previously deselected package libpam-cracklib.
Unpacking libpam-cracklib (from …/libpam-cracklib_1.1.3-2ubuntu2.1_amd64.deb) …
Selecting previously deselected package rc.
Unpacking rc (from …/rc_1.7.1-3ubuntu1_amd64.deb) …
Selecting previously deselected package db-util.
Unpacking db-util (from …/archives/db-util_5.1.4_all.deb) …
Selecting previously deselected package netatalk.
Unpacking netatalk (from …/netatalk_2.2~beta4-1_amd64.deb) …
Processing triggers for man-db …
Processing triggers for ureadahead …
ureadahead will be reprofiled on next reboot
Setting up libcrack2 (2.8.18-3) …
Setting up cracklib-runtime (2.8.18-3) …
Setting up db5.1-util (5.1.25-11) …
Setting up wamerican (6-3) …
Setting up libpam-cracklib (1.1.3-2ubuntu2.1) …
Setting up rc (1.7.1-3ubuntu1) …
Setting up db-util (5.1.4) …
Setting up netatalk (2.2~beta4-1) …
Starting Netatalk services (this will take a while): cnid_metad afpd.
Processing triggers for libc-bin …
ldconfig deferred processing now taking place

4. avahi-daemonインストール
# apt-get install avahi-daemon
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following extra packages will be installed:
libavahi-core7 libdaemon0 libnss-mdns
Suggested packages:
avahi-autoipd
The following NEW packages will be installed:
avahi-daemon libavahi-core7 libdaemon0 libnss-mdns
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 228 kB of archives.
After this operation, 1,081 kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Get:1 http://jp.archive.ubuntu.com/ubuntu/ oneiric/main libavahi-core7 amd64 0.6.30-4ubuntu1 [113 kB]
Get:2 http://jp.archive.ubuntu.com/ubuntu/ oneiric/main libdaemon0 amd64 0.14-2 [18.9 kB]
Get:3 http://jp.archive.ubuntu.com/ubuntu/ oneiric/main avahi-daemon amd64 0.6.30-4ubuntu1 [70.8 kB]
Get:4 http://jp.archive.ubuntu.com/ubuntu/ oneiric/main libnss-mdns amd64 0.10-3.1ubuntu1 [24.8 kB]
Fetched 228 kB in 0s (739 kB/s)
Selecting previously deselected package libavahi-core7.
(Reading database … 54583 files and directories currently installed.)
Unpacking libavahi-core7 (from …/libavahi-core7_0.6.30-4ubuntu1_amd64.deb) …
Selecting previously deselected package libdaemon0.
Unpacking libdaemon0 (from …/libdaemon0_0.14-2_amd64.deb) …
Selecting previously deselected package avahi-daemon.
Unpacking avahi-daemon (from …/avahi-daemon_0.6.30-4ubuntu1_amd64.deb) …
Selecting previously deselected package libnss-mdns.
Unpacking libnss-mdns (from …/libnss-mdns_0.10-3.1ubuntu1_amd64.deb) …
Processing triggers for ureadahead …
Processing triggers for man-db …
Setting up libavahi-core7 (0.6.30-4ubuntu1) …
Setting up libdaemon0 (0.14-2) …
Setting up avahi-daemon (0.6.30-4ubuntu1) …
avahi-daemon start/running, process 14838
Setting up libnss-mdns (0.10-3.1ubuntu1) …
First installation detected…
Checking NSS setup…
Processing triggers for libc-bin …
ldconfig deferred processing now taking place

5. netatalk conf設定
# vi /etc/netatalk/afpd.conf
– -tcp -noddp -uamlist uams_randnum.so,uams_dhx.so,uams_dhx2.so -nosavepassword

6. Time Machineフォルダ準備
Setup a folder for Time Machine:
# mkdir -dv /backup/TimeMachine
# chown -R someuser. /backup/TimeMachine
# vi /etc/netatalk/AppleVolumes.default
/backup/TimeMachine TimeMachine options:tm

7. Avahi conf設定
Setup Avahi:
# vi /etc/avahi/services/afpd.service
<?xml version=”1.0″ standalone=’no’?><!–*-nxml-*–>
<!DOCTYPE service-group SYSTEM “avahi-service.dtd”>
<service-group>
<name replace-wildcards=”yes”>%h</name>
<service>
<type>_afpovertcp._tcp</type>
<port>548</port>
</service>
<service>
<type>_device-info._tcp</type>
<port>0</port>
<txt-record>model=MacPro</txt-record>
</service>
</service-group>

8. Netatalk&Avahiを起動する
Start the Netatalk and Avahi services:
# service netatalk start
# service avahi-daemon start

9. Time Machineクライアント設定(MacPC側)
クライアント環境:Mac OS X Server 10.6.8 (10K549)
(Mac OS X v10.6 Snow Leopard)

Time Machineサーバ自動検出するためのコマンド:
$ defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1

自動検出されない場合、下記コマンドで「Time Machineサーバ」を接続する。
afp://someuser@192.168.0.100
※192.168.0.100は「Time Machineサーバ」のIP Address.

Tips:
Stop Time Machine Server:
# sysv-rc-conf –list netatalk off
# sysv-rc-conf –list avahi-daemon off
# service netatalk stop
Stopping Netatalk Daemons: afpd cnid_metad papd timelord atalkd.
# service avahi-daemon stop
avahi-daemon stop/waiting

Share Button

コメントを残す


8 + 5 =

次のHTML タグと属性が使えます: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>