Kwtgame.blog.chinaunix.net
hjjie2006
全部博文(271)
sersync++(0)
rsync++(3)
pptpd++(0)
awstats(1)
Varnish(0)
nginx(5)
Tomcat(1)
Apache(11)
Vsftp(5)
SVN++(3)
CVS++(0)
haproxy(0)
lvs(3)
cmd/other(2)
Ntop(0)
bandwidthd(1)
snmp(3)
Smokeping(1)
Nagios(2)
cacti(7)
Postfix(0)
Kerio MailServer(0)
sendmail(1)
sed awk(6)
DELL(1)
code(0)
up(0)
bat批处理(3)
win2003服务器必(2)
字符处理(6)
面试集锦(2)
linux shell编程(18)
2016年(2)
2015年(12)
2014年(7)
2013年(19)
2012年(22)
2011年(81)
2010年(128)
xcc314
RHCE520
jacklin0
sosozhuz
ygl23
gogo407
南非蜘蛛
jerryfun
xyaxlz
panic
mhy_183
普通人刘
kulxue20
franz
wb123456
zhezhe20
1cpuer
jieyanca
分类:
2011-01-09 14:49:21
#!/bin/bash#Deployment of first use#1.languageecho 'LANG="en_US.utf8"' > /etc/sysconfig/i18n LANG=en_US.utf8lrzsz_http=x.x.x.x#2.NTP datentpdate 0.rhel.pool.ntp.org > /dev/null#3.Boot options#total=6startall=$(chkconfig --list | grep 3:on | awk '{print $1}')stop=$(echo "$startall" | grep -Ev "crond|iptables|network|sshd|syslog|sysstat")for server in $stop do chkconfig --level 3 $server offdonestartonly=$(chkconfig --list|grep 3:on|awk '{print $1}'| sed 's/^./\t\t&/')#4.Boot-levellevel=$(who -r | awk '{print $2}')if [ $level != "3" ] then sed -i 's/id:.:initdefault:/id:3:initdefault:/' /etc/inittabfi#5.install lrzszpkg=$(rpm -q lrzsz)if [[ $pkg == *not* ]] then lrzsz="lrzsz-0.12.20-22.1.i386.rpm" wget http://$lrzsz_http/install/$lrzsz > /dev/null 2>&1 rpm -ivh $lrzsz > /dev/null 2>&1 rm -rf $lrzszfilrzsz=$(which rz)#6.check gccfunction check_gcc {gcctotal=$(rpm -qa | grep gcc | wc -l)if [ $gcctotal -ge "13" ] then echo "gcc = $gcctotal" else echo "Warning gcc < $gcctotal"fireturn}#7.releaserelease=$(echo $(lsb_release -d | awk '{for(i=2;i<=(NF-1);i++)print $i}'))#8.diskfunction disk {df -h | sed 's/^./\t\t&/'}#9.Resultclearecho -e "Date:\t\t$(date "+%F %T")"echoecho -e "Release:\t$release"echoecho -e "Gcc:\t\t$(check_gcc)"echoecho -e "Startlevel:\t$level"echoecho -e "Language:\t$LANG"echoecho -e "RZ:\t\t$lrzsz"echo echo "Boot options:"echo "$startonly"echoecho -e "Disk:\n" ; disk
上一篇:Apache 2.2 + Tomcat 7.0 + jdk-6u23 + MySQL 5.1 +
下一篇:perl 磁盘检测.pl
chinaunix网友2011-03-09 13:38:50
很好的, 收藏了 推荐一个博客,提供很多免费软件编程电子书下载: http://free-ebooks.appspot.com
登录 注册