Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 4th April 2013, 15:25
darinpeterson darinpeterson is offline
HowtoForge Supporter
 
Join Date: Nov 2011
Posts: 153
Thanks: 35
Thanked 13 Times in 13 Posts
Question Hostname for OpenVZ Containers - Question for Falko

Hi Falko,

In the tutorial The Perfect Server - Debian Squeeze (Debian 6.0) With BIND & Courier [ISPConfig 3], you state that it's important that it's important that after running these commands:

Code:
echo server1.example.com > /etc/hostname
/etc/init.d/hostname.sh start
that both of these commands:

Code:
hostname
hostname -f
show "server1.example.com"

With a virtual container in OpenVZ, it will only show "server1.example.com" immediately after running the commands. After reboot it the "hostname" command only shows "server1", however "hostname -f" shows "server1.example.com" if the --hostname configuration is set in the container.

Is there something that can be set in the container configuration so hostname will show the correct hostname?

Thanks,
Darin
Reply With Quote
Sponsored Links
  #2  
Old 4th April 2013, 15:46
SamTzu SamTzu is offline
HowtoForge Supporter
 
Join Date: Apr 2007
Location: Helsinki
Posts: 426
Thanks: 33
Thanked 54 Times in 37 Posts
Send a message via Skype™ to SamTzu
Default

Only way is to enter the FQDN in the OpenVZ as the VM hostname or manually edit /etc/hostname file and to use chattr +i /etc/hostname.

I recommend the first option.

Normally /etc/hostname should not contain FQDN only the host name but this can be problematic on OpenVZ containers and you might have to manually modify on Postfix config's etc. and add the FQDN later.
__________________

Sami Mattila
Internet-Content

Telephone:
00358942833310
Email: firstname.lastname@internet-content.org
Shop: http://shop.internet-content.net
Site: http://www.internet-content.net
Blog: http://www.internet-content.net/en/blog
FB: https://www.facebook.com/internetcontent


Last edited by SamTzu; 4th April 2013 at 15:50.
Reply With Quote
The Following User Says Thank You to SamTzu For This Useful Post:
darinpeterson (4th April 2013)
  #3  
Old 4th April 2013, 20:36
darinpeterson darinpeterson is offline
HowtoForge Supporter
 
Join Date: Nov 2011
Posts: 153
Thanks: 35
Thanked 13 Times in 13 Posts
 
Default

Hi SamTzu,

Thank you for the reply.

Quote:
Originally Posted by SamTzu View Post
Only way is to enter the FQDN in the OpenVZ as the VM hostname or manually edit /etc/hostname file and to use chattr +i /etc/hostname.
I have already set the hostname for the OpenVZ containers as the FQDN, if this is what you're talking about:

Code:
vzctl set mail --hostname server1.example.com --save
However, this does not solve the problem with the requirement that the command "hostname" producing "server1.example.com".

Quote:
Originally Posted by SamTzu View Post
I recommend the first option.

Normally /etc/hostname should not contain FQDN only the host name but this can be problematic on OpenVZ containers and you might have to manually modify on Postfix config's etc. and add the FQDN later.
If it's not required by ISPConfig, I would rather not change anything that might cause other issues.

If the only reason Falko has asked that the hostname be the FQDN is the concern for a collision of names in ISPConfig, then that would be useful to know. If there are other implications, I would like to know.

If you have more feedback, please provide it.

Regards,
Darin
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with ISPConfig Mail and Squirrelmail m.xander Installation/Configuration 109 3rd February 2012 00:15
Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail -Ubuntu 8.04 c4rdinal HOWTO-Related Questions 112 23rd August 2011 10:49
Odd Spam behaviour itsnedkeren Installation/Configuration 1 11th December 2010 14:20
Being Spammed/Hacked/Probed not sure PLEASE HELP! kresser General 10 29th October 2010 17:25
Can't access to my website - after install problem pallermo Installation/Configuration 18 4th June 2010 13:29


All times are GMT +2. The time now is 15:16.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.