Du må være registrert og logget inn for å kunne legge ut innlegg på freak.no
X
LOGG INN
... eller du kan registrere deg nå
Dette nettstedet er avhengig av annonseinntekter for å holde driften og videre utvikling igang. Vi liker ikke reklame heller, men alternativene er ikke mange. Vær snill å vurder å slå av annonseblokkering, eller å abonnere på en reklamefri utgave av nettstedet.
  0 473
improbable
Gusto's Avatar
DonorAdministrator
Hei karer,

Jeg skrev en liten tråd på Sitepoint om akkurat dette her, tenkte å legge ut resulatet her også. Handler om problemer som kan oppstå ved flytting av alle filer fra en gammel mac til en ny mac under installasjon - hvordan litt mer spesialiserte applikasjoner som MacPorts vil fungere.

Hi guys,

I've just received my new MacBook Pro, and thought I'd share the problems that occured during the automatic file transfer from my old MacBook Pro (january 2008) to the new one (july 2008), both running Leopard 10.5.

I was a bit sceptical of this whole automatic tranfer process, because my PHP5, Apache, MySQL, PostgreSQL were all installed using the package system MacPorts, and I wasn't sure if the automatic transfer would recognise these installations and just transfer normal OS X applications and files.

Luckily, during the transfer, you get the options to chose which files you want the installation to transfer. Remember to select the checkbox called something like "all files and folders on Macintosh HD". The transfer was flawless in all aspects for me, regarding OS X specific applications. It copied all of my files in the /opt directory - MacPorts still worked!

There were some small adjustments i had to do to make this work from the clean installation with my old files:

Apache
I tried to start Apache the normal way:

Kode

$ sudo /opt/local/apache2/bin/apachectl start
(48)Address already in use: make_sock: could not bind to address [::]:80
Oops. Seems like the "Web sharing" option in Mac OS X is turned on by default. I went to System Preferences -> Sharing and turned off Web Sharing. Tried again.

Kode

$ sudo /opt/local/apache2/bin/apachectl start
httpd: Syntax error on line 114 of /opt/local/apache2/conf/httpd.conf: Cannot load /opt/local/apache2/modules/libphp5.so into server: dlopen(/opt/local/apache2/modules/libphp5.so, 10): Library not loaded: /usr/lib/libltdl.3.dylib\n Referenced from: /opt/local/apache2/modules/libphp5.so\n Reason: image not found
Now I though that maybe my MacPort installation was corrupted during the transfer, but after some googling I realised that libtldl is a dependency of MacPorts, coming from XTools. Strange - XTools weren't copied with all of my other files. I whipped out the Mac OS X Install DVD Disc 2 and installed XTools.

Kode

$ sudo /opt/local/apache2/bin/apachectl start
$
Ahh yes, my Apache working!

System settings
But wait a minute, where are my local hostnames? Seems like the tranfer process neglected my /etc/hosts file. Copied it over and everything is A-OK.

PS: By a coincidence i still used Mac OS X's default vhost apache config file with my MacPorts Apache installation from the days before installing MacPorts. The default config file was erased and replaced by a default apache config file.

Kode

/private/etc/apache2/extra/httpd-vhosts.conf # Default Apache config file
/opt/local/apache2/conf/extra/httpd-vhosts.conf # Default MacPorts config file
Conclusion
- The transfer copies all of your files to the new Mac.
- All default configuration files there's no GUI to modify will be replaced by factory settings. Avoid using default config files if you can (for instance the Apache config file)

Hopefully this short post will be of help for others considering to make the jump. :-)
Vis hele sitatet...