Results 1 to 21 of 21
-
07-14-2007, 07:04 PM #1Web Hosting Guru
- Join Date
- Feb 2007
- Posts
- 274
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
-
07-14-2007, 10:51 PM #2Web Hosting Evangelist
- Join Date
- Oct 2005
- Posts
- 517
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?
-
07-15-2007, 03:00 AM #3Eternal Member
- Join Date
- Dec 2004
- Location
- New York, NY
- Posts
- 10,710
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.
-
07-15-2007, 07:18 AM #4Web Hosting Guru
- Join Date
- Feb 2007
- Posts
- 274
you could load cpanel or whm normally, it is just to test that it has worked correctly
-
08-09-2007, 09:06 PM #5Newbie
- Join Date
- Aug 2007
- Posts
- 23
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
-
09-21-2007, 09:51 PM #6Newbie
- Join Date
- Sep 2007
- Posts
- 9
Thanks it helped.
Great info,Last edited by SoftWareRevue; 09-21-2007 at 10:44 PM. Reason: posts merged
-
10-06-2007, 12:33 PM #7Web Hosting Guru
- Join Date
- Feb 2007
- Posts
- 274
Glad to be able to help
-
12-23-2007, 05:48 PM #8Newbie
- Join Date
- Dec 2007
- Location
- UK.
- Posts
- 21
Thanks.
LOL thanks mate.. i was kinda struggling with this..
Sam Johan,
Founder - CEO,
PureInsure - Insuring The Hosting Industry.
-
12-25-2007, 04:07 PM #9Temporarily Suspended
- Join Date
- Oct 2007
- Posts
- 112
Easy and well known stuff to do.
-
01-13-2008, 09:57 AM #10Web Hosting Guru
- Join Date
- Feb 2007
- Posts
- 274
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
-
01-13-2008, 04:40 PM #11Junior Guru
- Join Date
- Jul 2004
- Location
- Athens, Greece
- Posts
- 209
/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
-
01-14-2008, 12:51 PM #12Web Hosting Guru
- Join Date
- Feb 2007
- Posts
- 274
I will post how to do this when i have the time
-
04-11-2008, 04:12 PM #13Web Hosting Guru
- Join Date
- Feb 2007
- Posts
- 274
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.
-
04-11-2008, 04:58 PM #14if you want to change the hostname on a cpanel server then
first pico /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:
what is /etc/hosts for
Well, that's answered in the man pages:
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:
/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 goTom Whiting, WHMCS Guru extraordinaire
Linux problems? WHMCS Problems? Give me a shout
Check out my WHMCS Addons
-
04-11-2008, 05:04 PM #15Web Hosting Guru
- Join Date
- Feb 2007
- Posts
- 274
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.
-
04-11-2008, 05:55 PM #16Web Hosting Master
- Join Date
- Jan 2008
- Location
- St. John's, NL
- Posts
- 2,201
Cpanel/WHM • PHP • Perl • Ruby • Full Time Support
LCWSoft - Canada web hosting (based in Newfoundland) since 2007
Servers based in the US and Canada (Uptime Report)
-
04-11-2008, 05:59 PM #17
Back when this was written (IE: before CP11 was stable), there was a strong chance that it would do what the OP was talking about. You'd change the hostname in Cp/WHM and then have to run cpkeyclt . Now, it's a no-brainer, they've setup the script to either automatically run it (possible), or done some other sort of licensing check (possible too). Either way, it did used to be a rather annoying issue that would come up every time the hostname was changed
Tom Whiting, WHMCS Guru extraordinaire
Linux problems? WHMCS Problems? Give me a shout
Check out my WHMCS Addons
-
12-09-2010, 10:47 PM #18Disabled
- Join Date
- Dec 2010
- Posts
- 60
my cpanel doesn't support php-cli and I can't manually install, centos OS. please somebody help me with that
-
12-09-2010, 11:51 PM #19Web Hosting Master
- Join Date
- Mar 2009
- Posts
- 654
[GB ≠ GiB] [MB ≠ MiB] [kB ≠ kiB] [1000 ≠ 1024] [Giga ≠ gram] [Mega ≠ milli] [Kelvin ≠ kilo] [Byte ≠ bit]
There is no millibit. There is no gram-bit. There is no Kelvin-Byte.
-
12-10-2010, 01:11 AM #20Disabled
- Join Date
- Dec 2010
- Posts
- 60
I'm new member can't start new topic so I looking thread under cpanel title, please forgive me
-
12-15-2010, 11:11 AM #21Newbie
- Join Date
- Jul 2010
- Posts
- 8
Thank you...