Own MobileMe Server
It’s bad that Apple has a paid MobileMe account, and sometimes you need to store data on the network to use it from anywhere. But if there is no money or no credit card that can be used to pay for an account, then this is not an obstacle if you put ... a wonderful dotMac program that will allow you to make at:
- .Mac prefpane
- iDisk sync
- .Mac prefpane
- iSync support
- iDisk sync
But for this you will need to work hard
1. Download dotmac
svn checkout dotmac.googlecode.com/svn/trunk ~/dotmac
2. Configure Apache
And so we create the server on our machine, for this Leopard has everything (but Apache does not work correctly). First, make a backup of the Apache mutable files: now download and unzip Apache into the Home directory: Now we will write the patch for the dotmac quota so that it enables iDisk quota support Next, configure and install the patched modules (using CFLAGS we install support for all platforms), we replace the original modules with the patched
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
curl -O archive.apache.org/dist/httpd/httpd-2.2.6.tar.gz
gnutar -xzf httpd-2.2.6.tar.gz
patch -p1 < ~/dotmac/Patches/Apache/quota.patch.txt
patch -p1 < ~/dotmac/Patches/Apache/ampquotefix.patch
./configure CFLAGS='-arch x86_64 -arch i386 -arch ppc -arch ppc64' --enable-modules=most --enable-mods-shared=all
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 no need to download anything, everything is there, so we will configure it.
We call it as follows: it will ask if you want to configure it manually, write no, everything will be done automatically now the input line has changed to cpan> so you can install the modules on the last command, ask whether to queue the dependencies, the answer is yes . Continue if you use a G4 or i386 processor then add if you have a G5 or Xeon processor do the following: we will be sent back to bash, where you will need to edit /var/root/.cpan/build/XML-LibXML-1.66/Makefile.PL
# perl Makefile.PL
# nano Makefile
, in it we change -arch i386 -arch ppc to -arch ppc64 -arch x86_64 (in 3 places) where # these are Bash commands
# make install
4. Install dotmac tree and Perl modules
copy dotmac to the desired directory Now set the permissions on the dotmac folders:
sudo cp -r ~/dotmac/server/var/www/dotmac /Library/WebServer/dotmac
sudo mkdir /Library/WebServer/dotmac/userxml/testuser
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 easy to remember for you.
sudo htdigest /Library/WebServer/dotmac/private/iDiskAdmins idisk.mac.com admin
After that, the system will ask you to enter the password and confirm it
6. Copy the modified configuration files
copy dotMac configuration files and change permissions so that they load with Apache now we find my $ dotMacIPAddress = '###. ###. ###. ###' ; and change ###. ###. ###. ### to your IP
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
7. Checking Apache server
For complete certainty, restart the computer. We check Apache for the correct settings through apachectl . You must not see errors! If you do, then 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 execution of the Apache server. Start the Apache server using System Preferences> Sharing, enable Web Sharing. You should not have any errors or warnings in Console.app. If you did, then go to the Leopard Installation Guide #Troubleshooting | troubleshooting to find a fix.
8. Configure hosts on the client machine
Now we will cheat .mac so that it does not climb Apple's .mac server. (Remember that the server must have a static IP address). On each client machine, you need to edit the hosts file so that it does not climb onto the DNS server for the real .mac server address. 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 (changing ###. ###. ###. ### to your IP ): 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 DNS cache of the system with the following command: Mac OS X 10.5 Leopard: Mac OS X 10.4 Tiger:
###.###.###.### 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.
sudo dscacheutil -flushcache
9. Creating an account
For each user will have to create an account manually through the iDiskAdmin web form to set a password and quota.
Copy the sample iDisk folder to the USERNAME iDisk folder: Using Safari, go to configuration.apple.com/idiskAdmin under the admin and create a new user account USERNAME and set a quota. Restart the server:
sudo cp -r /Library/WebServer/dotmac/skel /Library/WebServer/dotmac/idisk/USERNAME
sudo chown -R www:www /Library/WebServer/dotmac/idisk/USERNAME
sudo apachectl graceful
10. Configuring 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 the Finder, connect (cmd-k) to idisk.mac.com/USERNAME
you will be asked to confirm the certificate. Select Show Certificate and drag the certificate icon onto the desktop to create the dot.mac.com.cer file.
Open / Applications / Utilities / Keychain Access.app and select login keychain (if necessary, click the Show Keychains button in the lower left). Drag the certificate from the desktop to Keychain Access and select Always Trust when prompted.
11. Configuring the .mac client
Open System Preferences> .mac and drive in the username and password.
sometimes you may need to restart the dotMac server
Now you have a full-fledged .mac account with support for iDisk and iSync
Now you can delete the source for Apache and dotMac
rm -r ~/httpd-2.2.6
sudo rm -r ~/dotmac
If you have any problems, try running Sudo apachectl configtest and look at the error log in Console.app and find ways to solve problems with your Apache configuration and modules. A lot of problems are discussed on dotMac website.
Symptom: Apache server start / test failed 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 installed Apache DAV module (s) (mod_dav.so and / or mod_dav_fs.so) are not patched to support DAVSATMaxAreaSize. You do not have the correct Apple update installed for the Apache server.
Solution: Re-patch, create and install the mod_dav.so and mod_dav_fs.so modules for Apache.
Symptom: Apache server start / test error due to lack of pictures.
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) you compiled (mod_dav.so, mod_dav_fs.so or XML :: LibXML) are not built for your architecture. You can verify this using the following command (replace the appropriate path and file name).
Solution: You must be sure that the corresponding compiler flags are set correctly. By default, only i386 and ppc7400 (G4) are included.