Installing RHEL 6.x from beginning to end using PXE and Kickstart

Similar documents
DKTCOMEGA AONode Management Module User Documentation

Parallels Cloud Server 6.0

SUSE Linux Enterprise Server 11 SP2 for UEFI Clients

Table 1-1. PXE Server Side Requirements

Building a diskless Linux Cluster for high performance computations from a standard Linux distribution

pp=pod number, xxx=static IP address assigned to your pod

Procedure to Create and Duplicate Master LiveUSB Stick

50.XXX is based on your station number

MODULE 1. INSTALLING SUSE LINUX ENTERPRISE SERVER 1. BASIC NOTIONS ON INSTALLATION PROCEDURES

Linux Networking Basics

THE HONG KONG POLYTECHNIC UNIVERSITY Department of Electronic and Information Engineering

Cork Institute of Technology Master of Science in Computing in Education National Framework of Qualifications Level 9

Setting up a Linux PXE server and integrating clients

Installing Virtual Coordinator (VC) in Linux Systems that use RPM (Red Hat, Fedora, CentOS) Document # 15807A1-103 Date: Aug 06, 2012

Setting up your K12LTSP or LTSP loadbalancing

KAREL UCAP DNS AND DHCP CONCEPTS MANUAL MADE BY: KAREL ELEKTRONIK SANAYI ve TICARET A.S. Organize Sanayi Gazneliler Caddesi 10

Install Cacti Network Monitoring Tool on CentOS 6.4 / RHEL 6.4 / Scientific Linux 6.4

Virtuozzo 7 Installation Using PXE

Deskpool Quick Start. Version: V2.1.x. Based on Hyper-V Server 2012 R2. Shenzhen Jieyun Technology Co., Ltd (

Redhat 6.2 Installation Howto -Basic Proxy and Transparent

How to Create, Setup, and Configure an Ubuntu Router with a Transparent Proxy.

Setting up a Raspberry Pi as a WiFi access point

How To Set Up A Network Map In Linux On A Ubuntu 2.5 (Amd64) On A Raspberry Mobi) On An Ubuntu (Amd66) On Ubuntu 4.5 On A Windows Box

BF2CC Daemon Linux Installation Guide

PC Deployment over network using PXE environment. Workshop

Deploying IBM Lotus Domino on Red Hat Enterprise Linux 5. Version 1.0

Dynamic Host Configuration Protocol (DHCP) 02 NAT and DHCP Tópicos Avançados de Redes

Home Linux Networking Lab (202) This Howto shows how to recreate the CIS Lab environment at home.

INUVIKA OVD INSTALLING INUVIKA OVD ON RHEL 6

VERITAS NetBackup Bare Metal Restore 6.0

Implementing Spacewalk into Company Infrastructure

Introduction to Operating Systems

Preparing for the Installation

SAMBA SERVER (PDC) Samba is comprised of a suite of RPMs that come on the RHEL/Fedora CDs. The files are named:

1:1 NAT in ZeroShell. Requirements. Overview. Network Setup


Windows Firewall Configuration with Group Policy for SyAM System Client Installation

DHCP Server. Heng Sovannarith

Chapter 7. Firewalls

NOC PS manual. Copyright Maxnet All rights reserved. Page 1/45 NOC-PS Manuel EN version 1.3

Railo Installation on CentOS Linux 6 Best Practices

AT&T CLOUD SERVICES. AT&T Synaptic Compute as a Service SM : How to Get Started. Version 2.0 January 2012

Lab Objectives & Turn In

Network Installation using PXE (201)

Guardian Digital WebTool Firewall HOWTO. by Pete O Hara

How to install software on VMware ESXi 4.0/4.1

Linux firewall. Need of firewall Single connection between network Allows restricted traffic between networks Denies un authorized users

Red Hat Enterprise Linux 6 Hypervisor Deployment Guide

Embedded Asterisk. A Crazy Man s Approach to VoIP. Terry Dunlap. 5/12/2007 terrydunlap.com

ICS 351: Today's plan. IP addresses Network Address Translation Dynamic Host Configuration Protocol Small Office / Home Office configuration

Symantec NetBackup Bare Metal Restore Administrator's Guide

CentOS. Apache. 1 de 8. Pricing Features Customers Help & Community. Sign Up Login Help & Community. Articles & Tutorials. Questions. Chat.

Notes for Installing RedHawk 6.3 with Red Hat Enterprise Linux 6.3. Installation Notes. November 6 th, 2014

Citrix XenServer 5.6 OpenSource Xen 2.6 on RHEL 5 OpenSource Xen 3.2 on Debian 5.0(Lenny)

Pwn Plug Community Edition 1.1 Installation Guide

DHCP & Firewall & NAT

Cobbler Documentation

OS Installation Guide Red Hat Linux 9.0

Setup Local Mail Server Using Postfix, Dovecot And Squirrelmail On CentOS 6.5/6.4

Setting Up Your FTP Server

Netwatch Installation For Windows

Troubleshooting Guide

Configuring DHCP Tags for HP Device Manager

Migrating a Campus Network: Flat to Routed

Chapter 2 Preparing Your Network

Asterisk SIP Trunk Settings - Vestalink

CA Server Automation. Rapid Server Imaging Server Administration Guide 12.6

TimeIPS Server. IPS256T Virtual Machine. Installation Guide

Linux FTP Server Setup

Assignment 3 Firewalls

How to Setup and Connect to an FTP Server Using FileZilla. Part I: Setting up the server

SATO Network Interface Card Configuration Instructions

Cloud.com CloudStack Community Edition 2.1 Beta Installation Guide

LOCKSS on LINUX. Installation Manual and the OpenBSD Transition 02/17/2011

How to Configure an Initial Installation of the VMware ESXi Hypervisor

ESET SHARED LOCAL CACHE

Newton Linux User Group Graphing SNMP with Cacti and RRDtool

How To Run A Linux Agent On Alandesk (For Free) On A Linux Server (For A Non-Free) On Your Ubuntu Computer (For Cheap) On An Ubuntu 2.5 (For Ubuntu) On Linux

The BackTrack Successor

DDNS Management System User Manual V1.0

Centralize AIX LPAR and Server Management With NIM

DeploymentManager Ver6.4

Firewalls with IPTables. Jason Healy, Director of Networks and Systems

Lab 1: Introduction to the network lab

Advanced Internetworking

Deploying Foreman in Enterprise Environments 2.0. best practices and lessons learned. Nils Domrose Cologne, August,

Linux System Administration on Red Hat

IPv6 Network Security.

Secure Web Appliance. Reverse Proxy

Quick Note 052. Connecting to Digi Remote Manager SM Through Web Proxy

WiNG 5.X Reference. DHCP Options. Part No. TME REV A

Linux: 20 Iptables Examples For New SysAdmins

SAM XFile. Trial Installation Guide Linux. Snell OD is in the process of being rebranded SAM XFile

Operating System Installation Guidelines

Zimbra :: The Leader in Open Source Collaboration. Administrator's PowerTip #3: June 21, 2007 Zimbra Forums - Zimbra wiki - Zimbra Blog

JAMF Software Server Installation Guide for Linux. Version 8.6

Transcription:

Red Hat Enterprise Linux 6.x - small tutorial - part 3 author: Alexandre Borges revision: A website: http://alexandreborges.org Installing RHEL 6.x from beginning to end using PXE and Kickstart Introduction In the first part of this series (http://alexandreborgesbrazil.files.wordpress.com/2013/07/alexandre_blog_first_post_rhel_1 a.pdf), I've described how to configure and install RHEL 6.4 using Kickstart method (taking packages from a local repository) and, as the reader can remember, that procedure explained how to install Red Hat Enterprise Linux 6 without enter any information during the installation process. However, some people have asked for a way to install RHEL 6.4 through the network (like in the first article), but without the obligation of using an RHEL 6.4 dvd to start the task. In an other words, it would be very cool turn a machine on without any operating system and DVD attached, and just waiting for its complete installation. For demonstrating the whole procedure, I'll be using a virtual machine running RHEL 6.4 in VMware Workstation 10 and I'm going to create a second one accomplish some tests taking the PXE boot. Te first of them (rhel641.example.com) is my RHEL Kickstart repository like as it was configured in our first article about RHEL and it will be used to execute all commands of this document. Step-by-Step PXE procedure 1) Confirm that your Kickstart configuration is correct as we have set in the first article of this series. A example of working repository: [root@redhat641 ~]# more /etc/yum.repos.d/newrepository.repo [blog] name=local Repository baseurl=http://192.168.1.150/software enabled=1 gpgcheck=0 http://alexandreborges.org Página 1

[root@redhat641 www]# yum search nmap Loaded plugins: product-id, refresh-packagekit, security, subscription-manager ===================================================================== N/S Matched: nmap ===================================================================== nmap.x86_64 : Network exploration tool and security scanner Name and summary matches only, use "search all" for everything. As the reader can prove, everything is OK. 2) Install the following packages: httpd, dhcp, tftp-server, syslinux and xinetd. Probably some packages have already installed in your system (for example, in my case, I have needed to install syslinux, dhcp and tfftp-server packages: [root@redhat641 ~]# yum install -y dhcp syslinux xinetd httpd tftp-server 3) This step is a bit strange, but it should be done exactly this way. You must create a specific directory for PXE configuration and copy a template to this directory: [root@redhat641 ~]# mkdir /var/lib/tftpboot/pxelinux.cfg [root@redhat641 ~]# cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/ 4) Edit the tftpd service configuration file (contained in the xinetd framework), enable the service and, afterwards, restart the xinetd and configure it to a permanent on status: [root@redhat641 ~]# vi /etc/xinetd.d/tftp # default: off # description: The tftp server serves files using the trivial file transfer \ # protocol. The tftp protocol is often used to boot diskless \ # workstations, download configuration files to network-aware printers, \ # and to start the installation process for some operating systems. service tftp { socket_type = dgram protocol = udp wait = yes user = root server = /usr/sbin/in.tftpd server_args = -s /var/lib/tftpboot disable = no per_source = 11 http://alexandreborges.org Página 2

} cps = 100 2 flags = IPv4 [root@redhat641 ~]# service xinetd restart Stopping xinetd: [ OK ] Starting xinetd: [ OK ] [root@redhat641 ~]# chkconfig xinetd on [root@redhat641 ~]# chkconfig --list xinetd xinetd 0:off 1:off 2:on 3:on 4:on 5:on 6:off 5) Configure the DHCP for providing an IP address to a new machine which we will install the RHEL6. To complete this task, we should edit the DHCP configuration file and change it according your network. I suggest you pay attention to highlighted parts: [root@redhat641 Desktop]# vi /etc/dhcp/dhcpd.conf # # DHCP Server Configuration file. # see /usr/share/doc/dhcp*/dhcpd.conf.sample # see 'man 5 dhcpd.conf' # # Global Options Allow booting; Allow bootp; authoritative; log-facility local7; # Subnet definition subnet 192.168.1.0 netmask 255.255.255.0 { # Parameters for the local subnet option routers 192.168.1.1; option subnet-mask 255.255.255.0; option domain-name "example.com"; option domain-name-servers 8.8.8.8; default-lease-time 21600; max-lease-time 43200; # Client IP range range dynamic-bootp 192.168.1.150 192.168.1.170; filename "pxelinux.0"; next-server 192.168.1.150; } Some very important things about this file: http://alexandreborges.org Página 3

Allow bootp / Allow booting it's needed to be able to boot a new machine from network. subnet which the network address served by DHCP server range-dynamic bootip what's the IP addresses range offered by DHCP + bootp. filename "pxelinux.0" indicates the pxe file needed to boot using PXE. next server the Kickstart server 6) Restart your dhcp service and you only must continue if everything seems ok: [root@redhat641 ~]# service dhcpd restart Shutting down dhcpd: [ OK ] Starting dhcpd: [ OK ] 7) Execute the following commands: [root @redhat641 ~]# mkdir /var/lib/tftpboot/rhel64 8) You must copy necessaries files (vmlinuz and initrd.img) for a boot from any RHEL machine through PXE: root @redhat641 ~]# cp /var/www/html/software/images/pxeboot/vmlinuz /var/lib/tftpboot/rhel64 root @redhat641 ~]# cp /var/www/html/software/images/pxeboot/initrd.img /var/lib/tftpboot/rhel64 This example assumes the needed files are in /var/www/html/software/images/pxeboot/ because previous Kickstart configuration task from another article (tutorial RHEL first part). If you want you can copy the same files from RHEL64 DVD. 9) Additionaly, we need to copy another file from another place: root @redhat641 ~] cp /usr/share/syslinux/menu.c32 /var/lib/tftpboot 10) Create the file /var/lib/tftpboot/pxelinux.cfg/default (it has the bootloader menu) and insert the following lines into it: root @redhat641 ~] vi /var/lib/tftpboot/pxelinux.cfg/default timeout 50 default menu.c32 menu title ******** PXE Boot Menu ******** http://alexandreborges.org Página 4

label 1 menu label ^ 1) RHEL6 kernel rhel64/vmlinuz append initrd=rhel64/initrd.img ks=http://192.168.1.150/software/kick.cfg ksdevice=eth0 11) Edit the httpd configuration file. insert the following lines at end of file and restart the httpd service: [root@redhat641 ~]# vi /etc/httpd/conf/httpd.conf...(end of file) Alias /software "/var/www/html/software" <Directory "/var/www/html/software"> Options Indexes FollowSymLinks Order Deny,Allow Deny from all Allow from 127.0.0.1 192.168.1.0/24 </Directory> [root@redhat641 ~]# service httpd restart Stopping httpd: [ OK ] Starting httpd: [ OK ] [root@redhat641 ~]# chkconfig httpd on [root@redhat641 ~]# chkconfig --list httpd httpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off 12) Finally, you can configure iptables to allow TFTP protocol access (port 69) and HTTP protocol access (port 80): [root@redhat641 ~]# iptables -I INPUT -m state --state NEW -p udp --dport 69 -j ACCEPT [root@redhat641 ~]# iptables -I INPUT -m state --state NEW -p tcp --dport 80 -j ACCEPT [root@redhat641 ~]# /etc/init.d/iptables save iptables: Saving firewall rules to /etc/sysconfig/iptables:[ OK ] http://alexandreborges.org Página 5

Wow!!! We've done!!! It would be nice if you could create a new virtual marchine (guest operating system being Red Hat Enterprise Linux 6 64 bits) on VMware (you may use VIrtualBox or a physical machine, whatever) and try to boot it using PXE. If you've done everything correctly, the RHEL 6.4 should go from beginning to end without any prompted question. For example, your first screen when you power the virtual machine on should be that: I hope you have enjoyed. Have a nice day. :) Alexandre Borges. http://alexandreborges.org Página 6