E
E
Evgeny Matveev2019-01-07 14:29:49
CentOS
Evgeny Matveev, 2019-01-07 14:29:49

How to permanently change hostname, centos7?

I tried all the commands known to me, it returns on reboot.
The essence of the problem:
I install the program, swears at the hostname:
Startup error: Error: host name "pasys" is not fully qualified, please configure 'host-name' and/or 'domain-suffix'.
I check hostname - displays pasys (the program needs pasys.ru)
tried to change:
hostname pasys.ru
hostnamectl set-hostname pasys.ru manually
changed /etc/hosts and /etc/sysconfig/network
found command scarletctl disable set-hostname - ban on change when I reboot - I enter it gives an error -bash: scarletctl: command not found
I understand the problem in this. How can I prevent the hostname from changing on reboot?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Movchan, 2019-01-07
@Alexander1705

/etc/hostname

E
Evgeniy Matveev, 2019-01-07
@raebg

this is how chattr +i /etc/hostname helped

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question