Difference between revisions of "Moving NATS4"

From TMM Wiki
Jump to navigationJump to search
 
(37 intermediate revisions by 10 users not shown)
Line 3: Line 3:
 
}}
 
}}
  
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 $300. If you would like your server to be moved by TMM techs, please [http://clients.toomuchmedia.com submit a support ticket]. Although we recommend that you use this service, we also offer instructions for moving your [[NATS]] installation by yourself.
+
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 $215. If you would like your server to be moved by TMM techs, please [http://clients.toomuchmedia.com submit a support ticket]. Although we recommend that you use this service, we also offer instructions for moving your [[NATS]] installation by yourself.
  
The following instructions describe how to move NATS on your own. <b>Although you can forgo our service fee by doing it yourself, please keep in mind that there will be an hourly charge for any support required during this process.  The rate of support is $120/hr</b>
+
The following instructions describe how to move NATS on your own. <b>Although you can forgo our service fee by doing it yourself, please keep in mind that there will be an hourly charge for any support required during this process.  The rate of support is $150/hr</b>
  
 
'''Note''': These steps require some down time, but they will guarantee database consistency, as well as consistent service during the DNS switch-over.
 
'''Note''': These steps require some down time, but they will guarantee database consistency, as well as consistent service during the DNS switch-over.
Line 13: Line 13:
 
'''Before starting your server move:'''
 
'''Before starting your server move:'''
 
*Make sure you meet all of the [[NATS4 Requirements|Requirements]].
 
*Make sure you meet all of the [[NATS4 Requirements|Requirements]].
*If you use any [[NATS4 Geo-Targeting Cascades|Targeting]] or Exclude [[NATS4 Rules|Rules]] in your Biller [[NATS Cascades|Cascades]], you need to test the Maxmind [[GeoIP]] software. Please see our [[GeoIP]] wiki article for more information on how to test GeoIP.
+
*If you use any [[NATS4 Geo-Targeting Cascades|Targeting]] or Exclude [[NATS4 Rules|Rules]] in your Biller [[NATS Cascades|Cascades]], you need to test the Maxmind [[GeoIP]] software.  
 
+
** Please see our [[GeoIP]] wiki article for more information on how to test GeoIP.
 
+
** Please see our [[GeoIP2]] wiki article for more information on how to test GeoIP2.
<b>Please refer to the following wiki article for MySQL setup:</b> [http://wiki.toomuchmedia.com/index.php/NATS4_MySQL_Settings NATS4_MySQL_Settings]
+
*<b>Please refer to the following wiki article for MySQL setup:</b> [http://wiki.toomuchmedia.com/index.php/NATS4_MySQL_Settings NATS4_MySQL_Settings]
  
 
*MySQL must also be accessible from the CLI, which may require changes to the my.cnf file
 
*MySQL must also be accessible from the CLI, which may require changes to the my.cnf file
 
*Ensure that NO_UNSIGNED_SUBTRACTION is enabled
 
*Ensure that NO_UNSIGNED_SUBTRACTION is enabled
 
*Make sure InnoDB engine is supported with MySQL. Run: "show engines;" to check.
 
*Make sure InnoDB engine is supported with MySQL. Run: "show engines;" to check.
 
+
* Copy all NATS files to your NEW server. You can use the program ''rsync'' to facilitate the process.
 
 
* Copy all NATS files to your new server. You can use the program ''rsync'' to facilitate the process.
 
 
* '''Please be sure to check to make sure all the correct symbolic links (symlinks) are set up in your nats/www/ directory.  These symbolic links should be:'''
 
* '''Please be sure to check to make sure all the correct symbolic links (symlinks) are set up in your nats/www/ directory.  These symbolic links should be:'''
 
<pre>track
 
<pre>track
Line 34: Line 32:
 
</pre>
 
</pre>
 
* '''If any of these symbolic links are not available or not set up correctly in your nats/www/ directory, please [http://clients.toomuchmedia.com put in a support ticket]'''
 
* '''If any of these symbolic links are not available or not set up correctly in your nats/www/ directory, please [http://clients.toomuchmedia.com put in a support ticket]'''
* Get a NATS license for your new server. Please [http://clients.toomuchmedia.com open a new ticket] and tell us your zendid if you are using Zend, or the MAC address if you are using IonCube.
+
* Get a NATS license for your NEW server. Please [http://clients.toomuchmedia.com open a new ticket] and tell us the MAC address of the new server.
* If you have Zend, you may need to set up the path to the zend license in your php.ini file by adding the following line:
+
* Change the paths in the ''includes/config.php'' file to be correct on the NEW server.
 
+
** ''$config['PROJECT_ROOT']'' needs to be the location of the nats directory (including trailing slash). Ex: /home/foo/nats/
<pre>
+
** ''$config['BANNER_ROOT']''is usually the path to the ''banners'' directory in the nats directory (including trailing slash). Ex: /home/foo/nats/banners/
zend_optimizer.license_path=/path to nats/licenses/
+
** ''$config['WORKDIR']''is usually the path to the ''work'' directory in the nats directory (including trailing slash). Ex: /home/foo/nats/work/
</pre>
+
** ''$config['PATH_TO_*']'' config settings need to modified if the specific programs in config name is located in different directory. Ex: tar program can be located in /usr/bin/tar instead of /bin/tar
 +
* Change the MySQL connection information for the ''includes/config.php'' file on the NEW server so it can connect to the database on the OLD server, then test that NATS is working correctly by using the IP address of the NEW server.
  
* Change the paths in the ''includes/config.php'' file to be correct on the new server.
+
At this point, NATS should work correctly on both servers and will use the database on the OLD server.
* 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, then test that NATS is working correctly by using the IP address of 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 ==
 
== Moving the Database to the New Server ==
 
'''Your NATS program will be down during these steps.'''
 
'''Your NATS program will be down during these steps.'''
  
* Shut down the database on your original server. This will make NATS stop working for the time being.
+
* Shut down the database on your OLD server. This will make NATS stop working for the time being.
 +
* '''On the OLD server, remove the NATS cronjobs for the installation you are moving'''
 +
** There will be two cron entries you will need to remove.  Here is an example of what the entries will look like:
 +
<pre>
 +
*/15 * * * * cd /<nats_installation_dir>/processes; /path/to/php nats_cron.php;
 +
*/3 * * * * cd /<nats_installation_dir>/processes; /path/to/php run_mail_queue.php;
 +
</pre>
 
* Copy the database to your server.
 
* Copy the database to your server.
* Change the config.php file on your new server to use the new database and check that NATS is working correctly.
+
** Please ensure the TRIGGER settings under the nats database user got transferred over from OLD database to NEW database.  If the database user/host has changed from the OLD database to the NEW database, you may need to re-create the triggers with the correct user and host.
* Change the config.php file on your original server to connect to the new server's database.
+
* Change the config.php file on your NEW server to use the NEW database and check that NATS is working correctly.
 
+
* Change the config.php file on your OLD 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.
 
+
* '''On the NEW server, add the NATS cronjobs for the installation'''
Please ensure the TRIGGER settings under the nats database user got transferred over from old database to new database.  If the database user/host has changed from the old database to the new database, you may need to re-create the triggers with the correct user and host.
+
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 ==
 
== Set up Crons and Billers ==
* Remove the NATS cron from the old server
+
===Cron===
* Set up a new cron on the new server; use the correct paths to nats and php:
+
* On the NEW server, set up the cron entries  using the correct paths to NATS and php:
 
 
 
<pre>
 
<pre>
 
*/15 * * * * cd /<nats_installation_dir>/processes; /path/to/php nats_cron.php;
 
*/15 * * * * cd /<nats_installation_dir>/processes; /path/to/php nats_cron.php;
 
*/3 * * * * cd /<nats_installation_dir>/processes; /path/to/php run_mail_queue.php;
 
*/3 * * * * cd /<nats_installation_dir>/processes; /path/to/php run_mail_queue.php;
 
</pre>
 
</pre>
 
 
*Please make sure that the php mail function or the mail function that you are trying to use is working.  
 
*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 go to the Active Mailing and click on the gear to send a test email to yourself.
+
**If you use the Mailing Admin, you can test a mailer by going to the Mailing admin and go to the Active Mailing and click on the gear to send a test email to yourself.
 
**If you are using the emails for affiliates and/or members, please do signup and once the initial transaction has been processed, the member and/or affiliate should get the email.
 
**If you are using the emails for affiliates and/or members, please do signup and once the initial transaction has been processed, the member and/or affiliate should get the email.
  
 
===Biller===
 
===Biller===
 
* Tell your billers about your new IP address.  This is necessary for your polls to run.
 
* Tell your billers about your new IP address.  This is necessary for your polls to run.
* 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:
+
* 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:
 
<pre>grant insert, select on <database>.EpochTransStats to <username>@'<IP Address Range>' identified by '<password>';
 
<pre>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>';
 
grant insert, select on <database>.MemberCancelStats to <username>@'<IP Address Range>' identified by '<password>';
 
flush privileges;</pre>
 
flush privileges;</pre>
* For more information, please see [http://wiki.toomuchmedia.com/index.php/NATS4_Epoch#Set_up_DataPlus|Epoch's page]
+
* For more information on Epoch's setup, please see the [http://wiki.toomuchmedia.com/index.php/NATS4_Epoch#Set_up_DataPlus Instructions]
 
* If you are using WTS, please let them know of the new work directory. It should be /<path to nats>/nats/work
 
* If you are using WTS, please let them know of the new work directory. It should be /<path to nats>/nats/work
 +
* If you are using CCBill, you need to update the IP for [http://wiki.toomuchmedia.com/index.php/NATS4_CCBill#Set_up_Datalink Datalink].
 +
* If you are sending cross sales, please make sure to inform the receiving NATS install and have them update their cross sell allowed IP's
 +
* If you are using Centrobill, please ensure they whitelist your new server IP for Centrobill's ip_list.php to work properly
 +
 +
== Additional Updates to config.php ==
 +
<font color='red'>'''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'''</font>
 +
* 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
 +
* If you have MEMCACHE set up, make sure that you set it up in the new location or disable it entirely.
 +
* If you are using NATS API, update ADMIN_API_ALLOWED_IPS with new IP(s) and remove old servers IP
  
 
== Switch the DNS ==
 
== Switch the DNS ==
*  Have your host switch the DNS name to the new server.  
+
*  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.
+
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.
  
 
== After the DNS switch ==
 
== After the DNS switch ==
*  Ensure all NATS domains are pointing to the new server including all of your linkdomains.
+
'''Ensure all NATS domains are pointing to the NEW server including all of your linkdomains.'''
*  Ensure the Cron is off on the old server.
+
*  Ensure the crons are turned off on the OLD server.
*  Turn off the database connection on the old server.
+
*  Turn off the connection to the NEW database on the OLD server.
 
*  Please [http://clients.toomuchmedia.com open a new ticket] so we can update your NATS license.
 
*  Please [http://clients.toomuchmedia.com open a new ticket] so we can update your NATS license.
 +
<font color='red'>'''If your database username has changed, please [http://clients.toomuchmedia.com open a new ticket] with us so we can update your trigger details'''</font>
  
 
+
===Additional Notes===
 +
*  We recommend running a test through all of your billers
 +
*  Make sure your authentication is working by logging in to your members area after a new signup
 +
*  Make sure that the PHP version of ChartDirector appropriate to your OS and its fonts directory is installed in the PHP Extensions directory.
 
[[Category:NATS4 Setup]]
 
[[Category:NATS4 Setup]]

Latest revision as of 16:42, 25 July 2024

NATS 4
NATS Setup
Post-Installation Steps
Apache Configuration
MySQL Settings
Creating Admin Accounts
Multiple Server Setup
Using Memcached for Caching
File Upload Setup
Link Domain
HTTPS Setup
NATS4 Files and Directories
NATS4 Go Live Checklist
NATS3 to NATS4 Going Live Checklist
Moving NATS4
Members Admin
The Members Admin
View Member Details
Add Member
MySQL Auth
Mod Authn DB
Multisite Access
Member Logging
Member Password Retrieval
OpenID Connect
Mod Auth OpenIDC
ID Numbers

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 $215. If you would like your server to be moved by TMM techs, please submit a support ticket. Although we recommend that you use this service, we also offer instructions for moving your NATS installation by yourself.

The following instructions describe how to move NATS on your own. Although you can forgo our service fee by doing it yourself, please keep in mind that there will be an hourly charge for any support required during this process. The rate of support is $150/hr

Note: These steps require some down time, but they will guarantee database consistency, as well as consistent service during the DNS switch-over.

Setting up NATS on the New Server

Before starting your server move:

  • Make sure you meet all of the Requirements.
  • If you use any Targeting or Exclude Rules in your Biller Cascades, you need to test the Maxmind GeoIP software.
    • Please see our GeoIP wiki article for more information on how to test GeoIP.
    • Please see our GeoIP2 wiki article for more information on how to test GeoIP2.
  • Please refer to the following wiki article 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
  • Make sure InnoDB engine is supported with MySQL. Run: "show engines;" to check.
  • Copy all NATS files to your NEW server. You can use the program rsync to facilitate the process.
  • Please be sure to check to make sure all the correct symbolic links (symlinks) are set up in your nats/www/ directory. These symbolic links should be:
track
strack
qtrack
ttrack
gallery
banner
include
  • 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 the MAC address of the new server.
  • Change the paths in the includes/config.php file to be correct on the NEW server.
    • $config['PROJECT_ROOT'] needs to be the location of the nats directory (including trailing slash). Ex: /home/foo/nats/
    • $config['BANNER_ROOT']is usually the path to the banners directory in the nats directory (including trailing slash). Ex: /home/foo/nats/banners/
    • $config['WORKDIR']is usually the path to the work directory in the nats directory (including trailing slash). Ex: /home/foo/nats/work/
    • $config['PATH_TO_*'] config settings need to modified if the specific programs in config name is located in different directory. Ex: tar program can be located in /usr/bin/tar instead of /bin/tar
  • Change the MySQL connection information for the includes/config.php file on the NEW server so it can connect to the database on the OLD server, then test that NATS is working correctly by using the IP address of the NEW server.

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

Moving the Database to the New Server

Your NATS program will be down during these steps.

  • Shut down the database on your OLD server. This will make NATS stop working for the time being.
  • On the OLD server, remove the NATS cronjobs for the installation you are moving
    • There will be two cron entries you will need to remove. Here is an example of what the entries will look like:
*/15 * * * * cd /<nats_installation_dir>/processes; /path/to/php nats_cron.php;
*/3 * * * * cd /<nats_installation_dir>/processes; /path/to/php run_mail_queue.php;
  • Copy the database to your server.
    • Please ensure the TRIGGER settings under the nats database user got transferred over from OLD database to NEW database. If the database user/host has changed from the OLD database to the NEW database, you may need to re-create the triggers with the correct user and host.
  • Change the config.php file on your NEW server to use the NEW database and check that NATS is working correctly.
  • Change the config.php file on your OLD server to connect to the NEW server's database.
  • 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.
  • On the NEW server, add the NATS cronjobs for the installation

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

Set up Crons and Billers

Cron

  • On the NEW server, set up the cron entries using the correct paths to NATS and php:
*/15 * * * * cd /<nats_installation_dir>/processes; /path/to/php nats_cron.php;
*/3 * * * * cd /<nats_installation_dir>/processes; /path/to/php run_mail_queue.php;
  • Please make sure that the php mail function or the mail function that you are trying to use is working.
    • If you use the Mailing Admin, you can test a mailer by going to the Mailing admin and go to the Active Mailing and click on the gear to send a test email to yourself.
    • If you are using the emails for affiliates and/or members, please do signup and once the initial transaction has been processed, the member and/or affiliate should get the email.

Biller

  • Tell your billers about your new IP address. This is necessary for your polls to run.
  • 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;
  • For more information on Epoch's setup, please see the Instructions
  • If you are using WTS, please let them know of the new work directory. It should be /<path to nats>/nats/work
  • If you are using CCBill, you need to update the IP for Datalink.
  • If you are sending cross sales, please make sure to inform the receiving NATS install and have them update their cross sell allowed IP's
  • If you are using Centrobill, please ensure they whitelist your new server IP for Centrobill's ip_list.php to work properly

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
  • If you have MEMCACHE set up, make sure that you set it up in the new location or disable it entirely.
  • If you are using NATS API, update ADMIN_API_ALLOWED_IPS with new IP(s) and remove old servers IP

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.

After the DNS switch

  • Ensure all NATS domains are pointing to the NEW server including all of your linkdomains.
  • Ensure the crons are turned off on the OLD server.
  • Turn off the connection to the NEW database on the OLD server.
  • Please open a new ticket so we can update your NATS license.

If your database username has changed, please open a new ticket with us so we can update your trigger details

Additional Notes

  • We recommend running a test through all of your billers
  • Make sure your authentication is working by logging in to your members area after a new signup
  • Make sure that the PHP version of ChartDirector appropriate to your OS and its fonts directory is installed in the PHP Extensions directory.