This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use 5.010; | |
use strict; | |
use Expect; | |
my $cmd = "perl simulate.pl"; | |
my $timeout = 30; | |
my @question_list = qw/name age home/; | |
my $qa = { | |
"name" => "shalk\n", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[root@localhost ~]# cat 1.pl | |
#!/usr/bin/env perl | |
use 5.010; | |
use strict; | |
use Expect; | |
#use Smart::Comments; | |
my $cmd = "perl simulate.pl"; | |
my $timeout = 30; | |
my $qa = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
#use lib './nopass/lib/perl5/'; | |
#use Smart::Comments; | |
use Expect; | |
use Getopt::Long; | |
my $username = "root"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm | |
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm | |
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-3.2.29-40.el6.centos.noarch.rpm | |
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm | |
rpm -qa | grep yum | xargs rpm -e --nodeps | |
rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm | |
rpm -ivh yum-metadata-parser-1.1.2-16.el6.x86_64.rpm | |
rpm -ivh yum-3.2.29-40.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
python -V | |
if [ $? != 0 ] ; then | |
echo "python not installed" | |
fi | |
# | |
rpm -ivh python-devel-2.6.0-8.12.2.x86_64.rpm | |
fail(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# prepare: | |
# a server installed suse 11 sp2 | |
# ISO of suse | |
# autoinst.xml | |
# this script | |
# usage: | |
# modify this script's line between 18 ~ 26 | |
# make this parameter correct | |
# description: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script make suse11sp3 to vcell0901 + snapshot-bugfix | |
# shalk 2014-09-26 | |
unzip -f vcell-extra.zip | |
unzip -f snapshot-bugfix.zip | |
cd extra | |
echo "install sugon extra rpm" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://www.yzhang.net/blog/2013-03-07-pptp-vpn-ec2.html | |
# Run this in a root bash environment | |
# | |
# modify the <password> | |
yum -y update | |
wget http://poptop.sourceforge.net/yum/stable/rhel6/x86_64/pptpd-1.4.0-1.el6.x86_64.rpm | |
yum -y localinstall pptpd-1.4.0-1.el6.x86_64.rpm | |
echo localip 192.168.9.1 >> /etc/pptpd.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- /usr/include/dbm.h 2009-02-21 14:52:33.000000000 +0800 | |
+++ /usr/include/dbm.h.pacthed 2014-12-01 20:35:59.000000000 +0800 | |
@@ -59,4 +59,4 @@ | |
extern datum nextkey __P((datum key)); | |
-extern int dbmclose __P((DBM *)); | |
+extern int dbmclose __P((void)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Webqq::Client; | |
use Digest::MD5 qw(md5_hex); | |
my $qq = 171214273; | |
my $pwd = md5_hex('XXXXXXXX'); | |
#通过new来初始化一个客户端对象 | |
##debug=>1来打印debug信息方便调试 | |
my $client = Webqq::Client->new(debug=>0); | |
# | |
# #通过login进行登录 |
OlderNewer