parse server erlang 封装
Apache License Version 2.0
jonhliu
#卸载环境中存在的jdk版本 for i in $(rpm -qa | grep jdk | grep -v grep) do echo "Deleting rpm -> "$i rpm -e --nodeps $i done
if [[ ! -z $(rpm -qa | grep jdk | grep -v grep) ]]; then echo "-->Failed to remove the defult Jdk." else if [ ! -f /data/jdk-8u291-linux-x64.tar.gz ]; then wget http://dgiot-1253666439.cos.ap-shanghai-fsi.myqcloud.com/dgiot4.0/jdk-8u291-linux-x64.tar.gz -O /data/jdk-8u291-linux-x64.tar.gz fi cd /data rm /usr/local/jdk1.8.0_291 -rf tar -zxvf jdk-8u291-linux-x64.tar.gz -C /usr/local #配置环境变量 if ! grep "JAVA_HOME=/usr/local/jdk1.8.0_291" /etc/profile then echo "export JAVA_HOME=/usr/local/jdk1.8.0_291" >>/etc/profile echo -e 'export JRE_HOME=/usr/local/java/jdk1.8.0_291/jre' >>/etc/profile echo -e 'export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib:$CLASSPATH' >>/etc/profile echo -e 'export PATH=$JAVA_HOME/bin:$PATH' >>/etc/profile source /etc/profile fi fi java -version
cd /data if [ ! -f /data/shuwa_report-4.0.0.zip ]; then wget http://dgiot-1253666439.cos.ap-shanghai-fsi.myqcloud.com/dgiot_release/shuwa_report-4.0.0.zip -O /data/shuwa_report-4.0.0.zip fi rm /data/shuwa_report-4.0.0 -rf unzip shuwa_report-4.0.0.zip
rm /usr/share/fonts/fonts.zip -rf rm /usr/share/fonts/zhFonts -rf
./shuwa_report-4.0.0/bin/fonts.sh
./shuwa_report-4.0.0/bin/startup.sh
sleep 10
yum install -y wget curl zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel libffi-devel
if [ ! -f /data/Python-3.8.0.tgz ]; then wget http://dgiot-1253666439.cos.ap-shanghai-fsi.myqcloud.com/dgiot4.0/Python-3.8.0.tgz -O /data/Python-3.8.0.tgz fi sleep 10
tar -xvf Python-3.8.0.tgz
cd Python-3.8.0 ./configure --prefix=/usr/local/python3 make && make install
/usr/bin/mv python python_bk /usr/bin/mv pip pip_bk ln -s /usr/local/python3/bin/python3 /usr/bin/python ln -s /usr/local/python3/bin/pip3 /usr/bin/pip
pip install numpy
pip install matplotlib
pip install pylab