RHEL6 semi-automatic network installation

Source: Internet
Author: User
Operating System: RHEL6 sometimes does not need to deploy so many servers, but only a few servers, but it does not have a fully automated Kickstart environment, and does not want to go to the next step on each platform, you can use semi-automatic functions. The ks. cfg file is indispensable: # platform = x86, AMD64, or IntelEM64T # version = DEVEL # Firewallconfigurationfirewal

Operating System: RHEL6

Sometimes there is no need to deploy so many servers, just a few servers, but there is no fully-automated Kickstart environment. If you don't want to perform the next step on each platform, you can use semi-automated deployment.
 
The ks. cfg file is indispensable:

# Platform = x86, AMD64, or Intel EM64T
# Version = DEVEL
# Firewall configuration
Firewall -- disabled
# Install OS instead of upgrade
Install
# Use network installation
Url -- url = "http: // 192.168.1.39/pub/rhel/6.3/i386 /"
# Root password
Rootpw -- iscrypted $1 $ p2FwPn7z $ Fq7pmzmu4WUvbOQz06Gif1
# System authorization information
Auth -- useshadow -- passalgo = sha512
# Use text mode install
Text
# System keyboard
Keyboard us
# System language
Lang en_US
# SELinux configuration
Selinux -- disabled
# Do not configure the X Window System
Skipx
# Installation logging level
Logging -- level = info
# Reboot after installation
Reboot
# System timezone
Timezone Asia/Shanghai
# Network information
Network -- bootproto = static -- device = eth0 -- gateway = 192.168.1.1 -- ip = 192.168.1.175 -- nameserver = 8.8.8.8 -- netmask = 255.255.255.0 -- onboot = on
# System bootloader configuration
Bootloader -- location = mbr
# Clear the Master Boot Record
Zerombr
# Partition clearing information
Clearpart -- all
# Disk partitioning information
Part/boot -- asprimary -- fstype = ext4 -- size = 200
Part pv.01 -- size = 10240
Volgroup vg01 -- pesize = 4096 pv.01
Logvol swap -- name = lv_swap -- vgname = vg01 -- size = 512
Logvol/-- fstype = ext4 -- name = lv_root -- vgname = vg01 -- grow -- size = 1
 
% Post
#! /Bin/bash
# Post_install Script For RHEL 6
 
Rm-rf/etc/yum. repo /*
 
Cat>/etc/yum. repo/rhel6.repo <EOF
[Base]
Name = RedHat Enterprise Linux 6.3x86-DVD Mirror
Baseurl = file: // media/cdrom
Enabled = 1
Gpgcheck = 0
EOF
 
Mkdir/media/cdrom
Mount/dev/cdrom/media/cdrom
 
Yum-y remove rhnlib yum-rhn-plugin rhn-client-tools rhn-setup rhn-check rhnsd submodules-manager
 
Echo "set nu">/etc/vimrc
Echo "set nu">/etc/virc
 
# Disables IPv6
Echo "install ipv6/bin/true">/etc/modprobe. d/release 6.disable. conf
Echo "IPV6INIT = no">/etc/sysconfig/network
 
# Disables services
All_services = ('chkconfig -- list | grep 3: on | awk '{print $1}' | grep-Ev "network | sshd "')
For I in $ {all_services [*]}
Do
# Service $ I stop
Chkconfig -- level 345 $ I off
Done
 
Cat>/etc/bashrc <EOF
Export HISTTIMEFORMAT = "% Y-% m-% d % H: % M: % S"
Export HISTFILESIEZE = 100000
Export HISTSIZE = 10000
EOF
Source/etc/bashrc
History-c
Echo ""> ~ /. Bash_history
 
Exit
% End
 
% Packages
@ Base
Red_Hat_Enterprise_Linux-Release_Notes-6-en-US
 
% End

RHEL6 automatically responds to file download:

Free in http://linux.linuxidc.com/

The username and password are both www.linuxidc.com

The specific download directory is available for installation on/July 15,/July 28,/RHEL6 semi-automatic network.

The partition is the LVM used, which may be convenient for future applications. The root password is 123456. The above script also adds some optimization parameters in the script after installation, which can be modified based on the actual situation.

To put it simply, how can we implement semi-automatic functions? At least one http server should have a yum source to ensure smooth network access. When the disc starts, press the Tab key on the menu interface to add the ks file path:

Use "ks =" to write the specific path. It can be ftp or http. We recommend that you use http because it is easier to deploy. After you press enter, the installation is automatically completed. You don't have to worry about the next step. If no DHCP is available, you may need to specify the IP address first.

For more information about RedHat, see RedHat topic page http://www.linuxidc.com/topicnews.aspx? Tid = 10

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.