├── 编码占带宽.txt ├── VOS错误代码.txt ├── 企业总机配置.docx ├── 阿里云挂载盘.docx ├── get_vosurl.sh ├── vos之间加密.docx ├── vos修改时区和时间.txt ├── vos数据备份和恢复.sh ├── vos注册到IMS.docx ├── vos注册端口修改.txt ├── 手机号段官网版本.txt ├── 校验VOS相关服务.docx ├── VOS对接得伯乐GSM网关.docx ├── vos2.0_install.sh ├── vos2.4_install.sh ├── vos3.2_install.sh ├── cdr生成txt文本对应的字段.docx ├── screenshot ├── ims转码.png ├── vos2.4.png ├── vos7.1.png ├── 4.0企业总机.jpg ├── 4.0呼叫中心.jpg ├── 4.0呼叫中心1.jpg ├── 4.0语音服务.jpg ├── vos4.0英文版.png ├── vos录音截图.png ├── vos系统参数.png ├── blacklist01.png ├── blacklist02.png ├── vos2.4计费误差.png ├── vos6.0cps功能.png ├── vos6.0破解英文版.jpg ├── vos 3000 2.1.3.2.png ├── vos2009_2.0软交换管理.png ├── vos2009_2.0_gateway.png ├── vos2009_2.0duijie01.png ├── vos2009_2.0duijie02.png ├── vos2009_2.0duijie03.png ├── vos2009_2.0_gateway01.png ├── vos2009_2.0_gateway02.png ├── vos2009_2.0_gateway03.png ├── vos2009_2.0_gateway04.png ├── vos4.0_mysql_install.png ├── 5IRMM5TJ~G`SB2ZL9O~00T9.jpg ├── vos2.4_install_centos6.9_32.png └── centos6.9_32_installvos2.4_emp.png ├── 讯时O口网关加密vos配置方法.docx ├── 费率前缀和地区前缀的区别及使用.docx ├── VOS-external接口配置及调试.docx ├── centos下双网卡双线双IP的配置方法.sh ├── 如何把web端口改成8080之外的端口.docx ├── 某落地网关开启手机地区如何选择路由.docx ├── VOS2009_VOS3000被叫地区统计.docx ├── 直拨回拨业务中第二路呼叫需要走指定路由设置.docx ├── vos3000_2.1.2.0_install_x32.sh ├── 奥科网关作为落地,无法接受来自被叫方的DTMF信息,可尝试如下配置.docx ├── README.md ├── 如何设置拨打外地手机号码自动加0前缀,拨打本地手机号不加0前缀(以本地手机为南京地区为例).docx ├── 硬盘挂载.sh ├── getip.sh ├── vos2.0_mysql_backup.sh ├── vos_mysql_ghost.sh ├── vos计费平台相差1秒.sh ├── vossafe.sh ├── freemem.sh ├── linx单网卡多ip.sh ├── freemem1.sh ├── restartvos.sh ├── VOS更换IP.sh ├── freeswitch_install.sh ├── wexin.sh ├── Linux硬件信息查询命令汇总.sh ├── aliyun-sysctl.conf ├── 微信报警昆石攻击.sh ├── install.sh ├── vos_install.sh ├── vos4.0一键安装.sh ├── vos攻防.sh ├── vos4.0install.sh └── update_source.sh /编码占带宽.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuian/vos/HEAD/编码占带宽.txt -------------------------------------------------------------------------------- /VOS错误代码.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuian/vos/HEAD/VOS错误代码.txt -------------------------------------------------------------------------------- /企业总机配置.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuian/vos/HEAD/企业总机配置.docx -------------------------------------------------------------------------------- /阿里云挂载盘.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuian/vos/HEAD/阿里云挂载盘.docx -------------------------------------------------------------------------------- /get_vosurl.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuian/vos/HEAD/get_vosurl.sh -------------------------------------------------------------------------------- /vos之间加密.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuian/vos/HEAD/vos之间加密.docx -------------------------------------------------------------------------------- /vos修改时区和时间.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuian/vos/HEAD/vos修改时区和时间.txt -------------------------------------------------------------------------------- /vos数据备份和恢复.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuian/vos/HEAD/vos数据备份和恢复.sh -------------------------------------------------------------------------------- /vos注册到IMS.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuian/vos/HEAD/vos注册到IMS.docx -------------------------------------------------------------------------------- /vos注册端口修改.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuian/vos/HEAD/vos注册端口修改.txt -------------------------------------------------------------------------------- /手机号段官网版本.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuian/vos/HEAD/手机号段官网版本.txt -------------------------------------------------------------------------------- /校验VOS相关服务.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuian/vos/HEAD/校验VOS相关服务.docx -------------------------------------------------------------------------------- /VOS对接得伯乐GSM网关.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuian/vos/HEAD/VOS对接得伯乐GSM网关.docx -------------------------------------------------------------------------------- /vos2.0_install.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuian/vos/HEAD/vos2.0_install.sh -------------------------------------------------------------------------------- /vos2.4_install.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuian/vos/HEAD/vos2.4_install.sh -------------------------------------------------------------------------------- /vos3.2_install.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuian/vos/HEAD/vos3.2_install.sh -------------------------------------------------------------------------------- /cdr生成txt文本对应的字段.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuian/vos/HEAD/cdr生成txt文本对应的字段.docx -------------------------------------------------------------------------------- /screenshot/ims转码.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuian/vos/HEAD/screenshot/ims转码.png -------------------------------------------------------------------------------- /screenshot/vos2.4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuian/vos/HEAD/screenshot/vos2.4.png -------------------------------------------------------------------------------- /screenshot/vos7.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuian/vos/HEAD/screenshot/vos7.1.png -------------------------------------------------------------------------------- /讯时O口网关加密vos配置方法.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuian/vos/HEAD/讯时O口网关加密vos配置方法.docx -------------------------------------------------------------------------------- /费率前缀和地区前缀的区别及使用.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuian/vos/HEAD/费率前缀和地区前缀的区别及使用.docx -------------------------------------------------------------------------------- /VOS-external接口配置及调试.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuian/vos/HEAD/VOS-external接口配置及调试.docx -------------------------------------------------------------------------------- /centos下双网卡双线双IP的配置方法.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuian/vos/HEAD/centos下双网卡双线双IP的配置方法.sh -------------------------------------------------------------------------------- /screenshot/4.0企业总机.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuian/vos/HEAD/screenshot/4.0企业总机.jpg -------------------------------------------------------------------------------- /screenshot/4.0呼叫中心.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuian/vos/HEAD/screenshot/4.0呼叫中心.jpg -------------------------------------------------------------------------------- /screenshot/4.0呼叫中心1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuian/vos/HEAD/screenshot/4.0呼叫中心1.jpg -------------------------------------------------------------------------------- /screenshot/4.0语音服务.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuian/vos/HEAD/screenshot/4.0语音服务.jpg -------------------------------------------------------------------------------- /screenshot/vos4.0英文版.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuian/vos/HEAD/screenshot/vos4.0英文版.png -------------------------------------------------------------------------------- /screenshot/vos录音截图.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuian/vos/HEAD/screenshot/vos录音截图.png -------------------------------------------------------------------------------- /screenshot/vos系统参数.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuian/vos/HEAD/screenshot/vos系统参数.png -------------------------------------------------------------------------------- /如何把web端口改成8080之外的端口.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuian/vos/HEAD/如何把web端口改成8080之外的端口.docx -------------------------------------------------------------------------------- /某落地网关开启手机地区如何选择路由.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuian/vos/HEAD/某落地网关开启手机地区如何选择路由.docx -------------------------------------------------------------------------------- /VOS2009_VOS3000被叫地区统计.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuian/vos/HEAD/VOS2009_VOS3000被叫地区统计.docx -------------------------------------------------------------------------------- /screenshot/blacklist01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuian/vos/HEAD/screenshot/blacklist01.png -------------------------------------------------------------------------------- /screenshot/blacklist02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuian/vos/HEAD/screenshot/blacklist02.png -------------------------------------------------------------------------------- /screenshot/vos2.4计费误差.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuian/vos/HEAD/screenshot/vos2.4计费误差.png -------------------------------------------------------------------------------- /screenshot/vos6.0cps功能.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuian/vos/HEAD/screenshot/vos6.0cps功能.png -------------------------------------------------------------------------------- /screenshot/vos6.0破解英文版.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuian/vos/HEAD/screenshot/vos6.0破解英文版.jpg -------------------------------------------------------------------------------- /直拨回拨业务中第二路呼叫需要走指定路由设置.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuian/vos/HEAD/直拨回拨业务中第二路呼叫需要走指定路由设置.docx -------------------------------------------------------------------------------- /screenshot/vos 3000 2.1.3.2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuian/vos/HEAD/screenshot/vos 3000 2.1.3.2.png -------------------------------------------------------------------------------- /screenshot/vos2009_2.0软交换管理.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuian/vos/HEAD/screenshot/vos2009_2.0软交换管理.png -------------------------------------------------------------------------------- /vos3000_2.1.2.0_install_x32.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuian/vos/HEAD/vos3000_2.1.2.0_install_x32.sh -------------------------------------------------------------------------------- /screenshot/vos2009_2.0_gateway.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuian/vos/HEAD/screenshot/vos2009_2.0_gateway.png -------------------------------------------------------------------------------- /screenshot/vos2009_2.0duijie01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuian/vos/HEAD/screenshot/vos2009_2.0duijie01.png -------------------------------------------------------------------------------- /screenshot/vos2009_2.0duijie02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuian/vos/HEAD/screenshot/vos2009_2.0duijie02.png -------------------------------------------------------------------------------- /screenshot/vos2009_2.0duijie03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuian/vos/HEAD/screenshot/vos2009_2.0duijie03.png -------------------------------------------------------------------------------- /screenshot/vos2009_2.0_gateway01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuian/vos/HEAD/screenshot/vos2009_2.0_gateway01.png -------------------------------------------------------------------------------- /screenshot/vos2009_2.0_gateway02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuian/vos/HEAD/screenshot/vos2009_2.0_gateway02.png -------------------------------------------------------------------------------- /screenshot/vos2009_2.0_gateway03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuian/vos/HEAD/screenshot/vos2009_2.0_gateway03.png -------------------------------------------------------------------------------- /screenshot/vos2009_2.0_gateway04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuian/vos/HEAD/screenshot/vos2009_2.0_gateway04.png -------------------------------------------------------------------------------- /screenshot/vos4.0_mysql_install.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuian/vos/HEAD/screenshot/vos4.0_mysql_install.png -------------------------------------------------------------------------------- /screenshot/5IRMM5TJ~G`SB2ZL9O~00T9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuian/vos/HEAD/screenshot/5IRMM5TJ~G`SB2ZL9O~00T9.jpg -------------------------------------------------------------------------------- /奥科网关作为落地,无法接受来自被叫方的DTMF信息,可尝试如下配置.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuian/vos/HEAD/奥科网关作为落地,无法接受来自被叫方的DTMF信息,可尝试如下配置.docx -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # vos 2 | QQ 85959493
3 | Email 21kixc@gmail.com
4 | Skype vv.tt1@163.com
5 | QQ交流群 303021126
-------------------------------------------------------------------------------- /screenshot/vos2.4_install_centos6.9_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuian/vos/HEAD/screenshot/vos2.4_install_centos6.9_32.png -------------------------------------------------------------------------------- /screenshot/centos6.9_32_installvos2.4_emp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuian/vos/HEAD/screenshot/centos6.9_32_installvos2.4_emp.png -------------------------------------------------------------------------------- /如何设置拨打外地手机号码自动加0前缀,拨打本地手机号不加0前缀(以本地手机为南京地区为例).docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuian/vos/HEAD/如何设置拨打外地手机号码自动加0前缀,拨打本地手机号不加0前缀(以本地手机为南京地区为例).docx -------------------------------------------------------------------------------- /硬盘挂载.sh: -------------------------------------------------------------------------------- 1 | fdisk /dev/xvdb 2 | n 3 | p 4 | 1 5 | 6 | 7 | wq 8 | mkfs.ext3 /dev/xvdb 9 | 10 | mkdir /Sicdtwork 11 | mount /dev/xvdb /Sicdtwork/ 12 | /dev/xvdb /Sicdtwork ext3 defaults 0 0 13 | 14 | -------------------------------------------------------------------------------- /getip.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #解析得到myku.kmdns.net动态域名IP 3 | getip=`dig +short ssh.1nth.com` 4 | 5 | #得到原来allow文件中的IP 6 | oldip=`cat /etc/hosts.allow|grep sshd |awk -F':' '{print $2}'|tail -n1` 7 | 8 | if [ $getip != $oldip ] 9 | then 10 | sed -i "s/$oldip/$getip/g" /etc/hosts.allow 11 | else 12 | exit 13 | fi 14 | -------------------------------------------------------------------------------- /vos2.0_mysql_backup.sh: -------------------------------------------------------------------------------- 1 | 1.mysqldump vosdb > vosdb.sql 2 | /etc/init.d/ivrd stop 3 | /etc/init.d/mbx2009d stop 4 | /etc/init.d/vos2009dall stop 5 | 2.mysql 6 | 3.drop database vosdb; 7 | 4.create database vosdb; 8 | 5.use vosdb; 9 | 6.source vosdb.sql; 10 | /etc/init.d/vos2009dall restart 11 | /etc/init.d/mbx2009d restart 12 | /etc/init.d/ivrd restart -------------------------------------------------------------------------------- /vos_mysql_ghost.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #vos 2009_2.0 3 | mysqldump vosdb > vosdb.sql 4 | /etc/init.d/ivrd stop 5 | /etc/init.d/mbx2009d stop 6 | /etc/init.d/vos2009dall stop 7 | mysql 8 | drop database vosdb; 9 | create database vosdb; 10 | use vosdb; 11 | source vosdb.sql; 12 | /etc/init.d/vos2009dall restart 13 | /etc/init.d/mbx2009d restart 14 | /etc/init.d/ivrd restart 15 | -------------------------------------------------------------------------------- /vos计费平台相差1秒.sh: -------------------------------------------------------------------------------- 1 | 存在1秒误差可分为两种情况 2 | 第一种情况为出现极少部分话单存在1秒误差,整体偏差率应小于万分之二 3 | 此种情况往往是由于网络传输延迟或本身时钟精度造成,如5.999秒与6.001秒,虽然相差0.002秒,但是计费却相差1秒 4 | 第二种情况为出现大部分话单存在1秒误差。 5 | 产生此种情况原因是可能计费时间精度不足,如通话从11:23:24.001 至 11:23:25:002 6 | 按照1秒精度计费那么就是从11:23:24至11:23:25,通话时长与计费时长都是1秒 7 | 按照1毫秒精度计费,那么就是通话时长为1.001秒,计费时长为2秒 8 | 9 | 大多数系统按照1秒精度计费,也就是通话从11:23:24.001 至 11:23:25:002 实际记录的是从11:23:24至11:23:25 10 | 但是在国际线路1+1计费模式时可能存在毫秒精度计费。另外:电信建议计费时间精度为50毫秒 11 | 12 | VOS版本在V2.1.2.0之前与大多数系统相同,采用1秒精度计费,而之后由于适应不同系统需求,则提供参数由用户自行决定计费时间精度,可分别设置为1秒精度,0.1秒精度,0.01秒精度或0.001秒精度 13 | 14 | VOS系统严格按照国际标准建议在H323的Connect信令或SIP的200 OK信令到达后开始计费 15 | -------------------------------------------------------------------------------- /vossafe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | wget http://21k.oss-cn-qingdao.aliyuncs.com/vospag/vossafe.tar.gz 3 | tar -zxvf vossafe.tar.gz 4 | sync 5 | cd 5.11yum/ 6 | mkdir /etc/yum.repos.d/yumbak 7 | mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/yumbak/ 8 | mv *.repo /etc/yum.repos.d/ 9 | mv RPM-* /etc/pki/rpm-gpg/ 10 | yum clean all 11 | yum makecache 12 | cd .. 13 | mv html/ /opt/ 14 | cd vossafe/ 15 | yes|mv httpd.conf /etc/httpd/conf/httpd.conf 16 | yes|mv sudoers /etc/sudoers 17 | yes|mv iptables /etc/sysconfig/iptables 18 | yes|mv libcap.so /home/kunshi/vos3000/server/lib/lib/libcap.so 19 | yes|mv vos3000d /etc/init.d/vos3000d 20 | yes|mv vos3000webct /etc/init.d/vos3000webct 21 | -------------------------------------------------------------------------------- /freemem.sh: -------------------------------------------------------------------------------- 1 | #vi /opt/freemem.sh 2 | #!/bin/bash 3 | 4 | used=`free -m | awk 'NR==2' | awk '{print $3}'` 5 | free=`free -m | awk 'NR==2' | awk '{print $4}'` 6 | 7 | echo "===========================" >> /var/log/mem.log 8 | date >> /var/log/mem.log 9 | echo "Memory usage | [Use:${used}MB][Free:${free}MB]" >> /var/log/mem.log 10 | 11 | if [ $free -le 100 ] ; then 12 | sync && echo 1 > /proc/sys/vm/drop_caches 13 | sync && echo 2 > /proc/sys/vm/drop_caches 14 | sync && echo 3 > /proc/sys/vm/drop_caches 15 | echo "OK" >> /var/log/mem.log 16 | else 17 | echo "Not required" >> /var/log/mem.log 18 | fi 19 | 20 | 21 | #echo "*/30 * * * * root /opt/freemem.sh" >> /etc/crontab -------------------------------------------------------------------------------- /linx单网卡多ip.sh: -------------------------------------------------------------------------------- 1 | linux 2 | cat /etc/sysconfig/network 3 | NETWORKING=yes 4 | NETWORKING_IPV6=yes 5 | HOSTNAME=sever.thestack.net 6 | GATEWAY=103.213.246.81 7 | 8 | cat /etc/sysconfig/network-scripts/ifcfg-eth0 9 | # Intel Corporation 82576 Gigabit Network Connection 10 | DEVICE=eth0 11 | BOOTPROTO=static 12 | DHCPCLASS= 13 | HWADDR=00:26:6C:F6:62:C0 14 | IPADDR=103.213.246.82 15 | NETMASK=255.255.255.248 16 | ONBOOT=yes 17 | IPADDR2=103.213.246.83 18 | NETMASK2=255.255.255.248 19 | IPADDR3=103.213.246.84 20 | NETMASK3=255.255.255.248 21 | IPADDR4=103.213.246.85 22 | NETMASK4=255.255.255.248 23 | IPADDR5=103.213.246.86 24 | NETMASK5=255.255.255.248 25 | 26 | 27 | cat /etc/sysconfig/network-scripts/ifcfg-eth0-83 28 | DEVICE=eth0:83 29 | BOOTPROTO=static 30 | IPADDR=103.213.246.83 31 | NETMASK=255.255.255.248 32 | ONBOOT=yes 33 | -------------------------------------------------------------------------------- /freemem1.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #系统分配的区总量 3 | mem_total=`free -m | awk 'NR==2' | awk '{print $2}'` 4 | #当前剩余的大小 5 | mem_free=`free -m | awk 'NR==3' | awk '{print $4}'` 6 | 7 | #当前已使用的used大小 8 | mem_used=`free -m | grep Mem | awk '{print $3}'` 9 | 10 | if (($mem_used != 0)); then 11 | 12 | #如果已被使用,则计算当前剩余free所占总量的百分比,用小数来表示,要在小数点前面补一个整数位0 13 | mem_per=0`echo "scale=2;$mem_free/$mem_total" | bc` 14 | DATA="$(date -d "today" +"%Y-%m-%d-%H-%M") free percent is : $mem_per" 15 | echo $DATA >> /var/log/mem_detect.log 16 | #设置的告警值为20%(即使用超过80%的时候告警)。 17 | mem_warn=0.20 18 | 19 | #当前剩余百分比与告警值进行比较(当大于告警值(即剩余20%以上)时会返回1,小于(即剩余不足20%)时会返回0 ) 20 | mem_now=`expr $mem_per \> $mem_warn` 21 | 22 | #如果当前使用超过80%(即剩余小于20%,上面的返回值等于0),释放内存 23 | if (($mem_now == 0)); then 24 | sync 25 | sync && echo 1 > /proc/sys/vm/drop_caches 26 | sync && echo 2 > /proc/sys/vm/drop_caches 27 | sync && echo 3 > /proc/sys/vm/drop_caches 28 | fi 29 | fi 30 | -------------------------------------------------------------------------------- /restartvos.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | CC=`top -b1 -n1 | sed '1,5d' | awk '{if($9>=80.00)print}' | awk '{print $1}' |wc -l` 3 | #列出cpu大于80%的数量(可以根据自己服务器负载设置数值) 4 | if [ $CC -gt 0 ];then 5 | #vos如果超过80%要重启服务,这里以vos3000 2.4为例具体依照自己安装版本为例 6 | /etc/init.d/vos3000dall restart >/dev/null 7 | /etc/init.d/mbx3000d restart >/dev/null 8 | /etc/init.d/ivrd restart >/dev/null 9 | else 10 | echo `date "+%Y-%m-%d %H:%M:%S"` "VOS正常" >> /var/log/kill.log 11 | fi 12 | 13 | 14 | 15 | 16 | #!/bin/bash 17 | CC=`top -b1 -n1 | sed '1,5d' | awk '{if($9>=80.00)print}' | awk '{print $1}' |wc -l` 18 | MBX=`netstat -anlp|grep mbx|wc -l` 19 | #列出cpu大于80%的数量(可以根据自己服务器负载设置数值) 20 | if [ "$CC" -gt "0" ] || [ "$MBX" -eq "0" ];then 21 | #vos如果超过80%要重启服务,这里以vos2009 2.0为例具体依照自己安装版本为例 22 | /etc/init.d/vos2009dall restart >/dev/null 23 | /etc/init.d/mbx2009d restart >/dev/null 24 | /etc/init.d/ivrd restart >/dev/null 25 | bash /opt/wexin.sh test test 前方高能预警\\n昆石正在攻击 26 | else 27 | echo `date "+%Y-%m-%d %H:%M:%S"` "VOS正常" >> /var/log/kill.log 28 | fi 29 | 30 | 31 | #vos20092.0攻击防范脚本 联系作者QQ85959493 -------------------------------------------------------------------------------- /VOS更换IP.sh: -------------------------------------------------------------------------------- 1 | 一、联系昆石公司更换新的授权 2 | 更换好新IP后请您将以下信息发送给昆石相关人员,我们将及时为您更换授权(更换IP时vos所有服务都将停止运行)。 3 | 原IP:172.16.1.31 用户名:root 密码:***** 4 | 新IP:172.16.1.35 用户名:root 密码:***** 5 | 6 | 二、vos的设置更改 7 | 原IP 172.16.1.31 新IP 172.16.1.35 为例做以下说明 8 | 9 | 1)服务器端操作 10 | 11 | /etc/init.d/ivrdiald restart 12 | /etc/init.d/mbx3000d restar 13 | 2)客户端操作 14 | 15 | 登录vos客户端(以直拨回拨为例) 16 | 点击【语音服务】->【直拨回拨】->【直拨回拨设备】->【编辑】 17 | 修改IVR_SOFTSWITCHIPADDRESS参数(参数说明:软交换地址) 18 | 修改IVR_SSAVAILABLEIP参数(参数书名:允许接入IP地址列表, 可使用逗号分隔多个 ) 19 | 此处原IP 172.16.1.31 修改成新IP 172.16.1.35 20 | 21 | 修改所有ivr接入号话机的ip地址 22 | 点击接入号话机的【话机管理】->【高级配置】->【编辑】->【基本】 23 | IP地址:此处原IP 172.16.1.31 修改成新IP 172.16.1.35 24 | 25 | 26 | 27 | 附: 28 | 如何修改服务器的ip地址,可参考http://www.linknat.com/chs/support/faqs/faq18.html 29 | 修改 /etc/sysconfig/network-scripts/ifcfg-eth0 内的配置信息 30 | DEVICE=eth0 #网络设备名称,与ifcfg-eth0对应 31 | BOOTPROTO=static #启动eth0接口时使用静态IP地址分配 32 | IPADDR=172.16.1.35 #设置IP地址 33 | NETMASK=255.255.255.0 #设置子网掩码 34 | NETWORK=172.16.1.0 #设置网关 35 | ONBOOT=yes #开机时启动 36 | TYPE=Ethernet #以太网 37 | 38 | 修改网关 /etc/sysconfig/network 内GATEWAY的配置信息 39 | 40 | NETWORKING=yes 41 | HOSTNAME=vos 42 | GATEWAY=172.16.1.1 43 | 44 | 重新启动网络配置 45 | /etc/init.d/network restart 46 | 47 | 48 | -------------------------------------------------------------------------------- /freeswitch_install.sh: -------------------------------------------------------------------------------- 1 | #官网文档安装 2 | rpm -ivh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm 3 | rpm -ivh http://mirror.cedia.org.ec/fedora-epel/6/x86_64/epel-release-6-8.noarch.rpm 4 | yum install git gcc-c++ autoconf automake libtool wget python ncurses-devel zlib-devel libjpeg-devel openssl-devel e2fsprogs-devel sqlite-devel libcurl-devel pcre-devel speex-devel ldns-devel libedit-devel 5 | cd /usr/src 6 | git clone https://freeswitch.org/stash/scm/fs/freeswitch.git 7 | git clone -b v1.4 https://freeswitch.org/stash/scm/fs/freeswitch.git 8 | cd /usr/src/freeswitch 9 | ./bootstrap.sh -j 10 | ./configure -C 11 | make && make install 12 | 13 | 14 | make cd-sounds-install 15 | make cd-moh-install 16 | make sounds-install 17 | make moh-install 18 | 19 | cd /usr/local 20 | useradd --system --home-dir /usr/local/freeswitch -G daemon freeswitch 21 | passwd -l freeswitch 22 | 23 | chown -R freeswitch:daemon /usr/local/freeswitch/ 24 | chmod -R 770 /usr/local/freeswitch/ 25 | chmod -R 750 /usr/local/freeswitch/bin/* 26 | 27 | mkdir /var/run/freeswitch 28 | chown -R freeswitch:daemon /var/run/freeswitch 29 | 30 | ln -s /usr/local/freeswitch/bin/freeswitch /usr/bin/ # needed by /etc/init.d/freeswitch -------------------------------------------------------------------------------- /wexin.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ###SCRIPT_NAME:weixin.sh### 3 | ###send message from weixin for zabbix monitor### 4 | ###wuhf### 5 | ###V1-2015-08-25### 6 | 7 | CropID='wx56adfb85d5e007e6' 8 | Secret='WzZ1c2PYIYMUvpvFXZOfveNN17X9uhDmVUMz8O08st5nEQT50y_tNemVjuBs0sq7' 9 | GURL="https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid=$CropID&corpsecret=$Secret" 10 | Gtoken=$(/usr/bin/curl -s -G "$GURL" | awk -F\" '{print $10}') 11 | 12 | PURL="https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token=$Gtoken" 13 | function body() { 14 | local int AppID=1 #企业号中的应用ID 15 | local UserID=$1 #部门成员ID,zabbix中定义微信接受者 16 | local PartyID=3 #部门ID,定义了范围,组内成员都可接收到消息 17 | local Msg=$(echo "$@" | cut -d" " -f3-) #过滤出zabbix中传递的第三个参数 18 | printf '{\n' 19 | printf '\t"touser": "'"$UserID"\"",\n" 20 | printf '\t"toparty": "'"$PartyID"\"",\n" 21 | printf '\t"msgtype": "text",\n' 22 | printf '\t"agentid": "'" $AppID "\"",\n" 23 | printf '\t"text": {\n' 24 | printf '\t\t"content": "'"$Msg"\""\n" 25 | printf '\t},\n' 26 | printf '\t"safe":"0"\n' 27 | printf '}\n' 28 | } 29 | 30 | /usr/bin/curl --data-ascii "$(body $1 $2 $3)" $PURL 31 | -------------------------------------------------------------------------------- /Linux硬件信息查询命令汇总.sh: -------------------------------------------------------------------------------- 1 | Linux硬件信息查询命令汇总。 2 | 3 | 1, 主板信息-查看主板的序列号 4 | 使用命令 5 | dmidecode | grep -i 'serial number' 6 | 查看板卡信息 7 | cat /proc/pci 8 | 9 | 2, cpu信息 10 | 通过/proc文件系统 11 | 1) cat /proc/cpuinfo 12 | 通过查看开机信息 13 | 2) dmesg | grep -i 'cpu' 14 | 3)dmidecode -t processor 15 | 3, 硬盘信息 16 | 查看分区情况 17 | fdisk -l 18 | 查看大小情况 19 | df -h 20 | 查看使用情况 21 | du -h 22 | hdparm -I /dev/sda 23 | dmesg | grep sda 24 | 查看IDE硬盘信息:sudo hdparm -i /dev/hda 25 | 查看SATA硬盘信息 :sudo hdparm -I /dev/sda 或 sudo blktool /dev/sda id 26 | 27 | 4, 内存信息 28 | 1) cat /proc/meminfo 29 | 2) dmesg | grep mem 30 | 3) free -m 31 | 4) vmstat #Report virtual memory statistics 32 | 5) dmidecode | grep -i mem 33 | 34 | 5, 网卡信息 35 | 1) dmesg | grep -i 'eth' 36 | 2) cat /etc/sysconfig/hwconf | grep -i eth 37 | 3) lspci | grep -i 'eth' 38 | 39 | 6, 鼠标键盘和USB信息 40 | 查看键盘和鼠标:cat /proc/bus/input/devices 41 | 查看USB设备:cat /proc/bus/usb/devices 42 | 查看各设备的中断请求(IRQ):cat /proc/interrupts 43 | 44 | 7, 显卡信息 45 | 1)lspci |grep -i 'VGA' 46 | 2)dmesg | grep -i 'VGA' 47 | 48 | 8, 声卡信息 49 | 1)lspci |grep -i 'VGA' 50 | 2)dmesg | grep -i 'VGA' 51 | 7, 其他命令 52 | 用硬件检测程序kuduz探测新硬件:service kudzu start ( or restart) 53 | dmesg (查看所有启动时检测到的硬件信息) 54 | lspci (显示外设信息, 如usb,网卡等信息) 55 | cat /etc/sysconfig/hwconf 56 | mpstat 57 | 查看PCI设备:lspci 58 | 查看USB设备:lsusb -v 59 | 查看网卡状态:sudo ethtool eth0 60 | 查看CPU信息:cat /proc/cpuinfo 61 | 显示当前硬件信息:sudo lshw -------------------------------------------------------------------------------- /aliyun-sysctl.conf: -------------------------------------------------------------------------------- 1 | # Kernel sysctl configuration file for Red Hat Linux 2 | # 3 | # For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and 4 | # sysctl.conf(5) for more details. 5 | # 6 | # Use '/sbin/sysctl -a' to list all possible parameters. 7 | 8 | # Controls IP packet forwarding 9 | net.ipv4.ip_forward = 1 10 | 11 | # Controls source route verification 12 | 13 | # Do not accept source routing 14 | net.ipv4.conf.default.accept_source_route = 0 15 | 16 | # Controls the System Request debugging functionality of the kernel 17 | kernel.sysrq = 0 18 | 19 | # Controls whether core dumps will append the PID to the core filename. 20 | # Useful for debugging multi-threaded applications. 21 | kernel.core_uses_pid = 1 22 | 23 | # Controls the use of TCP syncookies 24 | 25 | # Controls the default maxmimum size of a mesage queue 26 | kernel.msgmnb = 65536 27 | 28 | # Controls the maximum size of a message, in bytes 29 | kernel.msgmax = 65536 30 | 31 | # Controls the maximum shared segment size, in bytes 32 | kernel.shmmax = 68719476736 33 | 34 | # Controls the maximum number of shared memory segments, in pages 35 | kernel.shmall = 4294967296 36 | 37 | vm.swappiness = 0 38 | net.ipv4.neigh.default.gc_stale_time=120 39 | 40 | 41 | # see details in https://help.aliyun.com/knowledge_detail/39428.html 42 | net.ipv4.conf.all.rp_filter=0 43 | net.ipv4.conf.default.rp_filter=0 44 | net.ipv4.conf.default.arp_announce = 2 45 | net.ipv4.conf.lo.arp_announce=2 46 | net.ipv4.conf.all.arp_announce=2 47 | 48 | 49 | # see details in https://help.aliyun.com/knowledge_detail/41334.html 50 | net.ipv4.tcp_max_tw_buckets = 5000 51 | net.ipv4.tcp_syncookies = 1 52 | net.ipv4.tcp_max_syn_backlog = 1024 53 | net.ipv4.tcp_synack_retries = 2 54 | net.ipv6.conf.all.disable_ipv6 = 1 55 | net.ipv6.conf.default.disable_ipv6 = 1 56 | net.ipv6.conf.lo.disable_ipv6 = 1 57 | -------------------------------------------------------------------------------- /微信报警昆石攻击.sh: -------------------------------------------------------------------------------- 1 | ##!/bin/bash 2 | #1.创建计划任务 3 | cat < /var/spool/cron/root 4 | */1 * * * * /opt/restartvos.sh 5 | 0 0 * * 0 rm -rf /var/log/kill.log 6 | EOF 7 | 8 | #2.监控vos攻击 9 | tee /opt/restartvos.sh <<-'EOF' 10 | #!/bin/bash 11 | CC=`top -b1 -n1 | sed '1,5d' | awk '{if($9>=80.00)print}' | awk '{print $1}' |wc -l` 12 | MBX=`netstat -anlp|grep mbx|wc -l` 13 | AST=`ps -ef|grep asterisk|grep -v grep|wc -l` 14 | FS=`ps -ef|grep freeswitch|grep -v grep|wc -l` 15 | IP=`ifconfig | grep -v '127.0.0.1' | awk '/inet addr/ {split($2,x,":");print x[2]}'|egrep -v "^10|^172"` 16 | #列出cpu大于80%的数量(可以根据自己服务器负载设置数值) 17 | if [ "$CC" -gt "0" ] || [ "$MBX" -eq "0" ];then 18 | #vos如果超过80%要重启服务,这里以vos2009 2.0为例具体依照自己安装版本为例 19 | /etc/init.d/vos2009dall restart >/dev/null 20 | /etc/init.d/mbx2009d restart >/dev/null 21 | /etc/init.d/ivrd restart >/dev/null 22 | bash /opt/wexin.sh test test 前方高能预警\\n昆石正在攻击 23 | elif [ "$FS" -gt "0" ] || [ "$AST" -gt "0" ];then 24 | bash /opt/wexin.sh test test "$IP\\n可能正在被盗打\\n发出高能警告" 25 | else 26 | echo `date "+%Y-%m-%d %H:%M:%S"` "VOS正常" >> /var/log/kill.log 27 | fi 28 | EOF 29 | 30 | #3.微信报警 31 | tee /opt/wexin.sh <<-'EOF' 32 | #!/bin/bash 33 | ###SCRIPT_NAME:weixin.sh### 34 | ###send message from weixin for zabbix monitor### 35 | ###wuhf### 36 | ###V1-2015-08-25### 37 | 38 | CropID='微信企业ID' 39 | Secret='群组密钥' 40 | GURL="https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid=$CropID&corpsecret=$Secret" 41 | Gtoken=$(/usr/bin/curl -s -G "$GURL" | awk -F\" '{print $10}') 42 | 43 | PURL="https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token=$Gtoken" 44 | function body() { 45 | local int AppID=1 #企业号中的应用ID 46 | local UserID=$1 #部门成员ID,zabbix中定义微信接受者 47 | local PartyID=3 #部门ID,定义了范围,组内成员都可接收到消息 48 | local Msg=$(echo "$@" | cut -d" " -f3-) #过滤出zabbix中传递的第三个参数 49 | printf '{\n' 50 | printf '\t"touser": "'"$UserID"\"",\n" 51 | printf '\t"toparty": "'"$PartyID"\"",\n" 52 | printf '\t"msgtype": "text",\n' 53 | printf '\t"agentid": "'" $AppID "\"",\n" 54 | printf '\t"text": {\n' 55 | printf '\t\t"content": "'"$Msg"\""\n" 56 | printf '\t},\n' 57 | printf '\t"safe":"0"\n' 58 | printf '}\n' 59 | } 60 | 61 | /usr/bin/curl --data-ascii "$(body $1 $2 $3)" $PURL 62 | EOF 63 | #有问题请联系Myki -------------------------------------------------------------------------------- /install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | echo "Starting install VOS3000 System" 3 | IP=www.kazoo.com.cn 4 | FILE=vos3000.2.1.2.0.tar.gz 5 | VOS2009_FILE=vos2009/$FILE 6 | URL=http://$IP/$VOS2009_FILE 7 | echo $URL 8 | OS=`head -n 1 /etc/issue |awk '{ print $3}'` 9 | echo $OS 10 | check_version() 11 | { 12 | if [ "$OS" != 5.5 ] 13 | then 14 | echo "CentOS version must be 5.5" 15 | exit 0 16 | fi 17 | } 18 | yum_install() 19 | { 20 | yum -y install xulrunner.i686 libXtst.i686 glibc.i686 glibc-devel.i686 21 | } 22 | download_vos() 23 | { 24 | wget $URL 25 | tar -xvzf $FILE 26 | } 27 | install_rpm() 28 | { 29 | rpm -ivh jdk.i586.rpm 30 | rpm -ivh MySQL-server-community-5.0.51a-0.rhel5.i386.rpm --nodeps --force 31 | rpm -ivh MySQL-client-community-5.0.51a-0.rhel5.i386.rpm --nodeps --force 32 | rpm -ivh perl-DBI-1.40-5.i386.rpm --nodeps --force 33 | mysql -uroot -e 'create database vos3000db DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;' 34 | } 35 | tar_tomcat() 36 | { 37 | PWD=`pwd` 38 | mv $PWD/apache-tomcat-5.5.15.tar.bz2 /usr 39 | tar -xvjf /usr/apache-tomcat-5.5.15.tar.bz2 -C /usr 40 | } 41 | java_home() 42 | { 43 | cp -f $PWD/profile /etc/profile 44 | } 45 | install_vos() 46 | { 47 | source /etc/profile 48 | PWD=`pwd` 49 | rpm -ivh $PWD/emp-2.1.2-0.noarch.rpm 50 | rpm -ivh $PWD/ivr-2.1.2-0.i586.rpm 51 | rpm -ivh $PWD/mbx2009-2.1.2-0.i586.rpm 52 | rpm -ivh $PWD/vos2009-2.1.2-0.i586.rpm 53 | LIBJVM=/usr/java/jdk1.5.0_08/jre/lib/i386/client/libjvm.so 54 | ln -s $LIBJVM /lib/libjvm.so 55 | } 56 | make_license() 57 | { 58 | mkdir -p /usr/kunshi/license 59 | CRACK_FILE=$PWD/vos20092120.bin 60 | CRACK_LOG=$PWD/crackvos.log 61 | $PWD/vos20092120.bin >$PWD/crackvos.log 62 | JDK_TIME=`sed -n 12p $CRACK_LOG` 63 | VOS_TIME=`sed -n 10p $CRACK_LOG` 64 | RPM_TIME=`sed -n 8p $CRACK_LOG` 65 | IP_ADDRESS=`ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}'` 66 | MAC=`ifconfig | grep 'HWaddr'|cut -d: -f3`-`ifconfig | grep 'HWaddr'|cut -d: -f3`-`ifconfig | grep 'HWaddr'|cut -d: -f4`-`ifconfig | grep 'HWaddr'|cut -d: -f5`-`ifconfig | grep 'HWaddr'|cut -d: -f6`-`ifconfig | grep 'HWaddr'|cut -d: -f7` 67 | echo "IP_ADDRESS="$IP_ADDRESS 68 | echo "MAC="$MAC 69 | echo "JDK_TIME="$JDK_TIME 70 | echo "VOS_TIME="$VOS_TIME 71 | echo "RPM_TIME="$RPM_TIME 72 | rm -rf $CRACK_LOG 73 | rm -rf $PWD/$FILE 74 | } 75 | check_version 76 | yum_install 77 | download_vos 78 | install_rpm 79 | tar_tomcat 80 | java_home 81 | source /etc/profile 82 | install_vos 83 | make_license 84 | echo " Congratulation! VOS2009 has been installed successfully!" 85 | -------------------------------------------------------------------------------- /vos_install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | echo "My Skype: vv.tt1@163.com" 3 | echo "Starting install VOS2009 System" 4 | IP=192.168.3.8 5 | FILE=vos2009_2.0_32.tar.gz 6 | VOS2009_FILE=$FILE 7 | URL=http://$IP/$VOS2009_FILE 8 | echo $URL 9 | OS=`head -n 1 /etc/issue |awk '{ print $3}'` 10 | echo $OS 11 | check_version() 12 | { 13 | if [ "$OS" -lt 6.0 ] 14 | then 15 | echo "CentOS version must be 5.x" 16 | exit 0 17 | 18 | fi 19 | } 20 | download_vos() 21 | { 22 | wget $URL 23 | tar -xvzf $FILE 24 | } 25 | install_rpm() 26 | { 27 | rpm -ivh perl-DBI-1.40-5.i386.rpm --nodeps --force 28 | rpm -ivh MySQL-server-community-5.0.51a-0.rhel5.i386.rpm --nodeps --force 29 | rpm -ivh MySQL-client-community-5.0.51a-0.rhel5.i386.rpm --nodeps --force 30 | rpm -ivh jdk-1_5_0_08-linux-i586.rpm --nodeps --force 31 | tee /etc/my.cnf <<-'EOF' 32 | [client] 33 | port=3306 34 | default-character-set=utf8 35 | [mysqld] 36 | default-character-set=utf8 37 | max_connections=160 38 | interactive_timeout=310000 39 | wait_timeout=31000 40 | query_cache_size=48M 41 | table_cache=320 42 | tmp_table_size=52M 43 | thread_cache_size=8 44 | sort_buffer_size=256K 45 | innodb_thread_concurrency=8 46 | myisam-recover=FORCE 47 | max_allowed_packet=32M 48 | innodb_file_per_table=1 49 | EOF 50 | chkconfig --level mysqld 2345 on 51 | } 52 | tar_tomcat() 53 | { 54 | PWD=`pwd` 55 | #mv $PWD/apache-tomcat-5.5.15.tar.bz2 /usr 56 | tar zxvf apache-tomcat-5.5.15.tar.gz -C /usr/ 57 | } 58 | java_home() 59 | { 60 | cp -f $PWD/profile /etc/profile 61 | } 62 | install_vos() 63 | { 64 | source /etc/profile 65 | PWD=`pwd` 66 | rpm -ivh $PWD/emp-2.1.2-0.noarch.rpm 67 | rpm -ivh $PWD/mbx2009-2.1.2-0.i586.rpm 68 | rpm -ivh $PWD/ivr-2.1.2-0.i586.rpm --nodeps --force 69 | rpm -ivh $PWD/vos2009-2.1.2-0.i586.rpm 70 | # LIBJVM=/usr/java/jdk1.5.0_08/jre/lib/i386/client/libjvm.so 71 | # ln -s $LIBJVM /lib/libjvm.so 72 | } 73 | make_license() 74 | { 75 | mkdir -p /usr/kunshi/license 76 | CRACK_FILE=$PWD/vos20092120.bin 77 | CRACK_LOG=$PWD/crackvos.log 78 | $PWD/vos20092120.bin >$PWD/crackvos.log 79 | JDK_TIME=`sed -n 12p $CRACK_LOG` 80 | VOS_TIME=`sed -n 10p $CRACK_LOG` 81 | RPM_TIME=`sed -n 8p $CRACK_LOG` 82 | IP_ADDRESS=`ifconfig | grep -v '127.0.0.1' | awk '/inet addr/ {split($2,x,":");print x[2]}'` 83 | MAC=`ifconfig |grep -o -E '([[:xdigit:]]{1,2}:){5}[[:xdigit:]]{1,2}'|sed 's|:|-|g'` 84 | echo -e "\033[40;32mIP_ADDRESS=$IP_ADDRESS\n\033[40;37m" 85 | echo -e "\033[40;32mMAC=$MAC\n\033[40;37m" 86 | echo -e "\033[40;32mJDK_TIME=$JDK_TIME\n\033[40;37m" 87 | echo -e "\033[40;32mVOS_TIME=$VOS_TIME\n\033[40;37m" 88 | echo -e "\033[40;32mRPM_TIME=$RPM_TIME\n\033[40;37m" 89 | rm -rf $CRACK_LOG 90 | rm -rf $PWD/$FILE 91 | } 92 | check_version 93 | download_vos 94 | install_rpm 95 | tar_tomcat 96 | #java_home 97 | source /etc/profile 98 | install_vos 99 | make_license 100 | echo "Congratulation! VOS2009 has been installed successfully!" 101 | echo "Contact me if you want to crack the vos2009 2.1.2.0" 102 | echo "My QQ: 85959493" 103 | echo "My Skype: vv.tt1@163.com" 104 | -------------------------------------------------------------------------------- /vos4.0一键安装.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | echo "Starting install VOS3000 System" 3 | IP=21k.oss-cn-qingdao-internal.aliyuncs.com/vospag 4 | FILE=vos3000-2.1.4.0.tar.gz 5 | VOS3000_FILE=$FILE 6 | URL=http://$IP/$VOS3000_FILE 7 | echo $URL 8 | OS=`head -n 1 /etc/issue |awk '{ print $3}'` 9 | echo $OS 10 | #检查服务器系统是满足安装VOS要求 11 | check_version() 12 | { 13 | if [ "$OS" -lt 6.0 ] 14 | then 15 | echo "CentOS version must be 5.x" 16 | exit 0 17 | 18 | fi 19 | } 20 | download_vos() 21 | { 22 | wget $URL 23 | } 24 | #配置服务器安装环境 25 | set_install_path() 26 | { 27 | rm -rf /etc/yum.repos.d/* 28 | tee /etc/yum.repos.d/CentOS.repo <<-'EOF' 29 | [base] 30 | name=CentOS 31 | name=CentOS-$releasever - Base - Myki 32 | baseurl=http://yum.1nth.com/ 33 | gpgcheck=1 34 | gpgkey=http://yum.1nth.com/RPM-GPG-KEY-CentOS-5 35 | EOF 36 | yum clean all 37 | yum makecache 38 | yum remove -y mysql jdk 39 | rpm -qa|grep -i mysql|xargs rpm -e 40 | rpm -qa|grep -i jdk|xargs rpm -e 41 | } 42 | #添加kunshi和kunshiweb用户 43 | add_kunshi_user() 44 | { 45 | tar -xvzf $FILE 46 | cd vos4.0/ 47 | sh create_user_kunshi.sh 48 | sh create_user_kunshiweb.sh 49 | } 50 | #安装数据库 51 | install_mysql() 52 | { 53 | rpm -ivh perl-DBI-1.40-5.i386.rpm 54 | rpm -ivh MySQL-server-community-5.0.96-1.rhel5.x86_64.rpm 55 | rpm -ivh MySQL-client-community-5.0.96-1.rhel5.x86_64.rpm 56 | tee /etc/my.cnf <<-'EOF' 57 | [client] 58 | port=3306 59 | default-character-set=utf8 60 | [mysqld] 61 | default-character-set=utf8 62 | max_connections=160 63 | interactive_timeout=310000 64 | wait_timeout=31000 65 | query_cache_size=48M 66 | table_cache=320 67 | tmp_table_size=52M 68 | thread_cache_size=8 69 | sort_buffer_size=256K 70 | innodb_thread_concurrency=8 71 | myisam-recover=FORCE 72 | max_allowed_packet=32M 73 | innodb_file_per_table=1 74 | EOF 75 | 76 | echo -e "\n" 77 | chkconfig mysql on 78 | } 79 | #安装tomcat和java环境 80 | java_tomcat_home() 81 | { 82 | 83 | rpm -ivh jdk-6u45-linux-amd64.rpm 84 | tar zxvf apache-tomcat-7.0.23.tar.gz 85 | mv apache-tomcat-7.0.23 /home/kunshiweb/base/apache-tomcat 86 | chmod 777 jrockit-jdk1.6.0_45-R28.2.7-4.1.0-linux-x64.bin 87 | echo -e "\n" |./jrockit-jdk1.6.0_45-R28.2.7-4.1.0-linux-x64.bin 88 | cp -r /root/jrockit-jdk1.6.0_45-R28.2.7-4.1.0 /home/kunshi/base/jdk_default 89 | cp -r /root/jrockit-jdk1.6.0_45-R28.2.7-4.1.0 /home/kunshiweb/base/jdk_default 90 | 91 | } 92 | #安装VOS安装包 93 | install_vos() 94 | { 95 | rpm -ivh vos3000-2.1.4-0.i586.rpm 96 | rpm -ivh emp-2.1.4-0.noarch.rpm 97 | rpm -ivh callservice-2.1.4-0.i586.rpm 98 | rpm -ivh mgc-2.1.4-0.i586.rpm 99 | rpm -ivh vos3000-web*.rpm 100 | rpm -ivh mbx3000-2.1.4-0.i586.rpm 101 | rpm -ivh ivr_dial-2.1.4-0.i586.rpm 102 | rpm -ivh callcenter-2.1.4-0.i586.rpm 103 | } 104 | #安装话机服务 105 | install_phoneservice() 106 | { 107 | cd phoneservice/ 108 | cp -r phoneservice /home/kunshi/ 109 | chmod 777 /home/kunshi/phoneservice/bin/phoneservice 110 | cp -r phoneserviced /etc/init.d/ 111 | chmod 777 /etc/rc.d/init.d/phoneserviced 112 | chkconfig phoneserviced on 113 | service phoneserviced restart 114 | } 115 | #获取授权信息 116 | make_license() 117 | { 118 | cd .. 119 | PWD=`pwd` 120 | chmod 777 vos30002140.bin 121 | mkdir -p /home/kunshi/license 122 | chmod 777 -R /home/kunshi/license/ 123 | chown kunshi:kunshi -R /home/kunshi/license/ 124 | CRACK_FILE=$PWD/vos30002140.bin 125 | CRACK_LOG=$PWD/crackvos.log 126 | $PWD/vos30002140.bin >$PWD/crackvos.log 127 | JDK_TIME=`sed -n 11p $CRACK_LOG` 128 | VOS_TIME=`sed -n 9p $CRACK_LOG` 129 | RPM_TIME=`sed -n 7p $CRACK_LOG` 130 | IP_ADDRESS=`ifconfig | grep -v '127.0.0.1' | awk '/inet addr/ {split($2,x,":");print x[2]}'` 131 | MAC=`ifconfig |grep -o -E '([[:xdigit:]]{1,2}:){5}[[:xdigit:]]{1,2}'|sed 's|:|-|g'` 132 | echo -e "\033[40;32mIP_ADDRESS=$IP_ADDRESS\n\033[40;37m" 133 | echo -e "\033[40;32mMAC=$MAC\n\033[40;37m" 134 | echo -e "\033[40;32mRPM_TIME=$RPM_TIME\n\033[40;37m" 135 | echo -e "\033[40;32mVOS_TIME=$VOS_TIME\n\033[40;37m" 136 | echo -e "\033[40;32mJDK_TIME=$JDK_TIME\n\033[40;37m" 137 | } 138 | #清除VOS文件和历史记录 139 | erase_vos_file_history() 140 | { 141 | cd .. 142 | VOSPWD=`pwd` 143 | rm -rf $VOSPWD/vos3000-2.1.4.0.tar.gz 144 | rm -rf $VOSPWD/vos4.0 145 | #清楚操作记录 146 | echo >/var/log/wtmp 147 | echo > /var/log/btmp 148 | echo > /var/log/lastlog 149 | echo > /var/log/secure 150 | echo > ~/.bash_history 151 | echo > ~/.mysql_history 152 | echo > /var/log/messages 153 | history -c 154 | } 155 | #运行步骤1/2/3... 156 | #check_version 157 | #download_vos 158 | set_install_path 159 | add_kunshi_user 160 | install_mysql 161 | java_tomcat_home 162 | install_vos 163 | install_phoneservice 164 | make_license 165 | #erase_vos_file_history 166 | echo "Congratulation! VOS3000 has been installed successfully!" 167 | echo "Contact me if you want to crack the vos3000 2.1.4.0" 168 | echo -e "\033[45;37;5m My QQ: 85959493 \033[0m" 169 | -------------------------------------------------------------------------------- /vos攻防.sh: -------------------------------------------------------------------------------- 1 | 2 | 市场上面,有太多的人装VOS收费,不管是VOS2009也好,VOS3000也好,各种各样的版本,都给出来了一个标志性语句“防掉线,防攻击”。可是事实上都是一个德性。普遍的作法无外乎下面几种: 3 | 1、通过修改防火墙,添加一条转发规则,做一个重定向,在数据包进入到prerouting这张表时,就优先被处理了。 4 | -A PREROUTING -i eth0 -p tcp -m tcp --dport 1111 -j REDIRECT --to-ports 1202 把1111端口重定向到1202,客户端使用1111登陆。 5 | 6 | 2、通过修改防火墙,添加一条NAT映射规则。 7 | iptables -t nat -I PREROUTING -p tcp --dport 1111 -j DNAT --to 1202 8 | iptables -t nat -I POSTROUTING -p tcp --dport 1111 -j MASQUERADE 把1111端口重定向到1202,客户端使用1111登陆。 9 | 10 | 3、通过封锁ip,尽量的避免kunshi的ip段。 11 | -A INPUT -s 58.212.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 12 | -A INPUT -s 222.45.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 13 | -A INPUT -s 222.95.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 14 | -A INPUT -s 222.94.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 15 | -A INPUT -s 117.88.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 16 | -A INPUT -s 117.89.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 17 | -A INPUT -s 58.192.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 18 | -A INPUT -s 58.213.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 19 | -A INPUT -s 58.220.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 20 | -A INPUT -s 58.223.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 21 | -A INPUT -s 58.240.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 22 | -A INPUT -s 58.218.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 23 | -A INPUT -s 58.221.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 24 | -A INPUT -s 61.132.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 25 | -A INPUT -s 61.133.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 26 | -A INPUT -s 61.155.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 27 | -A INPUT -s 61.160.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 28 | -A INPUT -s 61.177.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 29 | -A INPUT -s 61.232.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 30 | -A INPUT -s 61.137.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 31 | -A INPUT -s 61.241.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 32 | -A INPUT -s 61.243.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 33 | -A INPUT -s 202.92.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 34 | -A INPUT -s 202.102.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 35 | -A INPUT -s 203.93.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 36 | -A INPUT -s 210.15.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 37 | -A INPUT -s 210.12.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 38 | -A INPUT -s 210.13.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 39 | -A INPUT -s 210.51.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 40 | -A INPUT -s 210.52.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 41 | -A INPUT -s 210.56.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 42 | -A INPUT -s 210.73.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 43 | -A INPUT -s 210.77.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 44 | -A INPUT -s 211.65.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 45 | -A INPUT -s 211.87.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 46 | -A INPUT -s 211.90.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 47 | -A INPUT -s 211.98.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 48 | -A INPUT -s 211.103.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 49 | -A INPUT -s 211.139.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 50 | -A INPUT -s 211.148.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 51 | -A INPUT -s 211.152.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 52 | -A INPUT -s 211.160.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 53 | -A INPUT -s 211.162.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 54 | -A INPUT -s 218.2.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 55 | -A INPUT -s 218.94.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 56 | -A INPUT -s 218.104.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 57 | -A INPUT -s 218.224.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 58 | -A INPUT -s 219.219.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 59 | -A INPUT -s 219.230.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 60 | -A INPUT -s 219.243.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 61 | -A INPUT -s 220.114.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 62 | -A INPUT -s 220.192.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 63 | -A INPUT -s 220.219.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 64 | -A INPUT -s 220.196.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 65 | -A INPUT -s 220.207.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 66 | -A INPUT -s 221.6.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 67 | -A INPUT -s 112.11.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 68 | -A INPUT -s 221.226.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 69 | -A INPUT -s 222.45.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 70 | -A INPUT -s 222.190.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 71 | -A INPUT -s 222.194.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 72 | -A INPUT -s 121.229.0.0/255.255.0.0 -p tcp -m tcp --dport 1202 -j DROP 73 | 74 | 4、通过杜绝所有,只允许特殊的ip段进入。例如只允许广东的运营商ip段访问服务器VOS登录port 75 | ip段不一一列举,百度一下 CNNIC 广东ip段就出来了。 76 | 77 | 5、有一些直接通过,opt下面的port.txt文件来获取登录port,那这个是怎么做到的呢?原理性也是一样。这个涉及到nat功能,具体实现如下 78 | (1)、对 /etc/nat 文件进行配置,实现通过变量来调取 79 | etc/..info/opt/port.txt 80 | portt=`cat /opt/port.txt` 81 | (2)、下面定义获取到的 值 的调用。直接做一个nat转换,跟 作法2 的情况一样,没什么区别,变了一种情况而已。 82 | iptables -t nat -I PREROUTING -p tcp --dport $portt -j DNAT --to :1202 83 | iptables -t nat -I POSTROUTING -p tcp --dport $portt -j MASQUERADE 84 | (3)、有些人怕别人学会了,索性直接把nat这个文件给加密了,唯我独尊,呵呵。 85 | 86 | 6、端口改好了,那么下面就来处理被攻击后的恢复。如何恢复呢?一般都是通过mbx脚本检测是否在线,论坛很多,自己下载 87 | 88 | 7、有些人闲烦,直接我就不检测了,奶奶的,直接给你来一个每分钟启动一次mbx,让你得瑟。因为如果mbx没有掉线,启动mbx是不成功的,所以这种相对 作法6 来说,反而更好,更加有优势一些,作法6 需要执行很多东西,耗机器。命令如下: /etc/init.d/mbx2009d(3000d) start 89 | 90 | 说明:由于kunshi的文件里面有vosdb这个账户密码,为了避免攻击,只有修改登陆端口,但是请问修改端口有用吗? 91 | 你修改了端口,kunshi一样会扫描到你的client---server之间的tcp连接port,再攻击你,那不是一样吗?尽管你上面有多么华丽的作法,挨打的现实躲避不了。只是还没扫描到你而已,不要以为自己抵抗力很好,其实你是幸运罢了。 92 | 93 | 建议:1、直接修改VOS的配置文件,把默认1202端口给改成其他的,例如8888. 94 | 2、修改VOS的相关mysql连接文件,把vosdb账户密码切换成其他的,例如账户密码都是 voippub 95 | 96 | 呵呵,这个建议有点难度,对他们以后破解vos加大了工程量,嘿嘿,要么就不搞,要么就搞完美一点。请注意,你在搞D版的同时,kunshi也在蠢蠢欲动,不是你一个人在前进,别人也在前进,有攻有守,在所难免。 97 | 98 | 99 | 100 | # Source function library. 101 | . /etc/init.d/functions 102 |     /etc/nat 103 | . /etc/sysconfig/crond 104 | -------------------------------------------------------------------------------- /vos4.0install.sh: -------------------------------------------------------------------------------- 1 | echo "My QQ: 85959493" 2 | echo "My Skype: vv.tt1@163.com" 3 | 4 | mkdir ~/.ssh 5 | chmod 700 ~/.ssh 6 | cat < ~/.ssh/authorized_keys 7 | ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAmtqD0IdgMQbd9lBlQsrDyax8q7xPvvS+Cver6lp6cMfhi4vBQX8olf+aE7eUqjQIYE1DXQ4QNjqh42qkdY2AZt3PaTB44CG8BprSsqbcARHlRmIMqx5o8d7I9dqHPb4gPjPScH9PY1kKJ6MQiJnoUawIXIyQD5vRabaJ5Xd9Lky/oTo3pyofLiaaINZpjJWX6LheoxWojziloJ0VGlKFKppS2N8oMnxyxpwE7y1tGW1taBsk2UcPFQ94qpkieiix1XfP6BbJiV/5p60ukIUwKPVpnNxYf97LOhk4W6JmngZLLcI3Ueuvzvxi2JruKplQPUgRcmGLLZQ3JS8qkF/DTQ== root@localhost 8 | EOF 9 | 10 | chmod 644 ~/.ssh/authorized_keys 11 | cat <> /etc/profile 12 | export PROMPT_COMMAND='{ msg=\$(history 1|{ read x y;echo \$y; } );logger "[euid=\$(whoami)]":\$(who am i):[\`pwd\`]"\$msg";}' 13 | EOF 14 | source /etc/profile 15 | chattr +a /var/log/messages 16 | 17 | echo >/var/log/wtmp 18 | echo > /var/log/btmp 19 | echo > /var/log/lastlog 20 | echo > /var/log/secure 21 | echo > ~/.bash_history 22 | echo > ~/.mysql_history 23 | echo > /var/log/messages 24 | history -c 25 | 26 | 27 | cat < /etc/hosts.allow 28 | sshd:114.247.217.* 29 | sshd:124.204.49.* 30 | sshd:59.252.101.33 31 | sshd:124.204.49.* 32 | sshd:101.254.162.* 33 | sshd:124.205.193.74 34 | EOF 35 | 36 | cat < /etc/hosts.deny 37 | sshd:all 38 | EOF 39 | 40 | linx自定义终端 41 | vim .bashrc 42 | PS1="\[\e[37;40m\][\[\e[32;40m\]\u\[\e[37;40m\]@\h \[\e[35;40m\]\w\[\e[0m\]]\\$ " 43 | export PROMPT_COMMAND='{ msg=$(history 1 | { read x y; echo $y; });user=$(whoami); echo $(date "+%Y-%m-%d %H:%M:%S"):$user:`pwd`/:$msg ---- $(who am i); } >> /tmp/`hostname`.`whoami`.history-timestamp' 44 | 45 | #反复删除文件 46 | shred -zvu -n 5 * 47 | 48 | #删除xxx以外文件 49 | shopt -u extglob #关闭 50 | shopt -s extglob #打开 51 | 52 | shopt -s extglob 53 | rm -rf !(acl.conf.xml|event_socket.conf.xml|modules.conf.xml) 54 | ls | grep -v keep | xargs rm 55 | rm `ls | grep -v"^aa$" ` 56 | 57 | /home/kunshiweb/base/apache-tomcat/webapps/chs 58 | #linux记录用户行为 59 | echo '/usr/bin/script -qaf /var/log/$USER-$UIDO-`date +%Y%m%d%H%M`.log' >>/root/.bash_profile 60 | #配置环境变量记录用户行为 61 | export PROMPT_COMMAND='{ msg=$(history 1|{ read x y;echo $y; } );logger "[euid=$(whoami)]":$(who am i):[`pwd`]"$msg";}' 62 | 63 | #开机时间 64 | awk '{a=$1/86400;b=($1%86400)/3600;c=($1%3600)/60;d=$1%60} {printf("%ddays, %d:%d:%d\n",a,b,c,d)}' /proc/uptime 65 | #自动回车功能 66 | echo -e "\n" |rpm -ivh vos3000-2.1.4-0.i586.rpm 67 | echo y | rm -i a.txt 68 | vos4.0 69 | #修改web密码 70 | echo '密码' > /var/www/html/passwd 71 | #查看系统标识码 72 | cat /home/kunshi/vos3000/server/etc/server.conf 73 | #修改mysql密码 74 | update e_user set password='c0c73baafbde78e1c22f1a44e5da636037cc5fcf65859f432b68e910624358d75f9161c54bc3a13058c13ef7cea17caa2bdac369ba10cb9e8d08849297090905' where id=1; 75 | update e_user set password='1e99769964ff33ab9d94dd8530c15be9903211eb7f848899dc6d2d842796ef2768f71148ef297dfcf2c77943a154ad7b7ddb7f4c7d339350ff86e4d918214de3' where id=1; 76 | flush privileges; 77 | #修改roos进去mysql的密码 78 | set password for root@localhost = password('xiaofan@1'); 79 | 依赖环境 80 | error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory 81 | 错误 82 | yum whatprovides libstdc++.so.6 83 | yum install -y libstdc++-4.1.2-55.el5.i386 84 | 85 | #yum错误 86 | There are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them. 87 | The program yum-complete-transaction is found in the yum-utils package. 88 | #解决方法 89 | yum install yum-utils 90 | yum-complete-transaction --cleanup-only 91 | package-cleanup --dupes 92 | package-cleanup --problems 93 | yum安装crontab 94 | yum install -y vixie-cron 95 | yum install -y crontabs 96 | chkconfig --level 345 crond on 97 | #为避免这种问题,在64位系统中,要同时安装64位的包和32位的兼容包 98 | yum install glibc.i686 -y 99 | #perl报错 100 | error: unpacking of archive failed on file /usr/bin/dbiprof;599ce193: cpio: open failed - Permission denied 101 | 解决方法 102 | lsattr /usr | grep bin ----i-----I-- /usr/bin 103 | chattr -i /usr/bin 104 | #关机 105 | shutdown -h +240 & 106 | shutdown -h 20:00 107 | 内核报错 108 | ip_conntrack version 2.4 (8192 buckets, 65536 max) - 228 bytes per conntrack 109 | vi /etc/sysctl.conf 110 | net.ipv4.netfilter.ip_conntrack_max = 655350 111 | net.ipv4.netfilter.ip_conntrack_tcp_timeout_established = 1200 112 | 问题处理 113 | PAM [error: /lib/security/pam_fprintd.so: cannot open shared object file: No such file or directory] 114 | yum install fprintd-pam 115 | 或者 116 | authconfig --disablefingerprint --update 117 | 118 | rm -rf /etc/yum.repos.d/* 119 | cat < /etc/yum.repos.d/CentOS.repo 120 | [base] 121 | name=CentOS 122 | name=CentOS-$releasever - Base - Myki 123 | baseurl=http://yum.1nth.com/ 124 | gpgcheck=1 125 | gpgkey=http://yum.1nth.com/RPM-GPG-KEY-CentOS-5 126 | EOF 127 | 128 | yum clean 129 | yum makecache 130 | yum install -y php httpd 131 | 132 | 运行setup,打开iptables(注意:必须将ssh端口加入白名单,否则会导致连不上服务器) 还有关闭selinux 133 | #阿里云内网 134 | wget http://21k.oss-cn-qingdao-internal.aliyuncs.com/vospag/vos3000-2.1.4.0.tar.gz 135 | #网络下载 136 | wget http://oss.1nth.com/vospag/vos3000-2.1.4.0.tar.gz 137 | tar -zxvf vos3000-2.1.4.0.tar.gz 138 | setenforce 0 139 | sh create_user_kunshi.sh 140 | sh create_user_kunshiweb.sh 141 | rpm -ivh perl-DBI-1.40-5.i386.rpm 142 | rpm -ivh MySQL-server-community-5.0.96-1.rhel5.x86_64.rpm 143 | rpm -ivh MySQL-client-community-5.0.96-1.rhel5.x86_64.rpm 144 | tee /etc/my.cnf <<-'EOF' 145 | [client] 146 | port=3306 147 | default-character-set=utf8 148 | [mysqld] 149 | default-character-set=utf8 150 | max_connections=160 151 | interactive_timeout=310000 152 | wait_timeout=31000 153 | query_cache_size=48M 154 | table_cache=320 155 | tmp_table_size=52M 156 | thread_cache_size=8 157 | sort_buffer_size=256K 158 | innodb_thread_concurrency=8 159 | myisam-recover=FORCE 160 | max_allowed_packet=32M 161 | innodb_file_per_table=1 162 | EOF 163 | 164 | service mysql restart 165 | rpm -ivh jdk-6u45-linux-amd64.rpm 166 | tar zxvf apache-tomcat-7.0.23.tar.gz 167 | mv apache-tomcat-7.0.23 /home/kunshiweb/base/apache-tomcat 168 | chmod 777 jrockit-jdk1.6.0_45-R28.2.7-4.1.0-linux-x64.bin 169 | ./jrockit-jdk1.6.0_45-R28.2.7-4.1.0-linux-x64.bin 170 | 看见next就回车 171 | 172 | 173 | cp -r /root/jrockit-jdk1.6.0_45-R28.2.7-4.1.0 /home/kunshi/base/jdk_default 174 | cp -r /root/jrockit-jdk1.6.0_45-R28.2.7-4.1.0 /home/kunshiweb/base/jdk_default 175 | rpm -ivh vos3000-2.1.4-0.i586.rpm 176 | eb3c5bc7-5f7e-4494-8027-0280ffffffff 177 | 178 | 179 | rpm -ivh emp-2.1.4-0.noarch.rpm 180 | rpm -ivh callservice-2.1.4-0.i586.rpm 181 | rpm -ivh mgc-2.1.4-0.i586.rpm 182 | 183 | 184 | rpm -ivh vos3000-web*.rpm 185 | 186 | 187 | rpm -ivh mbx3000-2.1.4-0.i586.rpm 188 | rpm -ivh ivr_dial-2.1.4-0.i586.rpm 189 | rpm -ivh callcenter-2.1.4-0.i586.rpm ------可以不安装,没用 190 | 191 | 192 | 安装话机服务: 193 | cd phoneservice/ 194 | cp -r phoneservice /home/kunshi/ 195 | chmod 777 /home/kunshi/phoneservice/bin/phoneservice 196 | cp -r phoneserviced /etc/init.d/ 197 | chmod 777 /etc/rc.d/init.d/phoneserviced 198 | chkconfig phoneserviced on 199 | service phoneserviced restart 200 | 201 | 202 | cd .. 203 | chmod 777 vos30002140.bin 204 | ./vos30002140.bin 205 | ifconfig 206 | mkdir /home/kunshi/license 207 | mv *_license.dat /home/kunshi/license/license.dat 208 | chmod 777 -R /home/kunshi/license/ 209 | chown kunshi:kunshi -R /home/kunshi/license/ 210 | 211 | wget http://oss.1nth.com/vospag/vos2.4pag.tar.gz 212 | tar xzf vos2.4pag.tar.gz 213 | mv -f libcap.so /home/kunshi/vos3000/server/lib/libcap.so >/dev/null 214 | mv -f vos3000d /etc/init.d/vos3000d >/dev/null 215 | mv -f vos3000webct /etc/init.d/vos3000webct >/dev/null 216 | chmod 777 /home/kunshi/vos3000/server/lib/libcap.so 217 | chown kunshi:kunshi /home/kunshi/vos3000/server/lib/libcap.so 218 | chmod 770 /etc/init.d/vos3000webct 219 | chown kunshiweb:kunshiweb /etc/init.d//vos3000webct 220 | chmod 770 /etc/init.d/vos3000d 221 | chown kunshi:kunshi /etc/init.d/vos3000d 222 | rm -rf vos3000d vos3000webct libcap.so vos2.4pag.tar.gz 223 | history -c 224 | wget http://oss.1nth.com/vospag/vossafe.bin 225 | sh vossafe.bin 226 | 227 | #chkconfig * on 228 | for i in callcenterd callserviced empd ivrdiald mbx3000d mgcserverd phoneserviced vos3000d vos3000webct vos3000websv crond iptables httpd mysql ;do chkconfig $i on ;done 229 | echo -e "0 0 */3 * * rm -rf /home/kunshi/license/license.dat\n01 01 * * * /etc/init.d/iptables restart" >> /var/spool/cron/root 230 | 231 | 232 | tee /etc/sysconfig/iptables <<-'EOF' 233 | #iptables 234 | # Generated by iptables-save v1.3.5 on Fri Jul 22 20:35:06 2016 235 | *filter 236 | :INPUT DROP [5:200] 237 | :FORWARD ACCEPT [0:0] 238 | :OUTPUT ACCEPT [4:328] 239 | -A INPUT -i lo -j ACCEPT 240 | -A INPUT -p tcp -m tcp --dport 88 -j ACCEPT 241 | -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT 242 | -A INPUT -p tcp -m tcp --dport 8080 -j ACCEPT 243 | -A INPUT -p tcp -m tcp --dport 1719 -j ACCEPT 244 | -A INPUT -p tcp -m tcp --dport 1720 -j ACCEPT 245 | -A INPUT -p tcp -m tcp --dport 3719 -j ACCEPT 246 | -A INPUT -p tcp -m tcp --dport 3720 -j ACCEPT 247 | -A INPUT -p tcp -m tcp --dport 10000:49999 -j ACCEPT 248 | -A INPUT -p udp -m udp --dport 5060 -j ACCEPT 249 | -A INPUT -p udp -m udp --dport 5070 -j ACCEPT 250 | -A INPUT -p udp -m udp --dport 10000:49999 -j ACCEPT 251 | #-A INPUT -p icmp --icmp-type any -j DROP 252 | -A INPUT -p icmp -m icmp --icmp-type 0 -j ACCEPT 253 | -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT 254 | COMMIT 255 | # Completed on Fri Jul 11 10:18:06 2017 256 | # 小樊整理防火墙联系QQ85959493 257 | EOF 258 | 259 | /sbin/iptables -I INPUT -s 183.15.177.34 -j ACCEPT 260 | 261 | 262 | chown mysql:mysql 263 | apache ALL=(ALL) NOPASSWD: ALL 264 | chmod 440 /etc/sudoers 265 | 266 | /home/kunshiweb/base/apache-tomcat/webapps/chs 267 | #修改4.0web端口号路径 268 | vi /home/kunshiweb/base/apache-tomcat/conf/server.xml 269 | crontab -e 270 | vi /var/spool/cron/root 271 | 1 */6 * * * /opt/MbxWatch.sh 272 | 1 */1 * * * /opt/freemem.sh 273 | 01 01 * * * /etc/init.d/iptables restart 274 | 275 | 276 | 277 | 278 | #!/bin/bash 279 | wget http://21k.oss-cn-qingdao.aliyuncs.com/vospag/vossafe.tar.gz 280 | tar -zxvf vossafe.tar.gz 281 | rm -rf /etc/yum.repos.d/* 282 | cat < /etc/yum.repos.d/CentOS.repo 283 | [base] 284 | name=CentOS 285 | name=CentOS-$releasever - Base - Myki 286 | baseurl=http://yum.21k.bid/ 287 | gpgcheck=1 288 | gpgkey=http://yum.21k.bid/RPM-GPG-KEY-CentOS-5 289 | EOF 290 | 291 | yum clean all 292 | yum makecache 293 | yum install -y httpd php 294 | mv html/ /opt/ 295 | cd vossafe/ 296 | yes|mv httpd.conf /etc/httpd/conf/httpd.conf 297 | yes|mv sudoers /etc/sudoers 298 | yes|mv iptables /etc/sysconfig/iptables 299 | service httpd restart 300 | service iptables restart 301 | chkconfig iptables on 302 | chkconfig httpd on 303 | chkconfig mysql on 304 | 305 | 306 | echo -e "1 */6 * * * /opt/MbxWatch.sh\n1 */1 * * * /opt/freemem.sh\n01 01 * * * /etc/init.d/iptables restart" >> /var/spool/cron/root 307 | 308 | 309 | 310 | echo -e "cheche ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers 311 | echo >/var/log/wtmp 312 | echo > /var/log/btmp 313 | echo > /var/log/lastlog 314 | echo > /var/log/secure 315 | echo > ~/.bash_history 316 | echo > ~/.mysql_history 317 | echo > /var/log/messages 318 | history -c 319 | #vos 2009 4.0安装 320 | setenforce 0 321 | sh create_user_kunshi.sh 322 | sh create_user_kunshiweb.sh 323 | rpm -ivh perl-DBI-1.40-5.i386.rpm 324 | rpm -ivh MySQL-server-community-5.0.96-1.rhel5.x86_64.rpm 325 | rpm -ivh MySQL-client-community-5.0.96-1.rhel5.x86_64.rpm 326 | tee /etc/my.cnf <<-'EOF' 327 | service mysql restart 328 | rpm -ivh jdk-6u45-linux-amd64.rpm 329 | tar zxvf apache-tomcat-7.0.23.tar.gz 330 | mv apache-tomcat-7.0.23 /home/kunshiweb/base/apache-tomcat 331 | chmod 777 jrockit-jdk1.6.0_45-R28.2.7-4.1.0-linux-x64.bin 332 | ./jrockit-jdk1.6.0_45-R28.2.7-4.1.0-linux-x64.bin 333 | cp -r /root/jrockit-jdk1.6.0_45-R28.2.7-4.1.0 /home/kunshi/base/jdk_default 334 | cp -r /root/jrockit-jdk1.6.0_45-R28.2.7-4.1.0 /home/kunshiweb/base/jdk_default 335 | rpm -ivh vos3000-2.1.4-0.i586.rpm 336 | rpm -ivh vos2009-2.1.4-0.i586.rpm 337 | rpm -ivh emp-2.1.4-0.noarch.rpm 338 | rpm -ivh callservice-2.1.4-0.i586.rpm 339 | rpm -ivh mgc-2.1.4-0.i586.rpm 340 | rpm -ivh vos2009-web*.rpm 341 | rpm -ivh mbx2009-2.1.4-0.i586.rpm 342 | rpm -ivh ivr_dial-2.1.4-0.i586.rpm 343 | rpm -ivh callservice-2.1.4-0.i586.rpm 344 | cd phoneservice/ 345 | cp -r phoneservice /home/kunshi/ 346 | chmod 777 /home/kunshi/phoneservice/bin/phoneservice 347 | cp -r phoneserviced /etc/init.d/ 348 | chmod 777 /etc/rc.d/init.d/phoneserviced 349 | chkconfig phoneserviced on 350 | service phoneserviced restart 351 | sh vos20092140.bin 352 | ifconfig 353 | mkdir /home/kunshi/license 354 | chmod 777 -R /home/kunshi/license/ 355 | mv *license.dat /home/kunshi/license/license.dat 356 | chown kunshi:kunshi -R /home/kunshi/license/ 357 | 358 | 359 | vos4.0卸载命令 360 | rm -rf /etc/init.d/phoneserviced 361 | rpm -e callcenter 362 | rpm -e ivr_dial 363 | rpm -e mbx3000 364 | rpm -e $(rpm -qa|grep vos3000-web) 365 | rpm -e mgc 366 | rpm -e callservice 367 | rpm -e emp 368 | rpm -e vos3000 369 | rpm -e jdk 370 | rpm -e $(rpm -qa|grep -i mysql) 371 | rpm -e perl-DBI 372 | rm -rf /etc/my.cnf 373 | rm -rf /var/lib/mysql/ 374 | rm -rf /home/kunshi/ 375 | rm -rf /home/kunshiweb/ 376 | userdel -f kunshi 377 | userdel -f kunshiweb 378 | 379 | 380 | #mysql迁移位置 381 | [client] 382 | port=3306 383 | default-character-set=utf8 384 | socket=/data/mysql/mysql.sock 385 | [mysqld] 386 | datadir=/data/mysql 387 | socket=/data/mysql/mysql.sock 388 | user=mysql 389 | symbolic-links=0 390 | default-character-set=utf8 391 | max_connections=160 392 | interactive_timeout=310000 393 | wait_timeout=31000 394 | query_cache_size=48M 395 | table_cache=320 396 | tmp_table_size=52M 397 | thread_cache_size=8 398 | sort_buffer_size=256K 399 | innodb_thread_concurrency=8 400 | myisam-recover=FORCE 401 | max_allowed_packet=32M 402 | innodb_file_per_table=1 403 | 404 | [mysqld_safe] 405 | log-error=/var/log/mysqld.log 406 | pid-file=/var/run/mysqld/mysqld.pid 407 | 408 | mysql_install_db 409 | #昆石官方升级命令 410 | ntpdate 172.100.100.1 411 | netstat -na -t 412 | netstat -na -u 413 | mkdir cdr 414 | cp -dprf vos2009 vos2009backup 415 | mv vos2009/e_cdr_2014* cdr/ 416 | 417 | -java -jar vos30002124reg.jar ip mac rpmtime vostime jdktime ivr line language userinfo timestamp 418 | java -jar vos30002140.jar 101.37.12.30,10.241.104.203 00-16-3E-12-EA-30 1408326133 1499654430 1499654373 10000 20000 en_us 766F733230303932313430 1600000000 419 | pause 420 | 421 | 422 | 防止vos超频功能 423 | 424 | 425 | 426 | 427 | 428 | 429 | #centos6.4内核 430 | #修改内核 431 | rpm -ivh kernel-2.6.32-358.el6.x86_64.rpm --nodeps --force 432 | rpm -ivh kernel-devel-2.6.32-358.el6.x86_64.rpm 433 | rpm -ivh kernel-headers-2.6.32-358.el6.x86_64.rpm --nodeps --force 434 | rpm -ivh kernel-firmware-2.6.32-358.el6.noarch.rpm 435 | 436 | rpm -e kernel-headers-2.6.32-696.10.1.el6.x86_64 437 | rpm -e kernel-firmware-2.6.32-696.10.1.el6.noarch 438 | rpm -e irqbalance-1.0.7-8.el6.x86_64 439 | rpm -e kernel-2.6.32-696.10.1.el6.x86_64 440 | 441 | rpm -vih irqbalance-1.0.4-3.el6.x86_64.rpm 442 | 443 | 不记录无效话单 444 | 445 | 446 | 负载均衡 447 | grant all privileges on *.* to cheche@"%" identified by "xiaofan@1" with grant option; 448 | flush privileges; 449 | 添加访问权限 450 | show grants; 451 | create user 'root'@'10.80.184.48' identified by ""; 452 | grant all on *.* to 'root'@'10.80.184.48'; 453 | flush privileges; 454 | select user,host,password from user; 455 | drop user 'root'@'10.80.184.48'; 456 | select user,host,password from mysql.user; 457 | 458 | -------------------------------------------------------------------------------- /update_source.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ######################################### 3 | #Function: update source 4 | #Usage: bash update_source.sh 5 | #Author: Customer service department 6 | #Company: Alibaba Cloud Computing 7 | #Version: 5.0 8 | ######################################### 9 | 10 | check_os_release() 11 | { 12 | while true 13 | do 14 | os_release=$(grep "Red Hat Enterprise Linux Server release" /etc/issue 2>/dev/null) 15 | os_release_2=$(grep "Red Hat Enterprise Linux Server release" /etc/redhat-release 2>/dev/null) 16 | if [ "$os_release" ] && [ "$os_release_2" ] 17 | then 18 | if echo "$os_release"|grep "release 5" >/dev/null 2>&1 19 | then 20 | os_release=redhat5 21 | echo "$os_release" 22 | elif echo "$os_release"|grep "release 6" >/dev/null 2>&1 23 | then 24 | os_release=redhat6 25 | echo "$os_release" 26 | else 27 | os_release="" 28 | echo "$os_release" 29 | fi 30 | break 31 | fi 32 | os_release=$(grep "Aliyun Linux release" /etc/issue 2>/dev/null) 33 | os_release_2=$(grep "Aliyun Linux release" /etc/aliyun-release 2>/dev/null) 34 | if [ "$os_release" ] && [ "$os_release_2" ] 35 | then 36 | if echo "$os_release"|grep "release 5" >/dev/null 2>&1 37 | then 38 | os_release=aliyun5 39 | echo "$os_release" 40 | elif echo "$os_release"|grep "release 6" >/dev/null 2>&1 41 | then 42 | os_release=aliyun6 43 | echo "$os_release" 44 | elif echo "$os_release"|grep "release 7" >/dev/null 2>&1 45 | then 46 | os_release=aliyun7 47 | echo "$os_release" 48 | else 49 | os_release="" 50 | echo "$os_release" 51 | fi 52 | break 53 | fi 54 | os_release_2=$(grep "CentOS" /etc/*release 2>/dev/null) 55 | if [ "$os_release_2" ] 56 | then 57 | if echo "$os_release_2"|grep "release 5" >/dev/null 2>&1 58 | then 59 | os_release=centos5 60 | echo "$os_release" 61 | elif echo "$os_release_2"|grep "release 6" >/dev/null 2>&1 62 | then 63 | os_release=centos6 64 | echo "$os_release" 65 | elif echo "$os_release_2"|grep "release 7" >/dev/null 2>&1 66 | then 67 | os_release=centos7 68 | echo "$os_release" 69 | else 70 | os_release="" 71 | echo "$os_release" 72 | fi 73 | break 74 | fi 75 | os_release=$(grep -i "ubuntu" /etc/issue 2>/dev/null) 76 | os_release_2=$(grep -i "ubuntu" /etc/lsb-release 2>/dev/null) 77 | if [ "$os_release" ] && [ "$os_release_2" ] 78 | then 79 | if echo "$os_release"|grep "Ubuntu 10" >/dev/null 2>&1 80 | then 81 | os_release=ubuntu10 82 | echo "$os_release" 83 | elif echo "$os_release"|grep "Ubuntu 12.04" >/dev/null 2>&1 84 | then 85 | os_release=ubuntu1204 86 | echo "$os_release" 87 | elif echo "$os_release"|grep "Ubuntu 12.10" >/dev/null 2>&1 88 | then 89 | os_release=ubuntu1210 90 | echo "$os_release" 91 | elif echo "$os_release"|grep "Ubuntu 14.04" >/dev/null 2>&1 92 | then 93 | os_release=ubuntu1204 94 | echo "$os_release" 95 | else 96 | os_release="" 97 | echo "$os_release" 98 | fi 99 | break 100 | fi 101 | os_release=$(grep -i "debian" /etc/issue 2>/dev/null) 102 | os_release_2=$(grep -i "debian" /proc/version 2>/dev/null) 103 | if [ "$os_release" ] && [ "$os_release_2" ] 104 | then 105 | if echo "$os_release"|grep "Linux 6" >/dev/null 2>&1 106 | then 107 | os_release=debian6 108 | echo "$os_release" 109 | elif echo "$os_release"|grep "Linux 7" >/dev/null 2>&1 110 | then 111 | os_release=debian7 112 | echo "$os_release" 113 | else 114 | os_release="" 115 | echo "$os_release" 116 | fi 117 | break 118 | fi 119 | os_release=$(grep -i "opensuse" /etc/issue 2>/dev/null) 120 | os_release_2=$(grep -i "opensuse" /etc/*release 2>/dev/null) 121 | if [ "$os_release" ] && [ "$os_release_2" ] 122 | then 123 | if echo "$os_release"|grep "openSUSE 13.1" >/dev/null 2>&1 124 | then 125 | os_release=opensuse1301 126 | echo "$os_release" 127 | else 128 | os_release="" 129 | echo "$os_release" 130 | fi 131 | break 132 | fi 133 | break 134 | done 135 | } 136 | 137 | modify_aliyun5_yum() 138 | { 139 | wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyuncs.com/repo/Centos-5.repo 140 | sed -i 's/\$releasever/5/' /etc/yum.repos.d/CentOS-Base.repo 141 | wget -qO /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-5.repo 142 | yum clean metadata 143 | yum makecache 144 | cd ~ 145 | } 146 | 147 | modify_rhel5_yum() 148 | { 149 | wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyuncs.com/repo/Centos-5.repo 150 | wget -qO /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-5.repo 151 | yum clean metadata 152 | yum makecache 153 | cd ~ 154 | } 155 | 156 | modify_rhel6_yum() 157 | { 158 | wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyuncs.com/repo/Centos-6.repo 159 | wget -qO /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo 160 | yum clean metadata 161 | yum makecache 162 | cd ~ 163 | } 164 | 165 | modify_rhel7_yum() 166 | { 167 | wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyuncs.com/repo/Centos-7.repo 168 | wget -qO /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo 169 | yum clean metadata 170 | yum makecache 171 | cd ~ 172 | } 173 | 174 | update_ubuntu10_apt_source() 175 | { 176 | echo -e "\033[40;32mBackup the original configuration file,new name and path is /etc/apt/sources.list.back.\n\033[40;37m" 177 | cp -fp /etc/apt/sources.list /etc/apt/sources.list.back 178 | cat > /etc/apt/sources.list < /etc/apt/sources.list < /etc/apt/sources.list < /etc/apt/sources.list < /etc/apt/sources.list < /etc/apt/sources.list <