• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Change hostname on Plesk 7.5.3

A

Antal

Guest
Hi all,

I have a RHEL 3 OS with Plesk 7.5.3. running on a VPS system with my provider.

I'm trying to change my hostname to something else. I have tried several directions from forums to change to hostname.

I can change the hostname on all places and everything works fine untill i give a reboot. Everything changes back to the old settings.

Found out that there is a script on Plesk reconfigurator.sh but cannot seem to find it, i can find the script reconfigurator.pl. I ran the script after all changes, but still the same after a reboot. I think this script only is for IP address changes.

Can somebody explain to me how to change the hostname permanently?

Is there a new script in Plesk 7.5.3, or some other method. I even changed the name in the Plesk interface and checked the database for the old name, nothing there!
 
Your provider should be able to change this in about 5 seconds... Shoot them a ticket!
 
If you go to Server -> Server Prefs and change the hostname in there, most of the other settings are then automatically changed.

After doing this, do a
service network restart
(to make the change take effect)

Look at your command prompt: did it change when you restarted the network?

If not, check that /etc/sysconfig/network also contains the correct new hostname, and also that /etc/sysconfig/networking-scripts/ifcfg-eth0 (and any others).

*** If you installed X-Windows when you set up your server, the other place to check for ifcfg-eth0 type files is in /etc/sysconfig/networking/profiles/default (and devices) -- and again make sure all is well.

Note that I use RH9, but I don't see any reason why it should be different in REHL3

Faris.
 
Faris, it's a VPS so the hostname is reset to the value in the Virtuozzo configuration file upon reboot. The only way is to contact the provider to change it permanently I believe.
 
That's the only way I can do it for customers, via the VZMC or VZCC ... I takes seconds to do, it shouldn't be a major request :)
 
Oops. Yes. I Missed the VPS bit didn't I? I need more sleep :)

Faris.
 
I contacted my provider, they said a complete reconfiguration of the VPS is neccesary. All data/domains/settings will be deleted, so they say.

I find this very strange because this seems a very simple thing to change.
 
Dude, they sound like they don't know what they are talking about. You should not have to redeploy a thing... Like i said, it literally takes seconds to make the change on the Hardware Node and i personally have had to do it many times this way :)

You might want to reevaluate your provider as this is very petty; are they going to charge you extra as well??!? :(
 
I may be wrong and there may be other implications to doing this I am not aware of but...

First I want to clarify what is meant by Hardware Node. The Hardware Node you need to log into is not the one displayed in VZCC (the Virtuozzo Web Interface). It is the actual Hardware Node itself (computer, box whatever you want to call it).

After you login, cd (change your directory) to /etc/sysconfig/vz-scripts

Find the config file of the VPS who's hostname you want to change.

I made a backup of the file first (cp command) then went into the file (using vim) and changed the second line:
HOSTNAME="oldHostName" to:
HOSTNAME="newHostName"

I saved the file. When I refreshed the page in VZCC (web interface) the hostname had changed.

Does this do what you need? It worked for me thus far. I still need to see what happens on reboot. If someone with more experience knows or has something to add that would be great. Hopefully this will help someone who may be very new to all this.
Art
 
Back
Top