I have a procedure that can be used to migrate your current MantisBT 1.0.8 installation from one server to a virtual machine running MantisBT 1.2.11.
Please let me know if there are errors in this procedure.
Please TEST this procedure before using it for a LIVE, PRODUCTION implementation.
This procedure has the following assumptions:
1. The latest version of the Oracle VirtualBOX is used (although any recent hypervisor will do);
2. The FileZilla SFTP client is the preferred method of uploading files to the virtual host;
3. The Desktop PC is running Microsoft Windows 7 or greater;
4. The Desktop PC current user has permission to install software;
5. The target virtual host will be built using the Turnkey LAMP appliance;
6. The target virtual host will be hosted on a hypervisor that will be accessible;
7. The Apache web server base WWW directory is “/var/www/”; and
8. The MySQL 5.x DBMS is the database environment on the current host.
The password “yourMantisDatabasePassword” needs to be changed to your sites preferred password.
Materials (based on using Oracle VirtualBOX):
1. Turnkey Linux LAMP Virtual Appliance: “turnkey-lamp-11.3-lucid-x86”
2. 10 GB Free Hard Drive Space
3. 384 MB RAM
4. Bridged Network Adapter
5. Disabled USB Controller
6. Disabled absolute pointing device
7. FileZilla SecureFTP Software
Steps:
1. Download and install the tools to complete the implementation.
a. FileZilla:
http://downloads.sourceforge.net/projec ... ror=aarnet
b. Turnkey Linux LAMP installation CD: turnkey-lamp-11.3-lucid-x86.iso:
http://www.turnkeylinux.org/download?fi ... id-x86.iso
2. Build the virtual host and install the base server environment:
a. Define the virtual host with 384 MB ram and a 8 GB hard drive
b. Set the CD to use the “turnkey-lamp-11.3-lucid-x86.iso” and ensure it will boot from the CD when there is no bootable hard drive partition.
c. At the “Turnkey” boot screen, select “Install to hard disk”.
d. At the “Debian Installer Live” screen, select “Guided – use entire disk”.
e. At the “Debian Installer Live” screen, select “Yes” for the “Write the changes to disks” prompt.
f. At the “Debian Installer Live” screen, select “Yes” for the “Install the GRUB boot loader to the master boot record” prompt.
g. At the “Debian Installer Live” screen, select “Yes” for the “Would you like to restart now” prompt.
3. Configure the OS via the First Boot Configuration:
a. Enter “yourMantisDatabasePassword” as the “root” password at the “Please enter a new password for the root account” prompt.
b. Enter “yourMantisDatabasePassword” as the “root” password at the “Confirm password” prompt.
c. Enter “yourMantisDatabasePassword” as the “root” password at the “Please enter a new password for the MySQL ‘root’ account” prompt.
d. Enter “yourMantisDatabasePassword” as the “root” password at the “Confirm password” prompt.
e. Enter “yourMantisDatabasePassword” as the “root” password at the “Enter new password for the Mantis ‘admin’ account” prompt.
f. Enter “yourMantisDatabasePassword” as the “root” password at the “Confirm password” prompt.
g. Select “Skip” at the “Initialize Hub Services” screen.
h. Select “Skip” at the “Security updates” screen to prevent downloading 150 MB of patches.
i. At the “LAMP appliance services” screen, take note of the following details:
• Web: http://HOST_IP/ and https://HOST_IP/
• Web Shell: https://HOST_IP:12320/
• Webmin: https://HOST_IP:12321/
• PHPMyAdmin: https://HOST_IP:12322/
• SSH/SFTP: root@HOST_IP (port 22)
j. The appliance is ready for use.
k. It is recommended that a static IP address and a hostname is assigned by the your network administrator in the network’s DNS.
4. Prepare MantisBT installation package
a. Upload MantisBT installation package, “mantisbt-1.2.11.zip”, to root@HOST_IP:/root/installs/mantisbt/, using Secure FTP. FileZilla is the preferred program.
b. Login to the Web Shell as “root”.
c. Use the command “(cd /var/www && unzip ~root/installs/mantisbt /mantisbt-1.2.11.zip && mv mantisbt-1.2.11 mantis)”.
d. Create the “/var/www/mantis/config_inc.php” file by copying the “config_inc.php” from the current MantisBT environment.
e. Modify the “/var/www/mantis/config_inc.php” file by updating the following variables to reflect the new host:
$g_hostname = 'localhost';
$g_db_type = 'mysql';
$g_database_name = 'mantis';
$g_db_username = 'root';
$g_db_password = 'yourMantisDatabasePassword';
5. Create empty MantisBT database:
a. Login to the Web Shell as “root”.
b. Use the command “(echo "CREATE DATABASE mantis\\g" | mysql --user="root" --password="yourMantisDatabasePassword")”
6. Backup the MantisBT database on your current host and upload the backup file from the current host to the new host at /root/installs/mantisbt/ as Z_MANTIS_DB_BKP.SQL
7. Restore the “Z_MANTIS_DB_BKP.SQL” into the new host's “mantis” database using the command “(mysql --user="root" --password="yourMantisDatabasePassword" mantis < installs/mantisbt/Z_MANTIS_DB_BKP.SQL)”
8. Run the MantisBT installation package
a. Through your web browser, go to http://HOST_IP/mantis/admin/install.php.
b. At Installation Options, if prompted:
• Set “Type of Database” to “MySQL (default)”
• Set “Hostname (for Database Server)” to “localhost”
• Set “Username (for Database)” to “root”
• Set “Password (for Database)” to “yourMantisDatabasePassword”
• Set “Database name (for Database)” to “mantis”
• Set “Admin Username (to create Database if required)” to “root”
• Set “Admin Password (to create Database if required)” to “yourMantisDatabasePassword”
• Enable “Print SQL Queries instead of Writing to the Database”
• Click “Install/Upgrade Database”.
• Manually create the “/var/www/mantis/config_inc.php” based on the instructions provided to create it.
• Backup the “/var/www/mantis/admin/schema.php” file.
c. Upgrade the database schema
• Again, through your web browser, go to http://HOST_IP/mantis/admin/install.php, and Click “Install/Upgrade Database”.
• The MantisBT forum post, “Migrating and upgrading Mantis”,
http://www.mantisbt.org/forums/viewtopi ... =2&t=10830, was referred to determine the database schema upgrade procedure.
• For each “CREATE TABLE” error, update the “/var/www/mantis/admin/schema.php” file by changing “CreateTableSQL” to “ChangeTableSQL” for that table and click “Retry”. The table for this upgrade from 1.08 to 1.2.10 are:
• “mantis_email_table”
• “mantis_tag_table”
• “mantis_bug_tag_table”
• For each “ALTER TABLE ADD INDEX” error, disable that statement.
• For the prompt “Install was successful”, click “Continue”.
9. Your new MantisBT installation should be operational.