-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvos_install.sh
102 lines (101 loc) · 2.65 KB
/
vos_install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
#!/bin/sh
echo "Email:[email protected]"
echo "Starting install VOS2009 System"
IP=192.168.3.8
FILE=vos2009_2.0_32.tar.gz
VOS2009_FILE=$FILE
URL=http://$IP/$VOS2009_FILE
echo $URL
OS=`head -n 1 /etc/issue |awk '{ print $3}'`
echo $OS
check_version()
{
if [ "$OS" -lt 6.0 ]
then
echo "CentOS version must be 5.x"
exit 0
fi
}
download_vos()
{
wget $URL
tar -xvzf $FILE
}
install_rpm()
{
rpm -ivh perl-DBI-1.40-5.i386.rpm --nodeps --force
rpm -ivh MySQL-server-community-5.0.51a-0.rhel5.i386.rpm --nodeps --force
rpm -ivh MySQL-client-community-5.0.51a-0.rhel5.i386.rpm --nodeps --force
rpm -ivh jdk-1_5_0_08-linux-i586.rpm --nodeps --force
tee /etc/my.cnf <<-'EOF'
[client]
port=3306
default-character-set=utf8
[mysqld]
default-character-set=utf8
max_connections=160
interactive_timeout=310000
wait_timeout=31000
query_cache_size=48M
table_cache=320
tmp_table_size=52M
thread_cache_size=8
sort_buffer_size=256K
innodb_thread_concurrency=8
myisam-recover=FORCE
max_allowed_packet=32M
innodb_file_per_table=1
EOF
chkconfig --level mysqld 2345 on
}
tar_tomcat()
{
PWD=`pwd`
#mv $PWD/apache-tomcat-5.5.15.tar.bz2 /usr
tar zxvf apache-tomcat-5.5.15.tar.gz -C /usr/
}
java_home()
{
cp -f $PWD/profile /etc/profile
}
install_vos()
{
source /etc/profile
PWD=`pwd`
rpm -ivh $PWD/emp-2.1.2-0.noarch.rpm
rpm -ivh $PWD/mbx2009-2.1.2-0.i586.rpm
rpm -ivh $PWD/ivr-2.1.2-0.i586.rpm --nodeps --force
rpm -ivh $PWD/vos2009-2.1.2-0.i586.rpm
# LIBJVM=/usr/java/jdk1.5.0_08/jre/lib/i386/client/libjvm.so
# ln -s $LIBJVM /lib/libjvm.so
}
make_license()
{
mkdir -p /usr/kunshi/license
CRACK_FILE=$PWD/vos20092120.bin
CRACK_LOG=$PWD/crackvos.log
$PWD/vos20092120.bin >$PWD/crackvos.log
JDK_TIME=`sed -n 12p $CRACK_LOG`
VOS_TIME=`sed -n 10p $CRACK_LOG`
RPM_TIME=`sed -n 8p $CRACK_LOG`
IP_ADDRESS=`ifconfig | grep -v '127.0.0.1' | awk '/inet addr/ {split($2,x,":");print x[2]}'`
MAC=`ifconfig |grep -o -E '([[:xdigit:]]{1,2}:){5}[[:xdigit:]]{1,2}'|sed 's|:|-|g'`
echo -e "\033[40;32mIP_ADDRESS=$IP_ADDRESS\n\033[40;37m"
echo -e "\033[40;32mMAC=$MAC\n\033[40;37m"
echo -e "\033[40;32mJDK_TIME=$JDK_TIME\n\033[40;37m"
echo -e "\033[40;32mVOS_TIME=$VOS_TIME\n\033[40;37m"
echo -e "\033[40;32mRPM_TIME=$RPM_TIME\n\033[40;37m"
rm -rf $CRACK_LOG
rm -rf $PWD/$FILE
}
check_version
download_vos
install_rpm
tar_tomcat
#java_home
source /etc/profile
install_vos
make_license
echo "Congratulation! VOS2009 has been installed successfully!"
echo "Contact me if you want to crack the vos2009 2.1.2.0"
echo "Email:[email protected]"