forked from tuian/vos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vos2.0_install.sh
380 lines (322 loc) · 12.6 KB
/
vos2.0_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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
echo "My QQ: 85959493"
echo "My Skype: vv.tt1@163.com"
时间
date -s "2016-06-06 16:21:00"
clock -w
scp -P 5802 -r cheche@123.57.12.224:/root/vos2009.zip /root/
cat /etc/issue //查看系统版本
cat /proc/version
lsb_release -a
getconf LONG_BIT
cat /etc/redhat-release
ifconfig
df -h
1. #vi /etc/sysconfig/clock
ZONE=”Asia/Shanghai”
UTC=false
2.#vi /usr/share/zoneinfo/Asia/Shanghai,如果结尾不是GMT+8,则修改为GMT+8
3. #cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
修改vos sip端口
vi /usr/kunshi/mbx2009/etc/softswitch.conf
SS_SIPPORT="5060,5161"
wget http://21k.oss-cn-qingdao-internal.aliyuncs.com/vospag/vos2009_32.tar.gz
tar -zxvf vos2009_32.tar.gz
yum install glibc
glibc
libgcc
libstdc++
rpm -ivh perl-DBI-1.40-5.i386.rpm
rpm -ivh MySQL-client-community-5.0.51a-0.rhel5.i386.rpm
rpm -ivh MySQL-server-community-5.0.51a-0.rhel5.i386.rpm
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
rpm -ivh jdk-1_5_0_08-linux-i586.rpm
rpm -ivh emp-2.1.2-0.noarch.rpm
rpm -ivh mbx2009-2.1.2-0.i586.rpm
rpm -ivh ivr-2.1.2-0.i586.rpm
tar zxvf apache-tomcat-5.5.15.tar.gz -C /usr/
mv apache-tomcat-5.5.15 /usr/
rpm -ivh vos2009-2.1.2-0.i586.rpm
chmod 744 vos20092120.bin
./vos20092120.bin
ifconfig
chmod 777 vos20092120
./vos20092120
mkdir /usr/kunshi/license
vi /usr/kunshi/license/license.dat
iptables -I INPUT -p tcp --dport 10020 -j ACCEPT
iptables -I INPUT -p tcp --dport 80 -j ACCEPT
/etc/rc.d/init.d/iptables save
/etc/rc.d/init.d/iptables restart
/etc/init.d/vos2009dall restart
/etc/init.d/mbx2009d restart
/etc/init.d/ivrd restart
chmod 777 /usr/kunshi/vos2009/webclient/jsp/WEB-INF/zhou.sh.x
chmod 777 /opt/clean.sh.x
curl http://$(ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}')/chs/getlicense.jsp
/opt/clean.sh.x
chkconfig iptables on
chkconfig mysql on
rm -rf /usr/kunshi/vos2009/webclient/jsp/getlicense.jsp
rm -rf *
vi /usr/apache-tomcat-5.5.15/conf/server.xml
/etc/init.d/vos2009webct restart //vos2.4版本及以下版本
vi /usr/apache-tomcat-7.0.2/conf/server.xml
/etc/init.d/vos2009webct restart //vos2.6版本
登陆超时
第一 就是你的防火墙搞的
第二就是注册码不对
第三 就是你的mysql没有安装成功
rpm -qa|grep -i mysql
netstat -anp|grep 1202
lsof -i:1202
ps -A | grep vos
ps -A | grep mysql
yum list installed | grep mysql
yum -y remove mysql-libs.x86_64
ps -ef|grep mbx2009|grep -v grep|wc -l
rpm -e mysql --nodeps
grant all privileges on *.* to cheche@"%" identified by "xiaofan@1";
flush privileges;
查看用户
SELECT DISTINCT CONCAT('User: ''',user,'''@''',host,''';') AS query FROM mysql.user;
adduser vos
passwd vos
vi /etc/passwd
mysql
mysql vosdb -A
show databases;
use vosdb
select * from e_user;
select loginname,password from e_user;
netstat -ntulp |grep 80
echo "xiaomo" > /usr/kunshi/vos2009/webclient/jsp/WEB-INF/password.txt
#!/bin/bash
#centos5.11_32位安装脚本
#制作人小樊QQ:85959493
rpm -ivh perl-DBI-1.40-5.i386.rpm
rpm -ivh MySQL-client-community-5.0.51a-0.rhel5.i386.rpm
rpm -ivh MySQL-server-community-5.0.51a-0.rhel5.i386.rpm
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
rpm -ivh jdk-1_5_0_08-linux-i586.rpm
rpm -ivh emp-2.1.2-0.noarch.rpm
rpm -ivh mbx3000-2.1.2-0.i586.rpm
rpm -ivh ivr-2.1.2-0.i586.rpm
tar zxvf apache-tomcat-5.5.15.tar.gz -C /usr/
sync
rpm -ivh vos3000-2.1.2-0.i586.rpm
chmod 777 vos3000*
./vos30002120.bin >> /root/licenseinfo.log
ifconfig | grep ether | awk '{print $2}'| sed 's/:/-/g' >> /root/licenseinfo.log
mkdir /usr/kunshi/license
iptables -I INPUT -p tcp --dport 1202 -j ACCEPT
iptables -I INPUT -p tcp --dport 80 -j ACCEPT
/etc/rc.d/init.d/iptables save
/etc/rc.d/init.d/iptables restart
/etc/init.d/vos3000dall restart
/etc/init.d/mbx3000d restart
/etc/init.d/ivrd restart
mv /var/lib/mysql/ /mnt/
#安全防护
wget http://21k.oss-cn-qingdao.aliyuncs.com/vospag/vos3000_safe.tar.gz
tar -zxvf vos3000_safe.tar.gz
\cp -dprf etc/* /etc/
\cp -dprf chs/* /usr/kunshi/vos3000/webclient/jsp/
\cp -dprf opt/* /opt/
chmod 777 /usr/kunshi/vos3000/webclient/jsp/WEB-INF/zhou.sh.x
chmod 777 /opt/clean.sh.x
curl http://$(ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}')/chs/getlicense.jsp|tail -n2 > /usr/kunshi/vos3000/webclient/jsp/WEB-INF/license.txt
echo "111222" > /usr/kunshi/vos3000/webclient/jsp/WEB-INF/password.txt
/opt/clean.sh.x
chkconfig iptables on
chkconfig mysql on
rm -rf /usr/kunshi/vos3000/webclient/jsp/getlicense.jsp
service crond restart
echo >/var/log/wtmp
echo > /var/log/btmp
echo > /var/log/lastlog
echo > /var/log/secure
echo > ~/.bash_history
echo > ~/.mysql_history
echo > /var/log/messages
history -c
vi /usr/apache-tomcat-5.5.15/conf/server.xml
/etc/init.d/vos2009webct restart //vos2.4版本及以下版本
vi /usr/apache-tomcat-7.0.2/conf/server.xml
/etc/init.d/vos2009webct restart //vos2.6版本
iptables -t nat -A PREROUTING -s 10.10.14.1 -i eth0 -p tcp -m tcp --dport 8888 -j REDIRECT --to-ports 1202
warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID*****
rpm --import /etc/pki/rpm-gpg/RPM*
-A PREROUTING -s 10.11.104.103 -i eth0 -p tcp -m tcp --dport 8888 -j REDIRECT --to-ports 1202
-A PREROUTING -s 10.11.104.103 -i eth1 -p tcp -m tcp --dport 8888 -j REDIRECT --to-ports 1202
netstat -anp | grep 1202 //检查VOS的登录端口是否在线
netstat -anp | grep 3306 //检查MySQL数据库是否在线
netstat -anp | grep 1210 //检查web是否在线
netstat -anp | grep java //java环境
netstat -anp | grep mbx //检查mbx是否在线
netstat -anp | grep 5055 //检查增值业务是否在线
netstat -anp | grep 5065 //netstat -anp | grep 5065
netstat -anp | grep 5075 //检查企业总机服务是否在线
http://128.1.1.229/..%c0%af..%c0%af..%c0%af..%c0%af..%c0%af..%c0%af..%c0%af..%c0%af..%c0%af..%c0%af..%c0%af..%c0%af..%c0%af..%c0%af..%c0%af..%c0%afetc/passwd
2009_2.0 32位卸载
rpm -e ivr-2.1.2-0
rpm -e mbx2009-2.1.2-0
rpm -e vos2009-thirdparty-2.1.2-0
rpm -e emp-2.1.2-0
rpm -e vos2009-2.1.2-0
rpm -e MySQL-server-community-5.0.51a-0.rhel5
rpm -e MySQL-client-community-5.0.51a-0.rhel5
rpm -e per-DBI-1.40-5
rpm -e jdk-1.5.0_08-fcs
rm -rf /var/lib/mysql/
rm -rf /etc/my.cnf
rm -rf /usr/share/mysql*
rm -rf /usr/include/mysql*
rm -rf /usr/lib/mysql
rm -rf /usr/lib/myslq*
rm -rf /usr/apache-tomcat-5.5.15/
rm -rf /usr/kunshi
yum remove perl-DBI -y
2.0 64位卸载
rpm -e ivr
rpm -e mbx2009
rpm -e vos2009
rpm -e emp
rpm -e perl-DBI
3000_2.0卸载
rpm -e ivr-2.1.2-0
rpm -e mbx3000-2.1.2-0
rpm -e vos3000
rpm -e emp-2.1.2-0
rpm -qa|grep -i mysql
rpm -e MySQL-server-community-5.0.51a-0.rhel5
rpm -e MySQL-client-community-5.0.51a-0.rhel5
rpm -e perl-DBI
rpm -e jdk-1.5
rpm -qa|grep jdk
rpm -e jdk-1.5.0_08-fcs
rm -rf /var/lib/mysql/
rm -rf /etc/my.cnf
rm -rf /usr/share/mysql*
rm -rf /usr/include/mysql*
rm -rf /usr/lib/mysql
rm -rf /usr/lib/myslq*
rm -rf /usr/apache-tomcat-5.5.15/
rm -rf /usr/kunshi
yum remove perl-DBI -y
# Generated by iptables-save v1.3.5 on Wed Sep 3 18:30:39 2014
*filter
:INPUT ACCEPT [2187202:341475532]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [2384896:465570094]
:RH-Firewall-1-INPUT - [0:0]
-A RH-Firewall-1-INPUT -i lo -j ACCEPT
-A RH-Firewall-1-INPUT -i eth1 -j ACCEPT
-A RH-Firewall-1-INPUT -i eth0 -j ACCEPT
-A RH-Firewall-1-INPUT -p icmp -m icmp --icmp-type any -j ACCEPT
-A RH-Firewall-1-INPUT -d 224.0.0.251 -p udp -m udp --dport 5353 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp -m udp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 2022 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 2233 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 3389 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 50:50000 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp -m state --state NEW -m udp --dport 50:50000 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 51 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 52 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 53 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 54 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 55 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 56 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 57 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 58 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 59 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 81 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 82 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 83 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 84 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 85 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 86 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 87 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 88 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 89 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 1720 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 1719 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 2720 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 2719 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 3720 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 3719 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 5060 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 5061 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 6060 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 6061 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 5070 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 5071 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 8080 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 8088 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 1701 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 1702 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 1723 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 47 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 1200 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 1300 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 1800 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 3600 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 1202 -j LOG --log-level 7
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
COMMIT
# Completed on Wed Sep 3 18:30:39 2014
# Generated by iptables-save v1.3.5 on Wed Sep 3 18:30:39 2014
*nat
:PREROUTING ACCEPT [144694:15466316]
:POSTROUTING ACCEPT [100320:6022767]
:OUTPUT ACCEPT [100320:6022767]
-A PREROUTING -p tcp -m tcp --dport 3306 -j DROP
-A PREROUTING -p tcp -m tcp --dport 1207 -j DROP
-A PREROUTING -p tcp -m tcp --dport 1202 -j DROP
-A PREROUTING -p tcp -m tcp --dport 143 -j DROP
-A PREROUTING -s 183.41.128.70 -i eth0 -p tcp -m tcp --dport 8888 -j REDIRECT --to-ports 1202
-A PREROUTING -s 183.41.128.70 -i eth1 -p tcp -m tcp --dport 8888 -j REDIRECT --to-ports 1202
COMMIT
# Completed on Wed Sep 3 18:30:39 2014
#查看rpm包信息
rpm -qpi emp-2.1.2-0.noarch.rpm
#解压rpm包
rpm2cpio emp-2.1.2-0.noarch.rpm | cpio -div