Page 1 of 1

Change Hostname Problem

Posted: Sat Feb 07, 2015 4:29 pm
by jeepou
Hi all,

Sorry to disturb here, on a fresh VestaCP install, I have a little problem with the command:

v-change-sys-hostname mail.domain.com

it's return me a "v-change-sys-hostname: command not found"

Is there any solution about that? or other manual way to change the hostname?

Thank you so much.

Re: Change Hostname Problem

Posted: Sat Feb 07, 2015 6:08 pm
by joem
jeepou wrote:Hi all,

Sorry to disturb here, on a fresh VestaCP install, I have a little problem with the command:

v-change-sys-hostname mail.domain.com

it's return me a "v-change-sys-hostname: command not found"

Is there any solution about that? or other manual way to change the hostname?

Thank you so much.

Code: Select all

hostname mail.domain.com

Re: Change Hostname Problem

Posted: Sun Feb 08, 2015 1:17 am
by skurudo
jeepou wrote:Hi all, v-change-sys-hostname mail.domain.com
it's return me a "v-change-sys-hostname: command not found"
Is there any solution about that? or other manual way to change the hostname?
/usr/local/vesta/bin/v-change-sys-hostname mail.domain.com

?

Re: Change Hostname Problem

Posted: Sun Feb 08, 2015 12:48 pm
by jeepou
Thank you skurudo! It's work now!

Re: Change Hostname Problem

Posted: Mon Jan 14, 2019 9:42 am
by realjumy
My problem is that the command works, but it doesn't persist after rebooting. Is anyone else experiencing the same issue?

Re: Change Hostname Problem

Posted: Wed Feb 06, 2019 8:26 am
by MAN5
Haha.
My assumption ..
This could be your ubuntu updated to 16.04. By default Ununtu16.04 BIN path directory have to do some changes.

http://linuxbsdos.com/2017/06/28/how-to ... your-path/

Re: Change Hostname Problem

Posted: Wed Feb 06, 2019 5:15 pm
by fasttrackhost
You must make diferrence betwen:
1. your server hostname
2. vestacp configuration of your server ip and hostname

To change your server hostname you should use:

sudo hostnamectl set-hostname newhostname.yourdomain.com

change "newhostname.yourdomain.com" by relevant data. You should use a fully qualified domain name as in example and not only "yourdmain.com" as your server hostname. This will persist for ever, even after reboot.

On the other hand if you want to change the new hostname or ip you must do as Skurudo wrote above (/usr/local/vesta) and check that everything realy changed in Vestacp (because i had to it once and some files have to be edited by hand, there is no automatic way). You must go in several .config file in "/etc/user/config/web -or- dns" (replace user with your vestacp admin user: normally "admin") and in "/usr/local/vesta"

Re: Change Hostname Problem

Posted: Fri Apr 12, 2019 3:54 am
by mukunda
v-change-sys-hostname mail.domain.com
Данная команда у меня заработала после перезагрузки сервера (если после установки vestacp перезагрузку не делали, то и эта команда тоже не будет работать: /usr/local/vesta/bin/v-change-sys-hostname mail.domain.com).