Moving NATS3

From TMMwiki
Jump to: navigation, search
NATS 3
Setup
Apache Configuration
MySQL Settings
Creating Admin Accounts
File Upload Setup
Link Domain
NATS3 Files and Directories
NATS Go Live Checklist
Moving NATS3


We at Too Much Media offer the service of moving your NATS installation to a new server; this can be done for a cost of $195. We recommend you use this service.

The following steps describe moving NATS on your own. If you perform a server move on your own, there will be an hourly charge for any support required. The rate for support is $120/hr

Note: these steps require some down time, but they guarantee database consistency and consistent service during the DNS switch-over.
Note: if you just want to change your NATS domain, please see the PROJECT_HOSTNAME configuration setting.

Please verify that the server to which you are moving NATS 3 meets the NATS 3 Requirements.

Please check the following wiki for mysql setup: NATS4_MySQL_Settings

- MySQL must also be accessible from the CLI, which may require changes to the my.cnf file

- Ensure that NO_UNSIGNED_SUBTRACTION is enabled

Set up NATS on the New Server

  • Copy the NATS files to the new server. You can use the program rsync
  • Please be sure to check to make sure all the correct symbolic links are set up in the nats/www/ directory. These symbolic links should be:
track
ttrack
ptrack
gtrack
strack
import_videos
gallery
  • If any of these symbolic links are not available or not set up correctly in your nats/www/ directory, please put in a support ticket
  • Get a NATS license for your new server. Please open a new ticket and tell us with the zendid if you are using Zend, or the MAC address if you are using IonCube
  • If you have Zend, you may need to set up the path to the zend license in the php.ini by adding the following line:
zend_optimizer.license_path=/path to nats/licenses/
  • Change the paths in the includes/config.php and includes/run_mailer_now.sh files to be correct on the new server.
    • Please make sure that the php mail function or the mail function that you are trying to use is working.
      • If you do use the Mailing Admin, you can test a mailer by going to the Mailing admin and click on the magnifying glass to view a Pending mail and click on the link that says "Click here to send a test of this mailing to yourself".
      • If you are using the emails for affiliates or members, please do signup and once the initial transaction has been processed, the member and affiliate should get the email.
  • Change the MySQL connection information for the includes/config.php file on the new server so it can connect to the database on the original server. Test that NATS is working correctly using the IP address of the new server
  • If you're including helper.php (located in includes/helper.php in NATS) in one of your pages, you'll need to update the include of header.php to the path on the new server.

At this point, NATS should work correctly on both servers and will use the database on the original server.

Moving the Database to the New Server

Your NATS program will be down during these steps.

  • Shut down the database on the original server. This makes NATS stop working.
  • Copy the database to the new server.
  • Change the config.php file on the new server to use the new database and check that nats is working correctly.
  • Change the config.php file on the original server to connect to the new server's database.

At this point, NATS should work correctly on both servers and will use the database on the new server.

If you use the NATS database for authentication, please ensure that you change your authentication to use the new database. Then test signing in to make sure everything is working properly.

Set up Crons and Billers

  • Remove the NATS cron from the old server
  • Set up a new cron on the new server; use the correct paths to nats and php:
*/15 * * * * cd /<nats_installation_dir>/www/signup; /path/to/php cronjobs.php;

Billers

  • Tell your billers about your new IP address
  • If you are using Epoch please have your host setup a new user on the new database and setup the following grants for the following tables:
grant insert, select on <database>.EpochTransStats to <username>@'<IP Address Range>' identified by '<password>';
grant insert, select on <database>.MemberCancelStats to <username>@'<IP Address Range>' identified by '<password>';
flush privileges;
  • If you are using WTS, please tell them the new path to the work directory it should be: /<path to nats>/nats/work

Additional Updates to config.php

If you perform internal cross sales you will need to update the config.php/config_override.php file to use the IP address of the new server

  • Update all XSELL_<biller>_SECURE_IPS variables to include the IP of the new server
  • Remove the old servers IP address from all XSELL_<biller>_SECURE_IPS

Switch the DNS

  • Have your host switch the DNS name to the new server.

note: please ensure your linkdomains are also changed to point at the new server. If the linkdomains are still pointing at the old server, your linkcodes and join forms will not work.

  • Please open a new ticket when the DNS change is complete so we can update your NATS license.