Table of contents
- 1.1. Migration Notes
- 1.2. Migration Document
- 2. Migrating MindTouch from one Linux server to another
- 2.1.1. Overview
- 2.1.2. Goal
- 2.1.3. Migrating From One MindTouch Instance To Another
- 2.1.4. Backing up your database
- 2.1.5. Backing up your attachments
- 2.1.6. Backing up Service Storage
- 2.1.7. Move files to new instance
- 2.1.8. Restoring your database
- 2.1.9. Restoring Service Storage
- 2.1.10. Restoring your attachments
- 2.1.11. Update Config files with wikiuser password
- 2.1.12. LocalSettings.php
- 2.1.13. mindtouch.deki.startup.xml
- 2.1.14. Update Database
- 2.1.15. Rebuild Search Index
- 2.2. Installing Mindtouch
- 3. Installing on Ubuntu
- 3.1.1. Overview
- 3.1.2. Goal
- 3.1.3. System Requirements (Click to Expand)
- 3.1.4. Add the MindTouch repository
- 3.1.4.1. Ubuntu 9.04
- 3.1.4.2. Ubuntu 9.10
- 3.1.4.3. Ubuntu 10.04
- 3.1.5. Update Repositories
- 3.1.6. Install dependencies packages
- 3.1.7. Install/Upgrade Mono (Click to Expand)
- 3.1.8. Install PrinceXML
- 3.1.8.1. 32 bit install
- 3.1.8.2. 64 bit install
- 3.1.9. Install MindTouch
- 3.1.10. Install Trusted Roots Certificates
- 3.1.11. Configure the Apache Virtual Host
- 3.1.12. Web Installer
- 3.2. Attachments Problems
- 3.2.1. Proper Permissions
Migration Notes
- Save the following:
- Lisence file
- /var/www/dekiwiki
- /etc/dekiwiki
- /etc/init.d/dekiwiki
- /etc/apache2/sites-available/dekiwiki
- database (mysqldump -uroot -p**** --add-drop-table wikidb > dekiwikiDBAug2312.sql)
- The way I migrated this time:
- install mindtouch on new system using the instructions below with the following changes:
- for repository in sources.list - change Ubuntu10.04 to 11.04 (more recent may be out)
- for gs package, use "ghostscript" (renamed)
- Install it completely including lisence key (I tried to spare the other steps, but didn't work, may have been another reason. The benefit of doing the whole install + webinstall is that it generates dekiwiki user in mysql with a random password. You can use that password to paste it into LocalSettings.php and /etc/dekiwiki/... Not sure if that can be bypassed.)
- copy files to:
- /etc/dekiwiki (and sudo chown -R dekiwiki /etc/dekiwiki)
- /var/www/dekiwiki (and sudo chown -R dekiwiki /var/www/dekiwiki)
- sudo chmod 777 /var/www/dekiwiki LocalSettings.php (for some reason this has wierd permissions settings that causes a white screen in the browser if this isn't done)
- /etc/apache2/sites-available/dekiwiki
- Copy dekiwiki mysql password hash from LocalSettings.php and paste it into password fields in new LocalSettings.php and in /etc/dekiwiki/... (not sure how to skip this step)
- copy database mysql -uroot -p***** wikidb < backup.sql (I let the webinstaller set up the DB and then pasted the backed-up db, but can probably try to create from scratch to skip the webinstaller step)
- Restart apache2 (sudo /etc/init.d/apache2 restart) (not sure which should be restarted first, i started dekiwiki first and it gave me error in the terminal on the start command)
- Restart dekiwiki api script (sudo /etc/init.d/dekiwiki restart)
- Check if works???
- install mindtouch on new system using the instructions below with the following changes:
- Notes:
- Most problems I had were from permissions
- At first I installed dekiwiki completely fresh (and then copied db, attachments, skins and bin folders from the old install), but for some reason the search wouldn't work -no results, even if I rebuild search cache. Then I pasted the entire /var/www/dekiwiki from old install and it worked (after changing chown -R dekiwiki on the whole thing and chmod 777 LocalSettings.php).
- Not sure why, maybe issue with skins folder that I completely replaced..? I had errors in /var/log/apache2/error-dekiwiki that didn't explain the problem.
- To get captcha to work: sudo chmod 777 /var/www/dekiwiki/skins/common/cache
- sudo chmod 777 /var/www/dekiwiki/skins/common/cache/* (not sure if it's folder or the file that fixed the problem, probably file, could not delete it when making new captchas)
Migration Document
Migrating MindTouch from one Linux server to another
- 1. Overview
- 2. Goal
- 3. Migrating From One MindTouch Instance To Another
- 3.1. Backing up your database
- 3.2. Backing up your attachments
- 3.3. Backing up Service Storage
- 3.4. Move files to new instance
- 3.5. Restoring your database
- 3.6. Restoring Service Storage
- 3.7. Restoring your attachments
- 3.8. Update Config files with wikiuser password
- 3.9. LocalSettings.php
- 3.10. mindtouch.deki.startup.xml
- 3.11. Update Database
- 3.12. Rebuild Search Index
- 4. What's Next
- 5. Related
Overview
This reviews how to migrate MindTouch from instance to another when MindTouch is installed on Linux on both servers.
Goal
After completing this tutorial you will have moved the MindTouch install from one server to another.
Migrating From One MindTouch Instance To Another
Install a new instance of MindTouch on the server that you want to migrate to. After installation is complete, edit the LocalSettings.php file located in /var/www/dekiwiki and copy the $wgDBadminpassword value from that so that you can replace it in the files you migrate over. In the example below we would copy over "password" to use in the files after we migrate.
LocalSettings.php
$wgDBadminpassword = "password";
Backing up your database
You can do this from command line by issuing the following command:
# mysqldump -udbusername -p db_name > db_name.sql
Note: If you have a multi-tenant installation of MindTouch, you have multiple databases and will need to back up each database separately.
Backing up your attachments
# cd /path/to/dekiwiki/; # tar cvzpf attachments.tar.gz attachments
Backing up Service Storage
*Note: This step is deprecated in MindTouch 10.x and newer, and should only be used for version 9.12.3, and below. As of 10.x, notifications are stored within the database.
Folders with the name _x002f_ contain service information that is important to MindTouch like page notifications, licensing and other service storage. Make sure that you back this up and restore it by doing the following
cd /var/www/dekiwiki/bin tar cvzpf serviceinfo.tar.gz _x002f_*
Move files to new instance
Copy the backed-up files via scp to the new server:
# scp /path/to/db_name.sql root@destination.server:/path/to/MindTouch # scp /path/to/attachments.tar.gz root@destination.server:/path/to/MindTouch # scp /path/to/dekiwiki/LocalSettings.php root@destination.server:/var/www/dekiwiki/ # scp /etc/dekiwiki/mindtouch.deki.startup.xml root@destination.server:/etc/dekiwiki/ # scp /etc/dekiwiki/mindtouch.host.conf root@destination.server:/etc/dekiwiki/ # scp /path/to/serviceinfo.tar.gz root@destination.server:/path/to/MindTouch
Restoring your database
First, you will need to drop the default database:
mysqladmin -udbusername -pdbuserpassword drop db_name;
Recreate the database, and restore the backup by typing the following commands:
# mysql -udbusername -pdbuserpassword mysql> create database wikidb default charset utf8;
Exit mysql, and restore the database by entering the following:
# mysql -udbusername -p db_name < db_name.sql
Note: If you have a multi-tenant installation of MindTouch, you have multiple databases and will need to restore each database separately.
Restoring Service Storage
*Note: This step is deprecated in MindTouch 10.x and newer, and should only be used for version 9.12.3, and below. As of 10.x, notifications are stored within the database.
Run the following commands to restore page notifications:
# mv serviceinfo.tar.gz /var/www/dekiwiki/bin
Then run the following to restore page notifications.
# tar xvzpf serviceinfo.tar.gz
Restoring your attachments
# cd /path/to/deki/; # tar xvzpf attachments.tar.gz # chown -R dekiwiki /var/www/dekiwiki/attachments
If you are running on a MindTouch VMware Virtual Machine then run the following:
# chown -R www-data /var/www/dekiwiki/attachments
Update Config files with wikiuser password
Now that we have migrated over all of the files from the old server we need to change the database value in the /var/www/dekiwiki/LocalSettings.php file and the /etc/dekiwiki/mindtouch.deki.startup.xml file. Below you want to take and replace "password" with the wikiuser password from your old install that you copied at the begining of this tutorial.
LocalSettings.php
$wgDBadminpassword = "password";
mindtouch.deki.startup.xml
<db-password hidden="true">password</db-password>
Update Database
Now change directory to /var/www/dekiwiki/maintenance, and run the following:
# php update-db.php
Rebuild the stored procedures by entering the following command and replacing dbusername and dbuserpassword with your root login credentials:
*Note: This step is deprecated in MindTouch 10.x and newer, and should only be used for version 9.12.3, and below. As of 10.x, notifications are stored within the database.
# cat /var/www/dekiwiki/maintenance/archives/funcs-util.sql | sed -e 's/{$wgDBadminuser}/wikiuser/' | mysql -udbusername -pdbuserpassword wikidb
Finally, restart MindTouch:
# /etc/init.d/dekiwiki restart
Rebuild Search Index
After you have migrated your install you'll need to rebuild the search index. This can be done by going to Control Panel -> Cache Management and then clicking Rebuild Now
Installing Mindtouch
Copied from:
Installing on Ubuntu
Overview
Install MindTouch on Ubuntu using the pre-configured package
Goal
After completing this tutorial you will have successfully installed MindTouch on Ubuntu
Add the MindTouch repository
The following commands should be run as "root" (or as a user with root privileges).
Edit the "/etc/apt/sources.list" file to add the following line (select the version of Ubuntu you are running):
Ubuntu 9.04
deb http://repo.mindtouch.com xUbuntu_9.04/
Ubuntu 9.10
deb http://repo.mindtouch.com xUbuntu_9.10/
Ubuntu 10.04
deb http://repo.mindtouch.com xUbuntu_10.04/
Update Repositories
Type the following command to update your package indexes:
apt-get update
Install dependencies packages
Type the following command to install packages that will enable MindTouch's full functionality:
apt-get install html2ps poppler-utils html2text wv gs tidy links msttcorefonts cabextract mysql-server
Note: Installation of some dependencies may require interaction. Answer "yes" to all authentication/verification questions.
Install PrinceXML
To enable HTML-to-PDF printing, the static library version of PrinceXML must be installed by entering the following commands:
32 bit install
wget http://www.princexml.com/download/prince-8.0-linux-static.tar.gz tar -xzvf prince-8.0-linux-static.tar.gz cd prince-8.0-linux-static sudo ./install.sh
64 bit install
wget http://www.princexml.com/download/prince-8.0-linux-amd64-static.tar.gz tar -xzvf prince-8.0-linux-amd64-static.tar.gz cd prince-8.0-linux-amd64-static sudo ./install.sh
Hit Enter when asked for the install directory location
Install MindTouch
apt-get install mindtouch
Install Trusted Roots Certificates
Install the trusted roots certificates from the Mozilla LXR website into the Mono certificate store by entering the following:
apt-get install mono-devel
Then run the following
su dekiwiki $ mozroots --import --sync $ exit
Configure the Apache Virtual Host
After the install has finished, edit /etc/apache2/sites-available/dekiwiki and change the ServerName to match the URL that you will be entering into the web browser to arrive at your wiki. This will allow the Apache virtual host to direct traffic to MindTouch.
Enter the following command to enable MindTouch in Apache and disable the initial default site:
a2ensite dekiwiki a2dissite default
Once that has been done, enter the following line to reload Apache:
/etc/init.d/apache2 reload
Go to "http://your_server/config/index.php" to complete the configuration.
Web Installer
When you load the IP address for the MindTouch install it will present you with the following web installer where you can click INSTALL next to the MindTouch product you want to install. In this documentation we will be selecting the MindTouch 2010 installation.
Attachments Problems
Proper Permissions
./createdb.sh --dbName wikidb --dbAdminUser root --dbAdminPassword yili --dbServer localhost --dbWikiUser wikiuser --wikiAdmin Admin --wikiAdminPassword windstar --wikiAdminEmail apavel@gmail.com --storageDir /var/www/dekiwiki/attachments
Comments