Linux-based system installation (II)

Source: Internet
Author: User
Tags administrator password

CentOS System Installation:

CentOS 6.7 x86_64:

Minimal Install

To install boot options:

KS: Indicates the location of the kickstart file;

ks=

DVD Drive:ks=cdrom:/path/to/kickstart_file

Hard Drive:ks=hd:/device/path/to/kickstart_file

HTTP server:ks=http://host[:P Ort]/path/to/kickstart_file

FTP server:ks=ftp://host[:P Ort]/path/to/kickstart_file

HTTPS server:ks=https://host[:P Ort]/path/to/kickstart_file

Format of Kickstart file

Command segment:

Specify various pre-installation configuration options, such as keyboard type;

Required commands

Optional commands

Package segment:

Indicates the package to be installed, as well as the package group, including packages that are not installed;

%packages

@group_name

Package

-package

%end

Script segment:

%pre: Pre-installation script

Operating environment: Run the Micro Linux system environment on the installation media;

%post: Post-installation script

Operating Environment: Installation of the completed system;

Required commands in the command segment:

Authconfig: Authentication Mode configuration

Authconfig--enableshadow--passalgo=sha512

Bootloader: Define the installation location and related configuration of the bootloader

bootloader--location=mbr--driveorder=sda--append= "Crashkernel=auto rhgb quiet"

Keyboard: Setting the keyboard type

Keyboard US

Lang: Language type

Lang Zh_cn. UTF-8

Part: partition layout;

Part/boot--FSTYPE=EXT4--size=500

Part pv.008002--size=51200

ROOTPW: Administrator Password

ROOTPW--iscrypted $6$4yh15kmgdwoptbbw$sgax4dszwdaz4201.o97wvaqvjfhcisssqeokzh054junnobmo/rmma7h8zsd08.fm.z3br/ 67uffod1zbe0s.

TimeZone: Time zone

TimeZone Asia/shanghai

Additional: partition-related other directives

Clearpart: Clear Partition

Clearpart--none--DRIVES=SDA: Empty disk partition;

Volgroup: Creating a volume Group

Volgroup MYVG--pesize=4096 pv.008002

Logvol: Creating a logical volume

Logvol/home--FSTYPE=EXT4--name=lv_home--VGNAME=MYVG--size=5120

How to generate an encrypted password:

~]# OpenSSL passwd-1-salt ' OpenSSL rand-hex 4 '

Optional commands:

Install or upgrade: installation or upgrade;

Text: Installation interface type, text is TUI, default is GUI

Network: Configuring the Networking Interface

Network--onboot Yes--device eth0--bootproto DHCP--noipv6

Firewall: Firewall

Firewall--disabled

Selinux:selinux

SELinux--disabled

Halt, Poweroff, or reboot: Behavior after the installation is complete;

Repo: Indicate the repository used during installation;

Repo--name= "CentOS"--baseurl=cdrom:sr0--cost=100

URL: Indicates the repository used at the time of installation, but is in URL format;

URL--url=http://172.16.0.1/cobbler/ks_mirror/centos-6.7-x86_64/

Reference Official Document: "Installation Guide"

Disable the firewall after the system installation is complete:

CentOS 6:

# Service Iptables Stop

# chkconfig Iptables off

CentOS 7:

# Systemctl Stop Firewalld.service

# systemctl Disable Firewalld.service

Disable SELinux after system installation is complete:

To edit the/etc/sysconfig/selinux or/etc/selinux/config file, modify the value of the SELinux parameter to one of the following:

Permissive

Disabled

Immediate effect:

# Getenforce

# Setenforce 0

Customizing Kickstart Files:

# yum Install System-config-kickstart

# System-config-kickstart

Check for syntax errors:

# Ksvalidator

To create a disc image:

~]# mkisofs-r-j-t-v--no-emul-boot--boot-load-size 4--boot-info-table-v "CentOS 6 x86_64 Boot"-C Isolinux/boot.cat -B isolinux/isolinux.bin-o/root/boot.iso myboot/


Linux-based system installation (II)

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.