码迷,mamicode.com
首页 > 其他好文 > 详细

ks使用lvm分区,ks启动

时间:2015-06-12 13:12:37      阅读:489      评论:0      收藏:0      [点我收藏+]

标签:

part /boot -fstype ext3 -size=150 
part swap -size=2048 
part pv.01 -size=1 -grow
volgroup vg_root pv.01
logvol  /  -vgname=vg_root  -size=10240  -name=lv_root 
logvol  /var  -vgname=vg_root  -size=8096  -name=lv_var 
logvol  /tmp  -vgname=vg_root  -size=8096  -name=lv_tmp 
logvol  /opt  -vgname=vg_root  -size=1  -grow  -name=lv_opt

 

boot: linux ksdevice ks=http://xxxxxxx/xxx.ks ip=xxxxx netmask=xxxx gateway=xxxx

 

install
url --url=http://192.168.119.138:8080/centos63/
lang en_US.UTF-8
keyboard us
network --onboot yes --device eth0 --bootproto static --ip 192.168.119.9 --netmask 255.255.255.0 --noipv6
rootpw  --iscrypted $6$YNtPOUbH$XCzy.HE.IofSFiu7d6TS76PNDzKYh1muS8.DrJE4wLd9Hyw3LEhm8X.fkiFgx9qdbdJ..UOrtEO/EXma58YUG/
firewall --port=2001:tcp
authconfig --enableshadow --passalgo=sha512
selinux --permissive
timezone --utc Asia/Shanghai
bootloader --location=mbr --driveorder=vda --append="crashkernel=auto rhgb quiet"
clearpart --all --initlabel --drives=vda

#part /boot --fstype=ext4 --size=500
#part / --fstype=ext4 --size=20000
#part swap --size=4096
#part /opt --fstype=ext4 --grow --size=1

part /boot -fstype ext3 -size=150 
part swap -size=2048 
part pv.01 -size=1 -grow
volgroup vg_root pv.01
logvol  /  -vgname=vg_root  -size=10240  -name=lv_root 
logvol  /var  -vgname=vg_root  -size=8096  -name=lv_var 
logvol  /tmp  -vgname=vg_root  -size=8096  -name=lv_tmp 
logvol  /opt  -vgname=vg_root  -size=1  -grow  -name=lv_opt

repo --name="CentOS"  --baseurl=http://192.168.119.138:8080/centos63/

%packages
@base
@console-internet
@core
@debugging
@development
@directory-client
@hardware-monitoring
@java-platform
@large-systems
@network-file-system-client
@performance
@perl-runtime
@server-platform
@server-platform-devel
@server-policy
libXinerama-devel
xorg-x11-proto-devel
startup-notification-devel
libgnomeui-devel
libbonobo-devel
libXau-devel
libgcrypt-devel
popt-devel
libXrandr-devel
libxslt-devel
libglade2-devel
gnutls-devel
mtools
sgpio
jpackage-utils
%end

%post
sed -i s@^#UseDNS.*@UseDNS no@g /etc/ssh/sshd_config
sed -i s@^GSSAPIAuthentication\(.*\)@#GSSAPIAuthentication\1@g /etc/ssh/sshd_config
sed -i s@^#PermitRootLogin\(.*\)@PermitRootLogin no@g /etc/ssh/sshd_config
sed -i s@^#Port\(.*\)@Port 2001@g /etc/ssh/sshd_config

echo -ne "   
* soft nproc 10240 
* hard nproc 16384
*      -    nofile 65535  
" >>/etc/security/limits.conf

#set sysctl   
echo -ne "
net.ipv4.tcp_max_syn_backlog = 8192
net.core.netdev_max_backlog =  32768
net.core.somaxconn = 262144
fs.file-max = 256000

net.core.wmem_default = 16777216
net.core.rmem_default = 16777216
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
net.ipv4.tcp_timestamps = 1
net.ipv4.tcp_synack_retries = 2
net.ipv4.tcp_syn_retries = 2

net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_max_tw_buckets = 25000
#net.ipv4.tcp_tw_len = 1
net.ipv4.tcp_tw_reuse = 1

net.ipv4.tcp_mem = 94500000 915000000 927000000
net.ipv4.tcp_max_orphans = 3276800

net.ipv4.tcp_fin_timeout = 30
net.ipv4.tcp_keepalive_time = 1200
net.ipv4.ip_local_port_range = 1024  65535
" >> /etc/sysctl.conf
/sbin/sysctl -p 

/var/spool/cron/root


yum -y install bash openssl-devel ftp screen
%end

reboot

 

ks使用lvm分区,ks启动

标签:

原文地址:http://www.cnblogs.com/cmsd/p/4571279.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!