代码拉取完成,页面将自动刷新
同步操作将从 Vos3000/vos 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#!/bin/sh
echo "Starting install VOS3000 System"
IP=21k.oss-cn-qingdao-internal.aliyuncs.com/vospag
FILE=vos3000-2.1.4.0.tar.gz
VOS3000_FILE=$FILE
URL=http://$IP/$VOS3000_FILE
echo $URL
OS=`head -n 1 /etc/issue |awk '{ print $3}'`
echo $OS
#检查服务器系统是满足安装VOS要求
check_version()
{
if [ "$OS" -lt 6.0 ]
then
echo "CentOS version must be 5.x"
exit 0
fi
}
download_vos()
{
wget $URL
}
#配置服务器安装环境
set_install_path()
{
rm -rf /etc/yum.repos.d/*
tee /etc/yum.repos.d/CentOS.repo <<-'EOF'
[base]
name=CentOS
name=CentOS-$releasever - Base - Myki
baseurl=http://yum.1nth.com/
gpgcheck=1
gpgkey=http://yum.1nth.com/RPM-GPG-KEY-CentOS-5
EOF
yum clean all
yum makecache
yum remove -y mysql jdk
rpm -qa|grep -i mysql|xargs rpm -e
rpm -qa|grep -i jdk|xargs rpm -e
}
#添加kunshi和kunshiweb用户
add_kunshi_user()
{
tar -xvzf $FILE
cd vos4.0/
sh create_user_kunshi.sh
sh create_user_kunshiweb.sh
}
#安装数据库
install_mysql()
{
rpm -ivh perl-DBI-1.40-5.i386.rpm
rpm -ivh MySQL-server-community-5.0.96-1.rhel5.x86_64.rpm
rpm -ivh MySQL-client-community-5.0.96-1.rhel5.x86_64.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
echo -e "\n"
chkconfig mysql on
}
#安装tomcat和java环境
java_tomcat_home()
{
rpm -ivh jdk-6u45-linux-amd64.rpm
tar zxvf apache-tomcat-7.0.23.tar.gz
mv apache-tomcat-7.0.23 /home/kunshiweb/base/apache-tomcat
chmod 777 jrockit-jdk1.6.0_45-R28.2.7-4.1.0-linux-x64.bin
echo -e "\n" |./jrockit-jdk1.6.0_45-R28.2.7-4.1.0-linux-x64.bin
cp -r /root/jrockit-jdk1.6.0_45-R28.2.7-4.1.0 /home/kunshi/base/jdk_default
cp -r /root/jrockit-jdk1.6.0_45-R28.2.7-4.1.0 /home/kunshiweb/base/jdk_default
}
#安装VOS安装包
install_vos()
{
rpm -ivh vos3000-2.1.4-0.i586.rpm
rpm -ivh emp-2.1.4-0.noarch.rpm
rpm -ivh callservice-2.1.4-0.i586.rpm
rpm -ivh mgc-2.1.4-0.i586.rpm
rpm -ivh vos3000-web*.rpm
rpm -ivh mbx3000-2.1.4-0.i586.rpm
rpm -ivh ivr_dial-2.1.4-0.i586.rpm
rpm -ivh callcenter-2.1.4-0.i586.rpm
}
#安装话机服务
install_phoneservice()
{
cd phoneservice/
cp -r phoneservice /home/kunshi/
chmod 777 /home/kunshi/phoneservice/bin/phoneservice
cp -r phoneserviced /etc/init.d/
chmod 777 /etc/rc.d/init.d/phoneserviced
chkconfig phoneserviced on
service phoneserviced restart
}
#获取授权信息
make_license()
{
cd ..
PWD=`pwd`
chmod 777 vos30002140.bin
mkdir -p /home/kunshi/license
chmod 777 -R /home/kunshi/license/
chown kunshi:kunshi -R /home/kunshi/license/
CRACK_FILE=$PWD/vos30002140.bin
CRACK_LOG=$PWD/crackvos.log
$PWD/vos30002140.bin >$PWD/crackvos.log
JDK_TIME=`sed -n 11p $CRACK_LOG`
VOS_TIME=`sed -n 9p $CRACK_LOG`
RPM_TIME=`sed -n 7p $CRACK_LOG`
IP_ADDRESS=`ifconfig | grep -v '127.0.0.1' | awk '/inet addr/ {split($2,x,":");print x[2]}'`
MAC=`ifconfig |grep -o -E '([[:xdigit:]]{1,2}:){5}[[:xdigit:]]{1,2}'|sed 's|:|-|g'`
echo -e "\033[40;32mIP_ADDRESS=$IP_ADDRESS\n\033[40;37m"
echo -e "\033[40;32mMAC=$MAC\n\033[40;37m"
echo -e "\033[40;32mRPM_TIME=$RPM_TIME\n\033[40;37m"
echo -e "\033[40;32mVOS_TIME=$VOS_TIME\n\033[40;37m"
echo -e "\033[40;32mJDK_TIME=$JDK_TIME\n\033[40;37m"
}
#清除VOS文件和历史记录
erase_vos_file_history()
{
cd ..
VOSPWD=`pwd`
rm -rf $VOSPWD/vos3000-2.1.4.0.tar.gz
rm -rf $VOSPWD/vos4.0
#清楚操作记录
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
}
#运行步骤1/2/3...
#check_version
#download_vos
set_install_path
add_kunshi_user
install_mysql
java_tomcat_home
install_vos
install_phoneservice
make_license
#erase_vos_file_history
echo "Congratulation! VOS3000 has been installed successfully!"
echo "Contact me if you want to crack the vos3000 2.1.4.0"
echo -e "\033[45;37;5m My QQ: 85959493 \033[0m"
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。