Set hostname

Set host name on Centos:

/etc/sysconfig/network

 

HOSTNAME="mycomputer"


/etc/hosts wrote:

127.0.0.1 mycomputer.mydomain.local mycomputer

 

check it with

hostname 
hostname --fqdn
hostname -a

 

Was this answer helpful?

 Print this Article

Also Read

DDoS

Diagnostic To display how many http connections are open at the moment, enter: netstat |...

Generating public/private ssh keys

How to generate and use public / private ssh keys This guide is tested on Centos 6 To...

Forward (redirect/nat) traffic with iptables

If you want to redirect/nat some traffic to IP 2.2.2.2 via IP 1.1.1.1, it simply can be done...

Iptables

Iptables is a Linux based packet filtering firewall. It is a service (daemon)...

Mysql

Installing mysql: yum install mysql-server Enter to mysql: mysql -u user -p password...