How to Set your Hostname
Ok...here is the easy way to change your hostname...this
script has been tested on Plesk 2/5/6, Ensim/Pro, Plain Redhat, and even cPanel
servers...but should work on most any redhat linux cp.
***Please note....it is advisable to ensure that your choosen hostname resolves to your server before continuing
Entries in BOLD are what you type.
1) login to your server via ssh
2) su -
3) wget http://ezsm.net/hostname.sh
5) sh hostname.sh
6) answer the questions
7) done.
***Note::: If you are running a plesk server, you will also be
running the plesk reconfigurator....below is an example of the output
you will see:
Key Points:
1) use a valid email address
2) make sure it shows the correct hostname (should after you ran
my script)
3) pick the right ip# for namebased hosting.
4) the parts in BOLD are what you type
PSA is ready for reconfiguration.
Please note that PSA utilizes your version file to verify
that you are performing a correct software reconfiguration.
Do you really want to proceed? [N] Y
Checking whether this Linux uses shadow passwords... Ok
Now you will be asked several questions.
Don't worry about mistakes.
Script will give you the chance later to correct any input.
It's necessary to know e-mail address of Plesk administrator
Please don't use mail address of the root on this system,
this is one restriction of Qmail system
Enter psa administrator e-mail address: youremail@yourdomain.com
youremail@yourdomain.com
Enter full hostname of this machine [sub.domain.com]: <ENTER>
sub.domain.com
Enter domain name [domain.com]:<ENTER>
domain.com
Host's networks interface(s) has(ve) the next assigned IP addresses:
1) main server ip
2) ip 2
3) ip 3
4) ip 4
5) ip5
Which one IP would you like to use for name-based virtual hosting?
[1]1
Do you want to start Plesk after reconfiguration? [Y] y
===> Admin e-mail : youremail@yourdomain.com
===> Hostname : sub
===> Domain name : domain.com
===> Full name : sub.domain.com
===> Name-based IP : ip#
===> You want to start Plesk after reconfiguration.
Guessing that all above information is correct.
Is this correct? [Y] Y
<cut...bunch of stuff here..just look for errors>
Trying to start Plesk server...
Reconfiguration process is complete.
For more information see /tmp/psa_5.0.5_RedHat_7.2_build030207.16_reconfiguration.log.
You can access Plesk Server Manager via URL:
https://yourdomain:8443/
or
https://yourmainip:8443/
**This script is a use at your own risk script designed
by NightHawk**
|