Académique Documents
Professionnel Documents
Culture Documents
BY
NEHASHARMA (100321026)
NOIDA
FEB, 2011
DECLARATION
I hereby declare that this submission is my own work and that, to the best of my
knowledge and belief, it contains no material previously published or written by another
person nor material which to a substantial extent has been accepted for the award of any
other degree or diploma of the university or other institute of higher learning, except
where due acknowledgment has been made in the text.
Signature
Date
CERTIFICATE
This is to certify that Project Report entitled”LINUX SERVER ROLE IN SMALL SCALE
COMPANY” which is submitted by Ankush Nath Saxena, Mohit Popli, Neha Sharma in partial
fulfillment of the requirement for the award of PG Diploma in Department of System and
Database Administration of CDAC, Noida, is a record of the candidate own work carried out by
him under my/our supervision. The matter embodied in this thesis is original and has not been
submitted for the award of any other diploma.
It gives us a great sense of pleasure to present the report of the PG Diploma Project undertaken
during February 2011. We owe special debt of gratitude to Mrs.Priyanka Sharma, Department
of Electronics & Instrumentation Engineering, Meerut for his constant support and guidance
throughout the course of our work. His sincerity, thoroughness and perseverance have been a
constant source of inspiration for us. It is only his cognizant efforts that our endeavors have seen
light of the day.
We also do not like to miss the opportunity to acknowledge the contribution of all faculty
members of the department for their kind assistance and cooperation during the development of
our project. Last but not the least, we acknowledge our friends for their contribution in the
completion of the project.
Signature:
Date :
INDEX
• OBJECTIVE
• DNS SERVER
• DHCP
• FTP
OBJECTIVE
The main objective of this project is to configure DNS & Apache Web Server
using Red Hat at Linux Operating System as working environment. User interact
with their mail server that using MUA (Squirrel Mail) ,MTA (Sendmail/Postfix)
that uses POP or IMAP to download their messages to their local machine which
is used in company. DHCP service is configured to assign automatic IP address to
the entire host in the company on the server system.
DNS SERVER
DNS
Domain Name System (or Service or Server), is an Internet service that translates Domain
Names into IP addresses. Because domain name are alphabetic, they're easier to remember. The
Internet however, is really based on IP addresses. Every time you use a domain name, therefore,
a DNS service must translate the name into the corresponding IP address. For example, the
domain name www.example.com might translate to 198.105.232.4.
Even the visa versa is also what DNS does, i.e. it translates IP address to Domain Name, for
example when we receive a website with its domain address shown in the address bar, actually
DNS does the work of the converting the address back to the domain name.
The DNS system is, in fact, its own network. If one DNS server doesn't know how to translate a
particular domain name, it asks another one, and so on, until the correct IP address is returned.
DNS Server
Name servers
The Domain Name System is maintained by a distributed database system, which uses the client-
server model. The nodes of this database are the name servers. Each domain has at least one
authoritative DNS server that publishes information about that domain and the name servers of
any domains subordinate to it. The top of the hierarchy is served by the root nameservers, the
servers to query when looking up (resolving) a top level domain name.
Introduction
Domain Name System (DNS) converts the name of a Web site (www.google.com) to an IP
address (66.102.7.104). This step is important, because the IP address of a Web site's server, not
the Web site's name, is used in routing traffic over the Internet. This chapter will explain how to
configure your own DNS server to help guide Web surfers to your site.
DNS Domains
Everyone in the world has a first name and a last, or family, name. The same thing is true in the
DNS world: A family of Web sites can be loosely described a domain. For example, the domain
google.com has a number of children, such as www.google.com and mail.google.com for the
Web and mail servers, respectively.
BIND
BIND is an acronym for the Berkeley Internet Name Domain project, which is a group that
maintains the DNS-related software suite that runs under Linux. The most well known program
in BIND is named, the daemon that responds to DNS queries from remote machines.
DNS Clients
A DNS client doesn't store DNS information; it must always refer to a DNS server to get it. The
only DNS configuration file for a DNS client is the /etc/resolv.conf file, which defines the IP
address of the DNS server it should use.
Authoritative servers provide the definitive information for your DNS domain, such as the names
of servers and Web sites in it. They are the last word in information related to your domain.
There are 13 root authoritative DNS servers (super duper authorities) that all DNS servers query
first. These root servers know all the authoritative DNS servers for all the main domains -
.com, .net, and the rest. This layer of servers keeps track of all the DNS servers that Web site
systems administrators have assigned for their sub domains.
For example, when you register your domain my-site.com, you are actually inserting a record on
the .com DNS servers that point to the authoritative DNS servers you assigned for your domain.
NameServer 192.168.1.3
Now use Dig Command to check pgdsda.com and the result should be all 4 steps.
Apache Web Server
Introduction
Apache is probably the most popular Linux-based Web server application in use. Once you have
DNS correctly setup, you'll need to configure Apache to accept surfers wanting to access your
Web site.
HTTPD package's filename httpd-2.2.P3-9.i386.rpm. and its devel package name is httpd-devel-
2.3-13.To install http package name through rpm installation method the command used is “ rpm
-ivh httpd-2.2.P3-9.i386.rpm “ .If YUM is used to install the package then command used to
install is “yum install httpd”
Use the following to start apache service any time in the configuration
process.
What is DHCP?
Dynamic Host Configuration Protocol (DHCP) is a network protocol that enables a server to
automatically assign an IP address to a computer from a defined range of numbers (i.e., a scope)
configured for a given network.
3. The router directs the DISCOVER packet to the correct DHCP server.
4. The server receives the DISCOVER packet. Based on availability and usage policies set
on the server, the server determines an appropriate address (if any) to give to the client.
The server then temporarily reserves that address for the client and sends back to the
client an OFFER (or DHCPOFFER) packet, with that address information. The server
also configures the client's DNS servers, WINS servers, NTP servers, and sometimes
other services as well.
5. The client sends a REQUEST (or DHCPREQUEST) packet, letting the server know that
it intends to use the address.
6. The server sends an ACK (or DHCPACK) packet, confirming that the client has been
given a lease on the address for a server-specified period of time.
When a computer uses a static IP address, it means that the computer is manually configured to
use a specific IP address. One problem with static assignment, which can result from user error
or inattention to detail, occurs when two computers are configured with the same IP address.
This creates a conflict that results in loss of service. Using DHCP to dynamically assign IP
addresses minimizes these conflicts.
DHCP Server Configuration for Red Hat Linux
Step 1
Used #rpm –ivh dhcpd* so that all the serviced related to dhcpd are automatically installed.
Step 2
Step 3
Step 4
Edit /etc/dhcpd.conf according to the number of host that needs to be assigned IP address.
ddns-update-style interim;
ignore client-updates;
# option netbios-node-type 2;
Step 5
Firstly restarted the DHCP service i.e. service dhcpd restart so that all the changes done in the
file get acknowledged.
Now to check which host system are using which IP address can be easily done by looking at a
particular lease file.
Checked that the lease database has been created; the rpm should create this file automatically; if
not, create the file:
# touch /var/lib/dhcp/dhcpd.leases
To view the lease file:
#vi /var/lib/dhcp/dhcpd.leases
In this file the all the details related to client host IP address assigned , MAC address and
hostname is saved.
Reservation in DHCP
Reservation is used in DHCP so that client system gets same IP address assigned by the server
system every time any request for an IP address.
Thus same IP address gets assigned to a particular host which is fixed in the dhcpd.conf by
entering the information about the MAC address of the host system in the file.
Original Line
host ns {
next-server marvin.redhat.com;
hardware ethernet 12:34:56:78:AB:CD;
fixed-address 207.175.42.254;
}
pgdsda {
host pgdsda;
fixed-address 192.168.1.15;
Thus a host with MAC address 70-71-BC-29-58-48 gets the IP address 192.168.1.15 only.
FILE TRANSFER PROTOCOL
File Transfer Protocol (FTP) is a standard network protocol used to copy a file from one host to
another over a TCP-based network, such as the Internet. FTP is built on client-server architecture
and utilizes separate control and data connections between the client and server. FTP users may
authenticate themselves using a clear-text sign-in protocol but can connect anonymously if the
server is configured to allow it.
The first FTP client applications were interactive command-line tools, implementing standard
commands and syntax. Graphical user interface clients have since been developed for many of
the popular desktop operating systems in use today.
FTP Overview
FTP relies on a pair of TCP ports to get the job done. It operates in two connection channels as
I'll explain:
FTP Control Channel, TCP Port 21: All commands you send and the ftp server's responses to
those commands will go over the control connection, but any data sent back (such as "ls"
directory lists or actual file data in either direction) will go over the data connection.
FTP Data Channel, TCP Port 20: This port is used for all subsequent data transfers between
the client and server.
Types of FTP:
1. Active FTP
2. Passive FTP
From a networking perspective, the two main types of FTP are active and passive. In active FTP,
the FTP server initiates a data transfer connection back to the client. For passive FTP, the
connection is initiated from the FTP client.
FTP Configuration
Installing Packages
The rpm package to be installed for ftp is vsftpd. To install this package Yum is used
Dependencies Resolved
=====================================================================
Package Arch Version Repository Size
=====================================================================
========
Installing:
vsftpd i386 2.0.5-10.el5 rhel.repo 137 k
Transaction Summary
=====================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
/var/ftp/pub/
Here copy all those files and folders that the system admin wants its users on host system can
access the files easily.
To start, stop, and restart vsftpd after booting use the service command:
To determine whether vsftpd is running you can issue either of these two commands. The first
will give a status message. The second will return the process ID numbers of the vsftpd daemons.
To restrict FTP access to certain users adds the users to the list of users in the /etc/vsftpd.ftpusers
file. The VSFTPD package creates this file with a number of entries for privileged users that
normally shouldn't have FTP access. As FTP doesn't encrypt passwords, thereby increasing the
risk of data or passwords being compromised, it is a good idea to let these entries remain and add
new entries for additional security.
At Client Side
Add the following web address into the Web browser to view and download ftp files
hosted at server system.
ftp://192.168.1.3/
It contains all the rpm packages needed for various services. Even the location
/www/var/pub is default location for YUM conf.
BIBLOGRAPHY
Following Web Sites
For DNS
http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch18_:_Configuring_
DNS
For DHCP
http://kb.iu.edu/data/adov.html
http://www.linuxselfhelp.com/quick/dhcp.html
For FTP
http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch15_:_Linux_FTP_
Server_Setup
http://en.wikipedia.org/wiki/Mail_user_agent
http://en.wikipedia.org/wiki/Mail_delivery_agent
http://searchsoa.techtarget.com/definition/mail-server
Following Books
1. Red Hat Enterprise Linux Essentials (RH033)