Author Topic: hostname problem  (Read 185 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
hostname problem
« on: May 16, 2018, 02:26:45 PM »
I have this problem:
Your Hostname is: localhost and it resolves to IP: (ERROR: You don't have a valid hostname set!)

To what and where i must change it?

And how to fix "rDNS/PTR = FAILED, check with your hosting provider!"?
« Last Edit: May 16, 2018, 02:29:00 PM by jeniha »

Offline
*
Re: hostname problem
« Reply #1 on: May 17, 2018, 08:51:52 AM »
Please follow the steps below

#####   Set Hostname & FQDN Permanently     #####

1. Change Hostname Temporary:
-----------------------------

# show current hostname

[root@server1 ~]# hostname
server1.datahead.biz

# change hostname
[root@server1 ~]# hostname server1.datahead.biz

[root@localhost ~]# hostname
server1.datahead.biz



2. Change Hostname Permanently:
-------------------------------
[root@server1 ~]# hostnamectl set-hostname server1.datahead.biz

[root@server1 ~]# hostnamectl
   Static hostname: server1.datahead.biz
         Icon name: computer-vm
           Chassis: vm
        Machine ID: 04ca692cd07d41698530705c118b9b0d
           Boot ID: 1e75261cdccc4fd2a412e9d95cbe5a25
    Virtualization: xen
  Operating System: CentOS Linux 7 (Core)
       CPE OS Name: cpe:/o:centos:centos:7
            Kernel: Linux 3.10.0-693.21.1.el7.x86_64
      Architecture: x86-64


[root@server1 ~]# vi /etc/hostname
server1.datahead.biz

:x

[root@server1 ~]# vi /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
103.56.209.100  server1.datahead.biz    server1

:x


[root@server1 ~]# vi /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=server1.datahead.biz

OR

# Created by anaconda
HOSTNAME="server1.datahead.biz"

:x

rDNS is another issues , fix your hostname first , if you need help regarding dns , please reply .

Offline
*
Re: hostname problem
« Reply #2 on: May 17, 2018, 12:47:34 PM »
What must be the hostname.
Did i need to make subdomain and then make it hostname or ?

Offline
*
Re: hostname problem
« Reply #3 on: May 18, 2018, 08:19:55 AM »
I pointed out my hostname in my domain registrar, didnt create any subdomains.

Offline
*
Re: hostname problem
« Reply #4 on: May 20, 2018, 01:58:01 AM »
What must be the hostname.
Did i need to make subdomain and then make it hostname or ?

A hostname must be a fully qualified domain name, which is your [servername].[domain].[tld] for example if you have a website called mywidgets.com and you want your server to be called shirley then your hostname would be:

shirley.mywidgets.com

The rDNS issue is probably caused by you not having a proper hostname.  Once your proper hostname has been set in linux then you CWP will need to be updated to include this and the rDNS error should go away within 4 - 24 hours.


Offline
*
Re: hostname problem
« Reply #5 on: May 21, 2018, 12:40:14 PM »
this is my problem too, hostname problem same with this post and another problem is dns not resolve.
i am already set permanent hostname. but still not fixed.