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)

Installed DeepOfix Email Server which shows missing operating system on Dell Dimension 2400

After downloading and installing DeepOfix Email Server (including GNU/Linux – Squeeze – Operating System), upon first boot it shows “missing operating system – press any key to reboot” on Dell Dimension 2400 with new 160GB Seagate PATA 100 drive and 2GB RAM.  I installed it 6 times, after wiping the hard drive and removing partitions and building MBR, etc., to no avail.

So, I installed Ubuntu Desktop 12.04.02 on the same hard drive.  It booted on the first try and runs like a charm.

Some type of software driver on the DeepOfix must be lacking.  Before installing the new IDE 100 PATA drive, I first installed DeepOfix on a new 160GB SATA drive attached to a local SATA PCI add-on card, but the installed O/S would not boot.  DeepOfix detected and installed itself to the SATA drive, but, upon first restart, the PCI SATA controller and SATA drive were not supported by this particular linux operating system.

I was really looking forward to using the Easy Push Manager graphical interface on the Mail Server.  Although, I didn’t actually like the idea that the email server came pre-configured with Squirrel Mail web mail rather than Roundcube web mail interface.

I will search for an alternative email server to run on Ubuntu.  Maybe iRedMail open source email server will work.  Stay tuned.

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.

Installing LAMP (Linux – Apache, MySql, PHP) on Ubuntu 12.04.02

This is one way to install Apache2 webserver, MySql database server, and PHP5 web server support, plus PhpMyAdmin, onto Linux Ubuntu server or Ubuntu desktop v. 12.04.02 distribution.

Credit to Kevin Whitman for his excellent youtube tutorial. http://www.youtube.com/watch?v=MrGD2X-sDQY

And credit Kevin Whitman’s Blog articles: See: Part 2  http://kevinwhitman.com/2011/06/27/set-up-a-sandbox-to-test-php-apps-part-2-install-web-server-php-mysql-and-phpmyadmin/

Note:  For windows remote SSH access to your Ubuntu server, you should download and execute PuTTY or similar SSH client for establishing a terminal interface to the Ubuntu server IP address.  You can find and download PuTTY open source from sourceforge.net here: http://sourceforge.net/projects/putty.mirror/ . This article assumes that Ubuntu server or Desktop version 12.04.02 (32 bit or 64 bit) is already installed as your server.

Installing Apache Webserver on Ubuntu:

root ~> apt-get install apache2 (Enter)
(answer Y(es) to download the installation package and install it.)

Installing MySQL on Ubuntu:

root ~> apt-get install mysql-server
(you should setup a MySQL ‘root’ password when prompted.  Write it down so you won’t forget the password for ‘root.’)

Install PHP on Ubuntu:

apt-get install php5 php5-gd php-pear php5-mysql php5-curl php5-memcache

Y(es) to download etc.

Restart the Apache web server after installing PHP:

root ~> /etc/init.d/apache2 restart (Enter)

Test Your PHP and Apache installation:

Create a php information file called “testinfo.php” to test PHP and Apache.

at the default /var/www/ directory, and the testinfo.php file should have only the following one line of content:

<?php phpinfo() ?>

Create this testinfo.php file using a text editor.  Access it from http://the_server_IP_address/testinfo.php

Install PHPMYADMIN

root~> apt-get install phpmyadmin

select apache

configure the database root password

Copy the phpmyconf file (configuration file) over

ls –s /etc/phpmyadmin/apache.conf /etc/apache2/conf.d/phpmyadmin.conf

Then restart apache web server 

/etc/init.d/apache2 restart

So, now phpmyadmin will come up in the browser http://Server_IP_address/phpmyadmin

Login to phpMyadmin with the username:  root
and the password you established