Configure Linux, servers How to install them?

In this article titled Configure Linux , the user can learn how to execute this activity, he should only get carried away by its easy and understandable content. onfigure linux

Configure Linux

configure linux
configure linux

The management of configuring and installing Linux servers, DNS which stands for Domain Name System, refers to a system of non-specific names for systems, its function is called DNS server, which leads to an IP address selected by the user.

It is a vital process and its objective is to maintain the Internet, it is a fundamental service on the servers.  onfigure linux

From this paragraph on, we inform the user of everything related to the configuration and installation of Linux servers. configure linux

The / etc / hosts file

In configuring Linux servers, you will know the host file belonging to a computer, it is used by the operating system to store information existing between Internet domains and IP addresses, it refers to one of the different methodologies that the operating system uses with the idea of ​​solving domain names, the table known as / etc / hosts, belongs to the files on Linux systems.

In other words, if the user does not have a DNS server, or the DNS server is not available, the / etc / hosts file has the ability to translate IP addresses into names using its own file.

This means that the system consults the file before going to the DNS server, and once the domain is obtained, it can be translated without having to go to a DNS server.

It is achieved by editing as shown below: Then you must go to the browser, type and you can see the results, in the case that you have an Apache server in the system, and the local server is adjusted, so that you can view the index page of the server local, instead of showing the Google page.

Types of servers

configure linux
configure linux

You have the option that you can move to a different IP address found anywhere and observe the result to be sure.

The function of this file is to translate different IP addresses into names, however, on the connected network where the connected server is located.

Domain names

If you visit a website, you must write the FQDN, which means full domain name, or failing that, the domain name like this: or

It must be known that each domain is made up of domain components, and the point is responsible for separating these components.

The text com, refers to the domain component of the top level; Google is the second-level domain component, while www is the third-level domain component.

The truth is that when you visit any website, the browser silently adds a period to the end, it is not visible, so the real domain is shown, it must be borne in mind that the period appears after. com, at this point it is called the root domain.

Many will ask the question, why is this root domain or the point added to it, it is simply because this point is served by the root name servers, there are approximately 13 root name servers around the world, that their function is the brain of the internet.

Top-level domain names (TLD) 

It should be disclosed that Top Level Domains (TLDs) are divided into categories related to geographic or functional elements.

Generic top-level domains such as: org, .com, .net. Edu, among others.

Country code top-level domains, namely: .us, .ca, and many others, belonging to the nation’s codes, in this case the United States and Canada.

The new top-level domains from brands such as: Linux, .Microsoft, .Company Namey.

Infrastructure top-level domains as a domain.


In these cases, once you enter a website, for example, the email is the subdomain of

Only the name servers of, know of the existence of all the hosts that are under it, reason for which Google recognizes in the case that there is or not a subdomain or mail, the name servers they have no idea of ​​this at the root.

Types of DNS servers

In the computing environment, there are three types of DNS servers, such as:

  • Primary DNS servers are those that have the domain’s configuration files and answer DNS queries.
  • Secondary DNS servers are the ones that act as a backup copy and are responsible for distributing the load; the primary servers know that the secondary nameservers exist through which they are sending updates.
  • DNS server caching, the function of these only caches all the responses issued from DNS, so that the primary or secondary DNS server does not have to be queried again.
  • It can be managed for the system to perform activities easily, such as a cached server.

Configuring the Linux DNS server

In the market there are various Linux packages that offer to implement DNS functionality, however, we are going to talk about the BIND DNS server, it is used in most of the DNS servers in all parts of the world.

In the case that the user uses a distribution that is based on Red Hat, such as CentOs, the way to install the package is as follows: $ dnf -y install bind.

In configuring Linux servers, it shows the reader when the installation process is completed, the service can be started and commissioning to run right when it starts: $ systemctl start named; $ systemctl enable named.

 Setting up BIND

configure linux
configure linux

It is disclosed that the configuration of the service can be found in the /etc/named.conf file.

There are certain statements that BIND uses in a file such as:

  • Options: Which is used for the global configuration of BIND.
  • Logging: It can be logged, and it can also be ignored.
  • Zone: It is called the DNS zone.
  • Include: Used to include another file in the named.conf option.
  • You can see from the options statement, the working directory that is offered for BIND being the directory: / var / named.
  • It should be borne in mind that the declaration of the zone allows delimiting a DNS zone, such as the domain, which also has subdomains, the well-known, as well as, in addition from other subdomains.
  • It is important to note that each of these three: the domain and subdomains, has a zone defined by the zone statement.

Defining a primary zone

Once we have known the types of DNS servers that exist such as primary and secondary DNS servers, as well as cache ones.

The primary and secondary servers are considered to be authoritative in their responses, which differs from the caching server.

Now, to delimit a primary zone in the file, the following can be used: zone “” {; type master; file; };

For the users’ knowledge, the file that has the data of the information corresponding to the area where the / var / named directory is located, because it is the working directory where the options are located.

In configuring Linux servers, it indicates that it must be borne in mind that the server software or the hosting panel automatically creates this file with the name, so that if the domain is, the file will be named / var / named /

In the case that the type appears as master, it means that it is in a primary zone.

Definition of a secondary zone configure linux

The definition of a secondary zone is very similar to the so-called primary zone, it only has few modifications, let’s see: zone “” {; type slave; masters Primary Nameserver IP Address Here; ; file and} ;.

The domain in the secondary zones is identical to that of the primary zones, it has to be the slave type, it means that it is a secondary zone, the masters option works to list the different IP addresses of the primary name server, to conclude it is may report that the file is the input path of the primary zone files.

Defining a caching zone

In configuring Linux servers, we show you the definition of cache storage areas, it can be said that this aspect is necessary, however, it should not be fulfilled having a caching area, which helps to minimize the queries made to the DNS server.

  • To define what a caching zone is, three zone sections are required, with the following in the first order:
  • zone “.” IN {type hint; file “root.hint”; } ;.
  • In the first one there is a period, because they are root nameservers, the type shown as: hint ;   means an access in the cache area, while the file “root.hints”; refers to the file that has the root servers.
  • The latest root nameserver can be obtained from

In the second zone it is defined with the file shown below: / etc / named.rfc1912.zones , in addition to having /etc/named.conf, by means of the “include” directive that is inserted by default, such as: configure linux

  • Zone “localhost” IN {type master; file “localhost.db”; } ;.
  • Finally in the third zone the opposite search for the localhost is obtained.
  • Zone “” IN {Type master; File “127.0.0.rev”; }; -.
  • It is important to note that placing these three zones in /etc/named.conf, they help the system to function as a caching DNS server, the information of the files must be written to in the following, localhost .db and 127.0.0.rev.

DNS record types configure linux

The files contained in the database are of record types such as: SOA, NS, A, PTR, MX, CNAME, and TXT.

Next, we dedicate ourselves to mentioning each type of record, we begin with: onfigure linux

SOA: start of authority record cconfigure linux

The SOA record type lists DNS entries for the site with the following: 86400 IN SOA (2017012604; serial 86400; refresh, seconds 7200; retry, seconds 3600000; expire, seconds 86400; minimum, seconds  ).

It can be seen that the first line starts with the domain and ends with a period, it is the same as the zone definition in the /etc/named.conf file.

It should be considered that the files belonging to the DNS configuration are excessively strict.

In this article configuring Linux servers, we show you the following terms: onfigure linux

  • IN stands for Internet registration.
  • SOA, translate start of authority record.
  •, Refers to the domain name server.
  •, it is the email @, it is replaced by a period, and another period is placed to conclude.

In line 2, you have the serial number that is used to announce to the name server the time with which the file is updated, which means that when a modification is made to the zone information, this must be increased. number, refers to the serial number that has the format YYYYMMDDxx placing xx and starting with 00.

Line 3, refers to the frequency with which they are updated in seconds, shows the frequency that the secondary DNS servers must consult the main server, to start a search for updates.

In line 4, it refers to the refund rate in seconds, it is the time it takes for the secondary DNS server after it tries to connect to the primary DNS server, and it cannot reach it.

Line 5, is about the expiration policy, in the event that the secondary server cannot connect to the primary server to execute an update, then, you must cancel the value after the displayed amount of seconds.

Finally, line 6, expresses the caching servers that cannot connect to the primary DNS server, they wait before an entry expires, it is the line in charge of delimiting the waiting time.

NS: Name server records  onfigure linux

These records can be used by the NS server to detail the nameservers for a specific zone, NS records can be written in the following ways:

  • You should not necessarily have 2 NS records, however, it is preferable to have backup nameservers.
  • A and AAAA: Address records.
  • You have to register A, it is in charge of mapping the host name to an IP address: support IN A  In the case that the user has a host at at the IP address, it can be written as in the aforementioned case.

PTR: pointer records onfigure linux

The PTR record is used to perform opposite name resolution, returns an IP address, and returns the host name. It is the complete opposite of what the A register executes; IN PTR in this case, the full host name is placed by placing a full stop.

MX: Mail exchange records  onfigure linux

This type of MX record refers to files on the mail server, like this: IN MX 10 mail, it can be seen that the domain ends with a period, the number 10 means the importance of the mail server, in the case that there are different mail servers, the smaller number means that it has little relevance.

CNAME: Canonical Name Records onfigure linux

The type of CNAME records are those that give direct access to the host names.

For example, it is pointed out being the case that you have a site that has a host name of any element, because the system is a web server, you have the option of creating a www or CNAME record alias for the host.

To create a CNAME record you can use the name

  • whatever-bignameis IN A
  • www IN CNAME whatever-bignameis.

The first line provides information to the DNS server about the location of the alias, while the second line defines the alias that indicates www.

TXT records

Any type of text can be placed in the TXT records, such as contact information or other information that the user wants people to identify when consulting the DNS server.

Likewise, you have the option of using the RP record, to place contact information: IN TXT “YOUR INFO GOES HERE”.

DNS TTL value onfigure linux

In this part /etc/named.conf at the top end there is a $ TTL entry, it is intended to inform BIND about the lifetime of each record.

The value is taken in seconds as 14400 seconds (4 hours) , then the DNS servers cache your zone for up to four hours and then query the DNS server again.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button