Category Archives: Uncategorized

Setting Fully Qualified Domain Name (FQDN) in Ubuntu

In Ubuntu, open a terminal window.  Log into terminal as your username.  Enter your password when requested.  Switch to the root super user as follows:

sudo -s (enter)
input your password when requested (enter)

Change to the /etc directory as follows:

cd /etc

The ‘hostname’ file will contain your short hostname, such as mx1.

Check the current hostname by entering the hostname command, and the hostname might be something like ‘mx1’ — as follows:

hostname (enter)
mx1

Your fully qualified domain hostname should be something like mx1.yourdomain.com.  Check the current FQDN hostname with the -f option, as follows:

hostname -f (enter)
mx1

The ‘hosts’ file should be edited to insert your FQDN as well.  Using the PICO text editor, open the hosts file to be edited as follows:

pico hosts (enter)

Change the second line of the hosts file from this:
127.0.0.1    localhost
127.0.1.1     mx1

To this:
127.0.0.1    localhost
127.0.1.1     mx1.yourdomain.com     mx1

Then save the hosts file as follows:
CTRL+X
(y)es
hosts (enter)

Now check the fully qualified domain hostname, as follows:

hostname -f (enter)
mx1.yourdomain.com

Check the hostname, which should still be ‘mx1’

hostnamemx1

Escape from the terminal window:

Exit (enter)

Exit (enter)

An article by Patrick J. Waters about Webmin and Virtualmin

His article is entitled:  My favorite web server setup, Ubuntu Server, LAMP, Webmin, and Virtualmin

patrick — Wed, 07/13/2011 – 20:33

It contains step-by-step instructions for installing Ubuntu with the LAMP options plus Webmin and Virtualmin.

Patrick’s introductory paragraph explains, “Over the past few years I have experimented with different web server setups. I have found that the combination Ubuntu,  LAMP (Linux, Apache, Mysql, and PHP), Webmin, and finally Virtualmin provide many advantages in my day to day workflow as a web developer. This setup provides me with an easy to use and easy to maintain web server that lessens the time spent configuring the server and increases my time programming. Here are my step by step instructions for setting up my favorite server configuration.”

My commentary:  I found Patrick’s well written and well organized article because I was searching for a graphical interface for managing the configuration of Apache, PHP, MySQL, DNS services, and IMAP/SMTP email, on my Ubuntu server 12.04.02 O/S.  On my Ubuntu server, I have installed the open source ZPanel from the Zpanel script, which installation seems good so far for setting up domain users, hosting their domains, ftp, databases, and webmail.  However, it lacks the ability to access and manage the configuration files without me having to manually search for their paths on the server’s file system.  In this regard, the Zpanel documentation and forum support seems a bit scant.  And, I do not know whether ZPanel automatically installs various services to different directories than the default directories that would have been established if I had installed LAMP as selected options during the Ubuntu server installation.  Due to this concern of mine, I remain reluctant to install Webmin and Virtmin unless they actually search the file system or otherwise locate and identify the exact location of the relevant configuration files to be managed.