linux pathshala

4
Table of Contents Chapter 1: Introduction ------------------------------------------------------------1 1.1 Linux………………………………………………………….......……………2 1.2 Red Hat Linux………………………………………………….......…………..2 1.3 Features of Red Hat Linux……………………………………........…………...3 Chapter 2: Installing Red Hat Linux ---------------------------------------------5 2.1 Linux Installation………………………………………………........………….6 Chapter 3: System Administration ----------------------------------------------12 3.1 The initialization Process and Startup Scripts…………………...........………...13 3.2 Administrative Commands…………………………………….........…………17 3.3 Managing Software with RPM………………………………….........………..18 3.4 Managing Users and Groups…………………………………........…………..24 Chapter 4: Network Interface Check and IP Setup 4.1 Checking Network Interface. 4.2 Configure Single Interface 4.3 Configure Multiple Interface 4.4 IP aliasing 4.5 Disable/Enable Network Interface. 4.6 Changing MAC address in Linux. & Windows 4.7 Checking network connection status Chapter 5: Server Configuration--------------------------------------------------28 5.1 Telnet ------------------------------------------------------------------------ 136 5.1.1 Configuring the Telnet server………………………………......................….138 5.1.2 Logging into & Logging out a Telnet server…………………..........................139 5.2 SSH ----------------------------------------------------------------------- 5.2.1 Introduction……………………………………………………. 5.2.2 Configuration…………………………………………………… 5.2.3 Use SCP over SSHD……………………………………………. 5.3 GATEWAY & Firewall 5.3.1 Configure all interface………………………………………… 5.3.2 Nonresistant IP forwarding…………………………………… 5.3.3 Persistent IP forwarding……………………………………… 5.3.4 NATING……………………………………………………… 5.3.5 Static Route………………………………………………….. 5.3.6 Firewall with iptables……………………………………….. 5.4 DNS ---------------------------------------------------------.----------------29 5.4.1 Introduction…………………………………………….......................……30 5.4.2 Configure Caching Only DNS……………………………..…...............…...32

Upload: jewelbd

Post on 07-Apr-2015

350 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Linux Pathshala

Table of Contents

Chapter 1: Introduction ------------------------------------------------------------1

1.1 Linux………………………………………………………….......……………21.2 Red Hat Linux………………………………………………….......…………..21.3 Features of Red Hat Linux……………………………………........…………...3

Chapter 2: Installing Red Hat Linux ---------------------------------------------5

2.1 Linux Installation………………………………………………........………….6

Chapter 3: System Administration ----------------------------------------------12

3.1 The initialization Process and Startup Scripts…………………...........………...133.2 Administrative Commands…………………………………….........…………173.3 Managing Software with RPM………………………………….........………..183.4 Managing Users and Groups…………………………………........…………..24

Chapter 4: Network Interface Check and IP Setup

4.1 Checking Network Interface.4.2 Configure Single Interface4.3 Configure Multiple Interface4.4 IP aliasing 4.5 Disable/Enable Network Interface.4.6 Changing MAC address in Linux. & Windows4.7 Checking network connection status

Chapter 5: Server Configuration--------------------------------------------------28

5.1 Telnet ------------------------------------------------------------------------ 136

5.1.1 Configuring the Telnet server………………………………......................….1385.1.2 Logging into & Logging out a Telnet server…………………..........................139

5.2 SSH -----------------------------------------------------------------------5.2.1 Introduction…………………………………………………….5.2.2 Configuration……………………………………………………5.2.3 Use SCP over SSHD…………………………………………….

5.3 GATEWAY & Firewall

5.3.1 Configure all interface…………………………………………5.3.2 Nonresistant IP forwarding……………………………………5.3.3 Persistent IP forwarding………………………………………5.3.4 NATING………………………………………………………5.3.5 Static Route…………………………………………………..5.3.6 Firewall with iptables………………………………………..

5.4 DNS ---------------------------------------------------------.----------------29

5.4.1 Introduction…………………………………………….......................……305.4.2 Configure Caching Only DNS……………………………..…...............…...32

Page 2: Linux Pathshala

5.4.3 Configure Primary DNS……………………………………................…….5.4.4 Configure Secondary DNS…………………………………................…….5.4.5 Configure Virtual Domain…………………………………...................…….5.4.6 Configure Sub Domain……………………………………....................……

5.5 DHCP-------------------------------------------------------------------------45

5.5.1 Introduction…………………………………………...…...........……465.5.2 Objective of DHCP………………………………………...…............……465.5.3 Working principal of DHCP ………………………………...................…...465.5.4 Configuration DHCP Server……………………………………..5.5.5 Installing DHCP Using RPM Commands … … … …....................................475.5.6 Starting DHCP Server … … … … … ..................................................……495.5.7 Configuring Linux based DHCP Client ………….......................................…505.5.8 Configuring Windows based DHCP Client … … ……...................................51

5.6 NFS ---------------------------------------------------------...----------------53

5.6.1 Introduction………………………………………………....……................545.6.2 Setting up an NFS Server…………………………………...……................545.6.3 Getting the service started … … … … …......................................................605.6.4 Verifying the NFS is running … … … … …...................................................615.6.5 Setting up an NFS client … … … ......................................................… …..62

5.7 SAMBA … … … …. … … … ….................................................................65

5.7.1 Introduction to Samba … … …………...........................................................665.7.2 Function of samba … … … ….................................................... ……………665.7.3 An overview of the samba distribution … ………......................................….675.7.4 Samba package installation … … … ……............................................……..685.7.5 Configuring samba Server … ...............................................… … ……….....695.7.6 Setting up Windows client … … … ……..............................................…….755.7.7 Accessing samba server … … ……......................................................... …..855.7.8 Accessing Windows client from samba server … …......................................865.7.9 The smbpasswd command … … ………. .............................................…….86

5.8 FTP ---------------------------------------------------------..----------------------------88

5.8.1 Introduction to FTP … … … ………………........................................……..895.8.2 Attributes of FTP sever … … ………....................................................…….895.8.3 Installing FTP Server … … … ……………….......................................……905.8.4 Configuring FTP users … … … ………….....................................................905.8.5 Testing FTP Server … …...................................... …. ……..……………….955.8.6 Controlling FTP Access ... … …………....................................................….96

5.9 Proxy --------------------------------------------------------------------------99

5.9.1 Introduction to Proxy … … … … ….................................. ............………..1005.9.2 System requirement to run squid … … ….................................................…1015.9.3 Installing squid using RPM Command …….. …… .....................................1015.9.4 Squid configuration … …. … … … ….........................................................1015.9.5 Running Squid … … … …………………..5.9.6 Configuring a Transparent Proxy ………................………...………………107

Page 3: Linux Pathshala

5.9.7 Client/Browser Configuration ……………………...................…….………1075.9.8 Peer Cache Servers and Squid Hierarchy …………...................…………...112

5.10 Web server------------------------------------------------------------------116

5.10.1 Introduction ……………............................................................................1175.10.2 History of Apache …………………….….................................................1175.10.3 Installing Apache………………………………………................…….....1185.10.4 The Apache Layout………………………….............................................1185.10.5 Configuring apache ……………………………………................……….1195.10.7 Configuring Virtual Hosts………………………………....................…….1225.10.8 Testing the Virtual Hosts ………………………….....................................123

4.11 Mail Server ---------------------------------------------------------------------------124

Send Mail

5.11.1 Introduction……………………………………………...............………..1255.11.2 Setting up the send mail………………………………….................….......1255.11.3 Testing the send mail…………………………………….................……...127

POP3 & IMAP

5.11.4 Introduction……………………………………………................……….1285.11.5 Setting up the POP3 & IMAP..…………………………................………1295.11.6 Testing the POP3 & IMAP ……………………………................…….…1305.11.7 Configure Email account Outlook & Eudora ………………….

Web mail

5.11.8 Introduction5.11.9 Configure Squirelmail 5.11.10 Configure Uebimiau

Qmail

5.11.11 Install & Configure Qmail5.11.12 Install & Configure Spamassain in qmail5.11.13 Install & Configure Antivirus in qmail

5.12 PPP Server-------------------------------------------------------------------131

5.12.1 Introduction…………………………………………….................………1325.12.2 Linux setup (Server)…………………………………….................….......1325.12.3 Windows setup (Client)………………………….......................................1355.12.4 Testing PPP……………………………………………...............…….…135

5.13 Bandwidth Manager:

5.13.1 Configure BW manager with HTB5.13.2 BW Monitoring Tools

MRTG:

Page 4: Linux Pathshala

5.13.3 Introduction 5.13.4 SNMP Setup 5.13.5 Create MRTG for Linux Client5.13.6 Creating MRTG fro Manageable Switch

iftop, iptraf, tcptrack etc.

5.13.7 Client Monitoring Tools 5.13.8 Nagios Configure