hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Web Hosting Talk Tutorials : VPS Tutorials : HOW TO: Change the hostname and not get cpanels licence error
Reply

Forum Jump

HOW TO: Change the hostname and not get cpanels licence error

Reply Post New Thread In VPS Tutorials Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 07-14-2007, 07:04 PM
Ben James Ben James is offline
Web Hosting Guru
 
Join Date: Feb 2007
Posts: 265

HOW TO: Change the hostname and not get cpanels licence error


I have found over the years that it is anoying when you update the hostname on a server running cpanel and cpanel gives you an invalid licence error, if you want to change the hostname on a cpanel server then

1)log into shell with root

2)type "hostname (then at the end put anything you want as your hostname, but it must be something.yourdomain.xxx please be aware that the something will show as the server name in cpanel

3)type /usr/local/cpanel/cpkeyclt

then just load cpanel as you would normaly, but dont forget to add an a entry for the new hostname



Sponsored Links
  #2  
Old 07-14-2007, 10:51 PM
ramdak5000 ramdak5000 is offline
Aspiring Evangelist
 
Join Date: Oct 2005
Posts: 387
Very useful. I have a few VPS accounts whose hostnames I have changed several times to reflect the changes in my business strategy and each time, I had to ask my hosting company to take care of the cPanel licence issue.

When you say, "then just load cpanel as you would normaly", do you actually mean WHM?

  #3  
Old 07-15-2007, 03:00 AM
layer0 layer0 is offline
Performance Specialist
 
Join Date: Dec 2004
Location: New York, NY
Posts: 10,505
If you change hostnames on a Virtuozzo/OpenVZ VPS, you should also ensure that your host has updated the hostname from their side as well...else your hostname will be reset the next time your VPS reboots. There are ways around that too, but its simpler just provide your host with the up to date info.

Sponsored Links
  #4  
Old 07-15-2007, 07:18 AM
Ben James Ben James is offline
Web Hosting Guru
 
Join Date: Feb 2007
Posts: 265
you could load cpanel or whm normally, it is just to test that it has worked correctly

  #5  
Old 08-09-2007, 09:06 PM
ihostq ihostq is offline
Newbie
 
Join Date: Aug 2007
Posts: 22
I have always had this problem. Now, i just type in /usr/local/cpanel/cpkeyclt in command promt, and it works great! No problem at all, as it updates with cpanel.net automatically when you type it.

__________________
- PennFoster Exam Answers pfAnswers.com

  #6  
Old 09-21-2007, 09:51 PM
TGJ_Sean TGJ_Sean is offline
New Member
 
Join Date: Sep 2007
Posts: 1
Thanks it helped.

Great info,


Last edited by SoftWareRevue; 09-21-2007 at 10:44 PM. Reason: posts merged
  #7  
Old 10-06-2007, 12:33 PM
Ben James Ben James is offline
Web Hosting Guru
 
Join Date: Feb 2007
Posts: 265
Glad to be able to help

__________________
Master Reseller Accounts
Shared Hosting
VPS hosting
ToastHosts.com support{at}toasthosts.com

  #8  
Old 12-23-2007, 05:48 PM
Checkers Checkers is offline
Newbie
 
Join Date: Dec 2007
Location: UK.
Posts: 20
Thanks.

LOL thanks mate.. i was kinda struggling with this..

__________________
Sam Johan,
Founder - CEO,
PureInsure - Insuring The Hosting Industry.

  #9  
Old 12-25-2007, 04:07 PM
supportoncall supportoncall is offline
Temporarily Suspended
 
Join Date: Oct 2007
Posts: 106
Easy and well known stuff to do.

  #10  
Old 01-13-2008, 09:57 AM
Ben James Ben James is offline
Web Hosting Guru
 
Join Date: Feb 2007
Posts: 265
it may be easy and well known however some people still dont know this stuff and this sort of forum is the perfect place to learn

__________________
Master Reseller Accounts
Shared Hosting
VPS hosting
ToastHosts.com support{at}toasthosts.com

  #11  
Old 01-13-2008, 04:40 PM
psyxakias psyxakias is offline
Junior Guru
 
Join Date: Jul 2004
Location: Athens, Greece
Posts: 203
/usr/local/cpanel/cpkeyclt re-downloads the license from cPanel's site which is s required if you change mainIP (requires license adjustment from cPanel's side too) or hostname. However, changing hostname with "hostname <new.host.name>" without setting it in O/S's configuration, will be reverted at the next reboot giving you the unlicensed error again.

So there should be another step to change it on the O/S startup configuration (depending the O/S or type of server: dedicated/vps), not just using hostname command

Thank you.

__________________
SharkTECH Internet Services
http://www.sharktech.net
DDOS Firewalled Dedicated Servers
Managed Services / IRC Allowed


  #12  
Old 01-14-2008, 12:51 PM
Ben James Ben James is offline
Web Hosting Guru
 
Join Date: Feb 2007
Posts: 265
I will post how to do this when i have the time

__________________
Master Reseller Accounts
Shared Hosting
VPS hosting
ToastHosts.com support{at}toasthosts.com

  #13  
Old 04-11-2008, 04:12 PM
Ben James Ben James is offline
Web Hosting Guru
 
Join Date: Feb 2007
Posts: 265
ok, sorry it has taken me so long to post the final pice to this thread i have been kind of busy recently.

first pico /etc/hosts

type something similar to

<your server shared ip here> <chosen hostname here>.<your domain here>.<extension>

the below that have

127.0.0.1 localhost


then you can use the hostname command to set your hostname to the same as it is in your /ect/hosts configuration.

__________________
Master Reseller Accounts
Shared Hosting
VPS hosting
ToastHosts.com support{at}toasthosts.com

  #14  
Old 04-11-2008, 04:58 PM
twhiting9275 twhiting9275 is offline
Just me
 
Join Date: Sep 2002
Location: Among the corn
Posts: 10,484
Quote:
if you want to change the hostname on a cpanel server then
Use CPanel to manage cpanel and related materials. Don't make it more complicated than it has to be. WHM no longer gives you a 'license error'.

Quote:
first pico /etc/hosts
/etc/hosts is NOT a valid place to change a hostname, nor is it any sort of relevant place for your system's hostname to be changed. 2 places require changing, but NOT /etc/hosts

#1:
/etc/sysconfig/network needs to be updated
#2:
/proc/sys/kernel/hostname needs to be updated

Now, since you're using Cpanel, it's best to use CPanel to manage Cpanel's things (backups, etc), because otherwise it'll try to rewrite system files (ie: hostname)

This brings us to the question:
Quote:
what is /etc/hosts for

Well, that's answered in the man pages:
Quote:
This file is a simple text file that associates IP addresses with hostnames, one line per IP address. For each host a single line should be present with the following information:
In english (layman's terms):
/etc/hosts is a 'dns' of sorts. It doesn't rely on dns running, the resolvers running, or anything of the like. It is NOT used to control the system's hostname, though it CAN be used to look up the system's hostname. You can add multiple ip host combinations in there and they will ALWAYS be available to the system, REGARDLESS of whether your dns is running or not

The files needed to edit the hostname are listed above, though, again, if you're using a control panel (CPanel), or even a VPS (virtuozzo, etc), you'll want to use THEIR setup to change and manipulate your hostname so that you can be sure it doesn't go right back where you don't want it to go

  #15  
Old 04-11-2008, 05:04 PM
Ben James Ben James is offline
Web Hosting Guru
 
Join Date: Feb 2007
Posts: 265
Thanks for this, i have allways used cpanel to change the hostname so have never had to do it manualy, just update the licence.

Thanks.

__________________
Master Reseller Accounts
Shared Hosting
VPS hosting
ToastHosts.com support{at}toasthosts.com

Reply

Related posts from TheWhir.com
Title Type Date Posted
Admin Error Brings Down Joyent’s Ashburn Data Center Web Hosting News 2014-05-28 10:18:18
Unusual DNS Error Leads to Internet Outage in China Web Hosting News 2014-01-21 12:16:24
Interview: Loaded Commerce CEO Salvatore Iozzia at HostingCon Whir Tv 2014-05-02 14:19:45
Important changes to WHIR Networking Events Europe schedule Blog 2013-04-15 16:00:16
Rackspace Adds Redis as a Service with Exceptional Cloud Services Acquisition Web Hosting News 2013-04-01 10:55:48


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:
WHT Membership
WHT Membership



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?