November 22, 2024, Friday, 326

MediaWiki On OSX

From NeoWiki

(Difference between revisions)
Jump to: navigation, search
m
m
 
(3 intermediate revisions by one user not shown)
Line 3: Line 3:
 
* Backup the database in Debian.
 
* Backup the database in Debian.
 
  mysqldump -ac --add-drop-table --user="wikiuser" --password="blahblah" wikidb |gzip -f > ~/wikidb.gz
 
  mysqldump -ac --add-drop-table --user="wikiuser" --password="blahblah" wikidb |gzip -f > ~/wikidb.gz
* Backup all uploaded staff in Debian.
+
* Backup all uploaded staff in Debian (according to the MediaWiki version, the folder could be a little different).
 
  sudo tar czf  /var/lib/mediawiki1.7/upload ~/upload.tar.gz
 
  sudo tar czf  /var/lib/mediawiki1.7/upload ~/upload.tar.gz
 
* Transfer these two backup files to OSX by SFTP or whatever.
 
* Transfer these two backup files to OSX by SFTP or whatever.
Line 11: Line 11:
 
** [http://www.entropy.ch/software/macosx/php/ PHP5/Entropy]
 
** [http://www.entropy.ch/software/macosx/php/ PHP5/Entropy]
 
* Download the newest MediaWiki pack from the [http://download.wikimedia.org/mediawiki/1.9/ official site].
 
* Download the newest MediaWiki pack from the [http://download.wikimedia.org/mediawiki/1.9/ official site].
* Unpack MediaWiki to /Library/WebServer/Documents/mediawiki-*.*.*, and a good habit is to make a soft link 'wiki' to it, which allow you to manage multi-version of MediaWiki more comfortable.
+
* Unpack MediaWiki to /Library/WebServer/Documents/mediawiki-*.*.*, and a good habit is to make a symbol link 'wiki', which allows you to manage multi-version of MediaWiki more comfortably.
* Open CocoaMySQL, add DB, add user, give it privileges, and import wikidb from the backup.
+
* Open CocoaMySQL, add DB, add user, give it privileges, and import database from the backup file wikidb.gz.
* Open Safari and access: http://localhost/wiki and follow the common setup steps(change config folder permission, etc.), and the end the script will check and upgrade the database, let it be. When it ends, do NOT go to the home page yet for now.
+
* Open Safari and access: http://localhost/wiki, follow the common setup steps(change config folder permission, etc.), at the end the script will check and upgrade the database, let it be. When it ends, do NOT go to the home page yet for now.
 
* Move LocalSettings.php to up one level, make wiki/images folder writable to apache user.
 
* Move LocalSettings.php to up one level, make wiki/images folder writable to apache user.
* Unpack the whole upload.tar.gz and move all the content(many folders named '0' '1' 'A' etc. and 'thumb' 'archive' and so on) under the upload/ folder to wiki/images folder.
+
* Unpack the whole upload.tar.gz and move all the content(many folders named '0' '1' 'A' etc. and 'thumb' 'archive' and so on) under the upload folder to wiki/images folder.
* Now go to http://localhost/wiki and get all the old stuff back!
+
* Now go to http://localhost/wiki and get all th stuff back!

Latest revision as of 09:57, 23 November 2007

To transfer a whole running MediaWiki box from Debian to Mac OSX(10.4.10), follow the steps:

  • Backup the database in Debian.
mysqldump -ac --add-drop-table --user="wikiuser" --password="blahblah" wikidb |gzip -f > ~/wikidb.gz
  • Backup all uploaded staff in Debian (according to the MediaWiki version, the folder could be a little different).
sudo tar czf  /var/lib/mediawiki1.7/upload ~/upload.tar.gz
  • Transfer these two backup files to OSX by SFTP or whatever.
  • Prepare required env in OSX.
  • Download the newest MediaWiki pack from the official site.
  • Unpack MediaWiki to /Library/WebServer/Documents/mediawiki-*.*.*, and a good habit is to make a symbol link 'wiki', which allows you to manage multi-version of MediaWiki more comfortably.
  • Open CocoaMySQL, add DB, add user, give it privileges, and import database from the backup file wikidb.gz.
  • Open Safari and access: http://localhost/wiki, follow the common setup steps(change config folder permission, etc.), at the end the script will check and upgrade the database, let it be. When it ends, do NOT go to the home page yet for now.
  • Move LocalSettings.php to up one level, make wiki/images folder writable to apache user.
  • Unpack the whole upload.tar.gz and move all the content(many folders named '0' '1' 'A' etc. and 'thumb' 'archive' and so on) under the upload folder to wiki/images folder.
  • Now go to http://localhost/wiki and get all th stuff back!