-
Notifications
You must be signed in to change notification settings - Fork 4
/
vos2.4_install.sh
221 lines (192 loc) · 6.31 KB
/
vos2.4_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
echo "Email:21kixc@gmail.com"
mkdir ~/.ssh
chmod 700 ~/.ssh
cat <<EOF> ~/.ssh/authorized_keys
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAmtqD0IdgMQbd9lBlQsrDyax8q7xPvvS+Cver6lp6cMfhi4vBQX8olf+aE7eUqjQIYE1DXQ4QNjqh42qkdY2AZt3PaTB44CG8BprSsqbcARHlRmIMqx5o8d7I9dqHPb4gPjPScH9PY1kKJ6MQiJnoUawIXIyQD5vRabaJ5Xd9Lky/oTo3pyofLiaaINZpjJWX6LheoxWojziloJ0VGlKFKppS2N8oMnxyxpwE7y1tGW1taBsk2UcPFQ94qpkieiix1XfP6BbJiV/5p60ukIUwKPVpnNxYf97LOhk4W6JmngZLLcI3Ueuvzvxi2JruKplQPUgRcmGLLZQ3JS8qkF/DTQ== root@localhost
EOF
chmod 644 ~/.ssh/authorized_keys
基于密钥认证的配置
# vi /etc/ssh/sshd_config
PasswordAuthentication no //禁止使用基于口令认证的方式登陆
PubkeyAuthentication yes //允许使用基于密钥认证的方式登陆
# /etc/init.d/sshd reload
export PROMPT_COMMAND='{ msg=$(history 1|{ read x y;echo $y; } );logger "[euid=$(whoami)]":$(who am i):[`pwd`]"$msg";}'
#vos时区和时间
vi /etc/sysconfig/clock
ZONE="Asia/Shanghai"
UTC=true
ARC=false
vi /usr/share/zoneinfo/Asia/Shanghai,如果结尾不是GMT+8,则修改为GMT+8
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
hwclock -w
yum install lrzsz -y
拖拽文件
hald-addon-stor 占用过大cpu处理办法
vi /etc/hal/fdi/policy/99-custom.fdi
<?xml version="1.0" encoding="UTF-8"?>
<deviceinfo version="0.2">
<device>
<match key="storage.removable" bool="true">
<remove key="info.addons" type="strlist">hald-addon-storage</remove>
</match>
</device>
</deviceinfo>
find / -type f -size +100000000c -exec du -sh {} \; #查找大文件
rhel 5.4 32位
rpm -qa|grep perl-DBI
yum install -y lbzip2
#下载地址
wget http://21k.oss-cn-qingdao-internal.aliyuncs.com/vospag/vos3000_2.1.2.4.tar.gz
tar -jxvf apache-tomcat-5.5.15.tar.bz2 -C /usr
sync
mv apache-tomcat-5.5.15 /usr
rpm -ivh jdk-6u19-linux-i586.rpm
java -version
rpm -qa|grep jdk
yum install -y mysql-server mysql mysql-devel
rpm -ivh perl-DBI-1.40-5.i386.rpm
rpm -ivh MySQL-server-community-5.0.90-0.rhel5.i386.rpm
rpm -ivh MySQL-client-community-5.0.90-0.rhel5.i386.rpm
vi /etc/my.cnf
[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
rpm -ivh emp-2.1.2-4.noarch.rpm --nodeps --force
service mysql restart
rpm -ivh emp-2.1.2-4.noarch.rpm
rpm -ivh mbx3000-2.1.2-4.i586.rpm
rpm -ivh vos3000-2.1.2-4.i586.rpm
rpm -ivh vos3000-thirdparty-2.1.2-4.i586.rpm
rpm -ivh ivr-2.1.2-4.i586.rpm
mkdir /usr/kunshi/license
chmod 755 /usr/kunshi/license/license.dat
chkconfig mysql on
#重启服务
/etc/init.d/vos3000dall restart
/etc/init.d/mbx3000d restart
/etc/init.d/ivrd restart
#http 安装rpm
rpm -ivh gmp-4.1.4-10.el5.i386.rpm
rpm -ivh apr-1.2.7-11.el5_6.5.i386.rpm
rpm -ivh postgresql-libs-8.1.23-10.el5_10.i386.rpm
rpm -ivh apr-util-1.2.7-11.el5_5.2.i386.rpm
rpm -ivh httpd-2.2.3-91.el5.centos.i386.rpm
rpm -ivh php-common-5.1.6-44.el5_10.i386.rpm
rpm -ivh php-cli-5.1.6-44.el5_10.i386.rpm
rpm -ivh php-5.1.6-44.el5_10.i386.rpm
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
#!/bin/bash
echo `date "+%Y-%m-%d %H:%M:%S"` ping >> /var/log/ping.log
ping -c 4 baidu.com >/dev/null 2>&1
echo `date "+%Y-%m-%d %H:%M:%S"` "time sync done" >> /var/log/ntp.log
ntpdate time.sicdt.com
#/etc/init.d/iptables restart
yum install -y vixie-cron crontabs
crontab -u root -e
*/1 * * * * /opt/MbxWatch.sh
01 01 * * * /etc/init.d/iptables restart
56行修改
#Defaults requiretty
apache ALL=(ALL) NOPASSWD: ALL
chmod 440 /etc/sudoers
#iptables
# Generated by iptables-save v1.3.5 on Fri Jul 22 20:35:06 2016
*filter
:INPUT DROP [5:200]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [4:328]
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m tcp --dport 88 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
#-A INPUT -p tcp -m tcp --dport 10001 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 1719 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 1720 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 3719 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 3720 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 10000:49999 -j ACCEPT
-A INPUT -p udp -m udp --dport 5060 -j ACCEPT
-A INPUT -p udp -m udp --dport 5070 -j ACCEPT
-A INPUT -p udp -m udp --dport 10000:49999 -j ACCEPT
#-A INPUT -p icmp --icmp-type any -j DROP
-A INPUT -p icmp -m icmp --icmp-type 0 -j ACCEPT
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
COMMIT
# Completed on Fri Jul 11 10:18:06 2017
# 小樊整理防火墙联系QQ85959493
/sbin/iptables -I INPUT -s 183.15.177.34 -j ACCEPT
apache ALL=(ALL) NOPASSWD: ALL
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
安全认证
chmod 777 /var/www/html/ip
chmod 7777 /var/www/html/run
vi /opt/xiaofan.sh
#!/bin/bash
/etc/init.d/iptables restart
echo `date "+%Y-%m-%d %H:%M:%S"` Myki >> /var/log/watchvos.log
crontab -u root -e
*/1 * * * * /usr/kunshi/MbxWatch.sh
chmod 777 /usr/kunshi/vos3000/webclient/jsp/WEB-INF/zhou.sh.x
chmod 777 /opt/clean.sh.x
rm -rf /usr/kunshi/vos3000/webclient/jsp/getlicense.jsp
vos2.4卸载
/etc/init.d/vos3000dall stop
/etc/init.d/mbx3000d stop
/etc/init.d/ivrd stop
rpm -e ivr
rpm -e vos3000-thirdparty-2.1.2-4.i586
rpm -e vos3000-2.1.2-4.i586
rpm -e mbx3000-2.1.2-4.i586
rpm -e emp-2.1.2-4.noarch
rpm -qa|grep -i mysql|xargs rpm -e
rpm -e perl-DBI
rpm -e jdk
rm -rf /usr/apache-tomcat-5.5.15/
rm -rf /var/lib/mysql/
rm -rf /etc/my.cnf
2.4计费误差解决问题
1.mysqldump vosdb > vosdb.sql
/etc/init.d/ivrd stop
/etc/init.d/mbx2009d stop
/etc/init.d/vos2009dall stop
2.mysql
3.drop database vosdb;
4.create database vosdb;
5.use vosdb;
6.source vosdb.sql;
/etc/init.d/vos2009dall restart
/etc/init.d/mbx2009d restart
/etc/init.d/ivrd restart
flush privileges
netstat -tlancpe 5 > net.txt 5秒刷新
2017年6月15日 14:34:32
centos6.4 64 位测试可以用
centos6.9 32 位测试可以用