话说前面写过如何利用Ubuntu搭建time machine备份服务器,但是最近由于工作需要,在办公室台式机上装了一个CentOS,顺便就研究了一下如何利用centos的机器搭建备份服务器。
利用Ubuntu搭建Time Machine服务器的文件见:
简单过程是:
1) 下载并安装 Oracle Berkeley DB 4.8
cd db-4.8.30.NC/build_unix
../dist/configure –prefix=/usr/local/db-4.8.30 && make -j 2 && sudo make install
2)下载并安装 netatalk 2.1.1
./configure –enable-RedHat –with-bdb=/usr/local/db-4.8.30 –prefix=/usr/local/netatalk-2.1.1 –with-mutex=x86/gcc-ass
embly && make -j 2 && sudo make install
3)修改配置文件
3.1) netalk.conf 这个缺省就是这样的
sudo vi /usr/local/netatalk-2.1.1/etc/netatalk/netatalk.conf
# set the daemons to no, no, yes, yes, no, no
3.2) afpd.conf
sudo vi /usr/local/netatalk-2.1.1/etc/netatalk/afpd.conf
- -transall -uamlist uams_randnum.so,uams_dhx.so -nosavepassword -advertise_ssh
3.3) 备份所在路径
sudo vi /usr/local/netatalk-2.1.1/etc/netatalk/AppleVolumes.default
XXXX options:usedots,upriv
3.4) NSS服务
sudo vi /etc/nsswitch.conf
Append hosts: files dns mdns
3.5) 配置avahi
sudo vi /etc/avahi/services/afpd.service
<?xml version="1.0" standalone='no'?>
<!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=Xserve</txt-record>
</service>
</service-group>
4) 启动相关服务
sudo chkconfig atalk on
sudo service atalk start
sudo /etc/init.d/avahi-daemon restart
苹果端同前文。