Skip to content

Changing the Server Name

Trey Stafford edited this page Aug 7, 2014 · 4 revisions

In the event that a server's name must be changed, several alterations to the system should be made. It may be a good idea to save a copy of all files/directories altered during this process in case one makes a mistake and must quickly revert to the old configuration. Note that one should also review provisions.sh for where the $serverName variable is used prior to following the steps outlined below.

  • Note: IT should be contacted and consulted on changing the name of the web address for a server if necessary. For instance, one should speak with IT about changing from ops2.cresis.ku.edu to ops.cresis.ku.edu. The below changes are mainly to keep the system internally consistent and are not strictly necessary (one could have IT alter the web address of ops without making any further changes).
  1. Stop services:
service httpd stop
service tomcat6 stop
  1. use the mv command to move /var/www/sites/[current server name]/ to /var/www/sites/[new server name]/

  2. Edit /etc/httpd/conf/httpd.conf and replace the line Include /var/www/sites/[current server name]/conf/ops.conf with Include /var/www/sites/[new server name]/conf/ops.conf

  3. Edit the /var/www/sites/[server name]/conf/ops.conf and replace all instances of the current server's name with the new server's name.

  4. Replace the current server's name in the allowedHosts list defined in /var/www/sites/[server anme/cgi-bin/proxy.cgi

  5. Restart services:

service tomcat6 start
service httpd start
  1. Test that the GeoPortal and OPS Django views work/respond correctly from the web browser and MATLAB (opsTests.m can be run from MATLAB).