
It's bad that Apple has a paid MobileMe account, and sometimes you need to store data online to use it from anywhere. But if there is no money or no credit card with which you can pay your account, then this is not a hindrance if you put ... a wonderful dotMac program that allows you to make to:
10.5 “Leopard”
- .Mac prefpane
- iSync
- iDisk
- iDisk sync
- Backup
10.4 “Tiger”
- .Mac prefpane
- iSync support
- iDisk
- iDisk sync
- Backup
But for this you need to work hard
1. Download dotmac
svn checkout dotmac.googlecode.com/svn/trunk ~/dotmac
2. Configure Apache
And so we create a server on our own machine, for that, everything is in Leopard (but Apache does not work correctly). First, let's make a backup of the modified Apache files:
sudo cp /usr/libexec/apache2/mod_dav.so /usr/libexec/apache2/mod_dav.so.default
sudo cp /usr/libexec/apache2/mod_dav_fs.so /usr/libexec/apache2/mod_dav_fs.so.default
now download and unzip the Apache in the Home directory:
cd ~
curl -O archive.apache.org/dist/httpd/httpd-2.2.6.tar.gz
gnutar -xzf httpd-2.2.6.tar.gz
Now let's write a patch for the
dotmac quota, so that it
includes support for
iDisk quotas
cd ~/httpd-2.2.6
patch -p1 < ~/dotmac/Patches/Apache/quota.patch.txt
patch -p1 < ~/dotmac/Patches/Apache/ampquotefix.patch
Next, configure and install the patched modules (using
CFLAGS install support for all platforms)
./configure CFLAGS='-arch x86_64 -arch i386 -arch ppc -arch ppc64' --enable-modules=most --enable-mods-shared=all
make
we change original modules for patched ones
sudo cp ./modules/dav/main/.libs/mod_dav.so /usr/libexec/apache2/mod_dav.so
sudo cp ./modules/dav/fs/.libs/mod_dav_fs.so /usr/libexec/apache2/mod_dav_fs.so
3. Configure Perl
There is nothing to download, everything is there, so we will customize.
We call it as follows:
sudo su
cpan
he will ask if you want to configure manually, write no, everything will be done automatically
now the input line has changed to
cpan> it means you can install modules
install HTTPD::UserAdmin
install MD5
install XML::DOMcpan
on the last team asks whether to queue dependencies, answer
yes .
We continue
install HTTP::DAV
if you are using a
G4 or
i386 processor then add
install XML::LibXML
q
If you have a
G5 or
Xeon processor, do the following:
get XML::LibXML
look XML::LibXML
# perl Makefile.PL
# nano Makefile
will
throw us back to bash where you need to edit
/var/root/.cpan/build/XML-LibXML-1.66/Makefile.PL , change the
iarch -arch i386 -arch ppc to
-arch ppc64 -arch x86_64 in it (in 3 places )
# make install
# exit
q
# exit
where # is bash commands4. Install the dotmac tree and Perl modules
we copy dotmac in the necessary directory
sudo cp -r ~/dotmac/server/var/www/dotmac /Library/WebServer/dotmac
sudo mkdir /Library/WebServer/dotmac/userxml/testuser
Now set permissions on dotmac folders:
sudo chown -R www:www /Library/WebServer/dotmac
sudo chmod -R 755 /Library/WebServer/dotmac
sudo chown -R root:wheel /Library/WebServer/dotmac/private
sudo chown www:www /Library/WebServer/dotmac/private/iDiskUsers
5. Admin Password
The standard administrator password must be replaced with something secure and easily remembered by you.
sudo htdigest /Library/WebServer/dotmac/private/iDiskAdmins idisk.mac.com admin
Then the system will ask you to enter a password and confirm it.
')
6. Copy modified configuration files
Copy dotMac configuration files and change permissions so that they load with Apache
sudo cp ~/dotmac/extras/platform_specific/Leopard/dotmac.conf /etc/apache2/other/dotmac.conf
sudo chown www:www /etc/apache2/other/dotmac.conf
sudo cp ~/dotmac/extras/platform_specific/Leopard/httpd-ssl.conf /etc/apache2/other/httpd-ssl.conf
sudo chown www:www /etc/apache2/other/httpd-ssl.conf
now we find my
$ dotMacIPAddress = '###. ###. ###. ###' ;
and change
###. ###. ###. ### to your
IP7. Check the Apache server
For complete confidence, restart the computer. We check Apache for correct settings via
apachectl . You should not see any mistakes! If it does, go to the
Leopard Installation Guide #Troubleshooting | troubleshooting to find a way to fix them.
sudo apachectl configtest
Run /Applications/Utilities/Console.app and check the LOG FILES> / var / log> apache2 to see the Apache server running. Start the Apache server using System Preferences> Sharing and enable Web Sharing. You should not have any errors and warnings in Console.app. If you still appear, then go to Leopard Installation Guide #Troubleshooting | troubleshooting to find a method of elimination.8. Configure hosts on the client machine
Now we will deceive .mac, that he would not climb on Apple's .mac server. (Remember that the server must have a static IP address). On each client machine, it is necessary to edit the hosts file so that it does not climb to the DNS server for the real address of the .mac server. Open the
/ etc / hosts file using nano or any other text editor.
sudo nano /etc/hosts
Go to the end of the file and enter (by changing
###. ###. ###. ### to your
IP ):
###.###.###.### www.mac.com syncmgmt.mac.com idisk.mac.com configuration.apple.com lcs.mac.com certinfo.mac.com delta.mac.com notify.mac.com publish.mac.com homepage.mac.com
###.###.###.### www.mac.com. syncmgmt.mac.com. idisk.mac.com. configuration.apple.com. lcs.mac.com. certinfo.mac.com. delta.mac.com. notify.mac.com. publish.mac.com. homepage.mac.com.
Save (ctrl-o) and exit (ctrl-x). You do not need to reboot to enter into force of these changes, but you need to clear the system's DNS cache with the following command:
Mac OS X 10.5 Leopard:
sudo dscacheutil -flushcache
Mac OS X 10.4 Tiger:
lookupd -flushcache
9. Account creation
For each user, you will have to create an account manually via the
iDiskAdmin web form, to set a password and quota.
Copy the sample
iDisk folder into the
USERNAME iDisk folder:
sudo cp -r /Library/WebServer/dotmac/skel /Library/WebServer/dotmac/idisk/USERNAME
sudo chown -R www:www /Library/WebServer/dotmac/idisk/USERNAME
Using Safari, go to
configuration.apple.com/idiskAdmin under the admin and create a new user account
USERNAME and set the quota.
Restart the server:
sudo apachectl graceful
10. Setting up a client certificate
The dotMac server will provide a certificate that the client must confirm and install before connecting to .mac. This certificate must be manually added to the list of trust certificates for each client.
Using Finder, connect (cmd-k) to
idisk.mac.com/USERNAMEYou will be prompted to confirm the certificate. Select
Show Certificate and drag the certificate icon onto the desktop to create a dot.mac.com.cer file.
Open the / Applications / Utilities / Keychain Access.app and select login keychain (if necessary, click the Show Keychains button in the lower left). Drag the certificate from Desktop to Keychain Access and select Always Trust when prompted.11. Configure the .mac client
Open
System Preferences> .mac and drive in a name and password.
it may sometimes be necessary to restart the dotMac server12. Done!
Now you have a full .mac account with iDisk and iSync support
Now you can delete the Apache and dotMac sources.
rm -r ~/httpd-2.2.6
sudo rm -r ~/dotmac
Possible problems
If you have problems, try running sudo apachectl configtest and review the error log in Console.app and find ways to solve problems with your apache configuration and modules. Many problems are discussed on the dotMac website.
Symptom: Apache start / test error due to DAVSATMaxAreaSize.
org.apache.httpd90519 $parms->add_config() has failed: Invalid command 'DAVSATMaxAreaSize', perhaps misspelled or defined by a module not included in the server configuration at /System/Library/Perl/Extras/5.8.8/darwin-thread-multi-2level/Apache2/PerlSections.pm line 203.\n
Problem: The Apache DAV module (s) installed (mod_dav.so and / or mod_dav_fs.so) are not patched to support DAVSATMaxAreaSize. You have not installed the correct Apple update for the Apache server.
Solution: re-patch, create and install mod_dav.so and mod_dav_fs.so modules for Apache.
Symptom: Apache start / test error due to lack of images.
Can't load '/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/XML/LibXML/LibXML.bundle' for module XML::LibXML: dlopen(/Library/Perl/5.8.8/dacd rwin-thread-multi-2level/auto/XML/LibXML/LibXML.bundle, 1): no suitable image found. Did find:\n\t/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/XML/LibXML/LibXML.bundle: no matching architecture in universal wrapper at /System/Library/Perl/5.8.8/darwin-thread-multi-2level/DynaLoader.pm line 230"
Problem: The module (s) that you compiled (mod_dav.so, mod_dav_fs.so or XML :: LibXML) are not built for your architecture. You can verify this by using the following command (replace the corresponding paths and file name).
file /usr/libexec/apache2/mod_dav.so
Solution: You must be sure that the corresponding compiler flags are set correctly. By default, only i386 and ppc7400 (G4) are included.
Done!