LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-22-2011, 11:38 PM   #1
dbsput
LQ Newbie
 
Registered: Mar 2009
Posts: 17

Rep: Reputation: 0
How to set-up hostname?


I am trying to install iRedMail on a freshly installed Debian Squeeze server but I am instructed to add a fqdn in order for iRedMail to install.

My /etc/hosts currently looks like:
Code:
127.0.0.1     mail.mydomain.com localhost localhost.localdomain
184.XXX.XXX.XXX     mydomain.com
My /etc/hostname currently looks like
Code:
mail
This is what I best gather from what the tutorial states on this page.

I have tried many combinations and run /etc/init.d/hostname.sh many times but can't seem to get it right.

Can anyone offer a solution?

Edit: I forgot to mention that when I test the set-up with `hostname -f` I receive the error
Code:
hostname: Name or service not known

Last edited by dbsput; 09-22-2011 at 11:48 PM. Reason: Forgotten some info
 
Old 09-23-2011, 12:24 AM   #2
scopiansl
LQ Newbie
 
Registered: Jul 2010
Posts: 23

Rep: Reputation: 1
I'm not a expert on this, but have you tried entering following line in to etc/hosts
Your_server_ip_address(local) server_host_name.domain_name server_host_name
Ex: 192.168.10.20 sapprdsvr.cblf sapprdsvr
also change the 127.0.0.1 mail.mydomain.com localhost localhost.localdomain to 127.0.0.1 localhost

take a backup of current host file before changes.

Also you can change the hostname temporaly using the command hostname.

C. C. Illeperuma
 
Old 09-23-2011, 01:55 AM   #3
zackwasa
Member
 
Registered: Sep 2011
Posts: 52

Rep: Reputation: Disabled
Your hostname needs to be like this:
mail.somedomain.com

This needs to be added to /etc/hostname and to /etc/hosts.

RMI

Last edited by zackwasa; 01-12-2012 at 01:05 AM.
 
Old 09-23-2011, 11:23 PM   #4
dbsput
LQ Newbie
 
Registered: Mar 2009
Posts: 17

Original Poster
Rep: Reputation: 0
Thanks for the replies.

zackwasa's response got it working for me.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to set hostname? cylarz Linux - Networking 5 07-23-2006 02:48 PM
cannot set hostname kpachopoulos Debian 1 02-27-2006 12:13 AM
how to set the hostname? harys Ubuntu 1 02-15-2006 05:35 AM
Set hostname btexpress Linux - Networking 2 06-01-2004 12:03 AM
set hostname allelopath Linux - Software 10 04-30-2003 06:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration