Linux Server Setup: Part 2 - Domains, Networking, and Software

Updated: August 09, 2010

Server Host Name

While human beings are quite comfortable using words to identify objects, places, people, and animals, computers primarily rely on numbers. Your computer's primary identification of itself is a series of numbers. Likewise, a server informs other servers of its name using a series of numbers collectively called an IP address.

It is necessary to have at least one IP address assigned to a server in order for it to communicate with the rest of the Internet. Dedicated IP addresses are assigned by Internet Service Providers, so you should already know what your IP address is. The next step is to assign a hostname.

In Linux, the hostname is normally the computer name that was assigned during installation. It was probably not a fully qualified domain name, but in order for anyone to reach the server with words, rather than numbers, a domain must be assigned.

The hostname that you assign will be the primary domain of the server, so although you can assign additional domains, choose the primary one carefully. To check the current hostname, simply type "hostname" from the command line.

To edit the current hostname, login as root and edit /etc/hosts. By default, the hosts file will have the localhost address listed:

127.0.0.1 localhost

You should add an additional line containing your IP address followed by the domain name:

  1. 192.168.254.254 mydomain.tld

Once you reboot the server, the hostname settings should take effect.

DNS and Nameservers

One of the issues you must consider with your new server is whether or not you want to handle your own DNS and Nameservers. As a general Internet standard, your nameservers should be hosted on at least two different servers in different physical locations. This prevents your server from going completely offline if one of the nameserver hosts experiences an outage.

There are services that can host nameservers for reasonable fees. Furthermore, many dedicated server companies will offer nameservers as part of their setup.

The actual nameserver settings are found in /etc/resolv.conf and should look something like this:

search mydomain.tld

nameserver 192.168.1.100

nameserver 192.168.1.102

To test your current nameserver configuration, run nslookup:

nslookup mydomain.tld

Linux servers can also manage DNS using a program called Bind (also referred to as nameD). Configuring Bind manually can be quite a task, but most hosting control panels allow you to configure DNS settings more easily. The important issue to consider with DNS is whether your Linux distribution runs nameD as a generic DNS user or in a full chroot environment. Running DNS in a chroot setting provides some added security, so you might want to consider it, even if it is not the default setting. Depending on which one the distribution uses, the DNS settings will vary. Consult your documentation for more information.

Any user with an account on your server will need to point their domain to your nameservers and configure their DNS to use your IP addresses. As with your primary domain, any hosted domains should also have at least two nameservers.

Software

Without the right software, a server is still just an Internet-connected computer. A server needs software to connect to the various components of the Internet (i.e. the Web, Email, and FTP). Depending on your needs, you may or may not decide to enable access to certain aspects of the Internet. For example, if the server will primarily function as a dedicated gaming server, running email services is undoubtedly superfluous.

The following are common software applications that most dedicated servers will run:

1. Web Server. Nearly all dedicated servers connected to the Internet are also connected to the Web. Common Linux web server software includes Apache HTTP Server, NginX, and Lighttpd.

2. Mail Server. Although many email users are migrating to cloud computing services, plenty still rely on their hosts' mail servers. Common mail services are Sendmail and Postfix.

3. FTP Server. Files transferred to and from a server are primarily sent via FTP (File Transfer Protocol). Common FTP applications include ProFTPD and vsftpd.

4. SSH Server. Secure Shell (SSH) uses an encryption method to make communication between the server and a client computer more secure. SSH can also be used to secure other services, such as FTP, by way of SFTP. The most common SSH server is OpenSSH.

5. Database Server. In the world of dynamic web sites, most data is now stored in some type of database, rather than within HTML files. Popular database servers are MySQL and PostgreSQL. Some high-end servers also use database software that do not require services, such as SQLite.

Related Categories
Featured Research
  • Baselining Best Practices

    IT must ensure new applications are rolled out quickly, reliably, and without risk, while at the same time guaranteeing performance and availability. Read this VirtualWisdom white paper to find out how to achieve application-aligned infrastructure performance, and more. more

  • Next Generation End User Experience Management: APM

    In an era of new technologies and cloud-based application delivery models, your business success depends on your ability to ensure optimal application performance and quality user experiences at all times. This complimentary white paper from AppNeta will enlighten you to the new frontiers in end user experience management and much more. more

  • Video: Create an Integrated, Collaborative Microsoft Lync Environment

    Consider HP as your Microsoft Lync Solutions provider! more

  • Optimizing Application Delivery to the Network Edge

    Increasingly, the success of business is being tied to the network. The transformation of the network and IT can help organizations deliver and support highly available applications and services while reacting more quickly to changes in the business environment. In this complimentary white paper from IDC, learn how HP can help its customers and partners improve the overall application experience. more

  • Networking Routers Buyer's Guide for SMB & Enterprise

    This buyer's guide presents an overview of leading products on the market today and aims to improve research for companies needing to purchase or upgrade their equipment. more