我很难找到一个好的教程来创建一个 highcharts 服务器。他们的安装页面似乎没有所需的内容。
http://docs.highcharts.com/#installation
这个 github 页面看起来更接近我所需要的,但我对 Tomcat 很陌生,并且在关注它时遇到了麻烦
https://github.com/highslide-software/highcharts.com/tree/master/exporting-server/java
到目前为止我所拥有的:
#!/bin/bash
#allow access for tomcat
/sbin/iptables -I INPUT -p tcp -m tcp --dport 8080 -j ACCEPT
echo "[OK]"
echo -n "Saving new rules"
(/etc/init.d/iptables save && echo "[OK]") || echo "[FAILED]"
service iptables restart
yum -y install tomcat6*
yum -y install java-1.7.0-openjdk java-1.7.0-openjdk-devel
service tomcat6 start
chkconfig --levels 35 tomcat6 on
wget http://download.nextag.com/apache/maven/maven-3/3.0.5/binaries/apache-maven-3.0.5-bin.tar.gz
tar -xzvf apache-maven-3.0.5-bin.tar.gz
mv apache-maven-3.0.5/ /usr/local/
echo 'export PATH=/usr/local/apache-maven-3.0.5/bin:$PATH' >> /etc/profile.d/maven.sh
yum -y install freetype freetype-devel
yum -y install fontconfig fontconfig-devel
wget https://phantomjs.googlecode.com/files/phantomjs-1.9.0-linux-x86_64.tar.bz2
tar -xjvf phantomjs-1.9.0-linux-x86_64.tar.bz2
yum -y install ant-* ant-apache* ant-commons-logging
yum -y install git
git clone https://github.com/highslide-software/highcharts.com.git
cd highcharts.com
ant assemble
ant lint
ant build
我想我需要编译highcharts,然后将它移动到tomcat目录/var/lib/tomcat6/webapps。但是当我运行 ant build 时出现错误
# ant build
Buildfile: build.xml
set.properties:
clean:
[mkdir] Created dir: /root/highcharts.com/build/dist/js/adapters
[mkdir] Created dir: /root/highcharts.com/build/dist/js/modules
[mkdir] Created dir: /root/highcharts.com/build/dist/highcharts/gfx
[mkdir] Created dir: /root/highcharts.com/build/dist/highcharts/js/adapters
[mkdir] Created dir: /root/highcharts.com/build/dist/highcharts/js/modules
[mkdir] Created dir: /root/highcharts.com/build/dist/highstock/gfx
[mkdir] Created dir: /root/highcharts.com/build/dist/highstock/js/adapters
[mkdir] Created dir: /root/highcharts.com/build/dist/highstock/js/modules
[mkdir] Created dir: /root/highcharts.com/build/tests
[mkdir] Created dir: /root/highcharts.com/build/coverage-report
assemble:
check-crlf:
do-lint:
lint:
minify:
compile:
BUILD FAILED
/root/highcharts.com/build.xml:378: The following error occurred while executing this line:
/root/highcharts.com/build.xml:336: java.lang.ClassNotFoundException: org.apache.bsf.engines.javascript.JavaScriptEngine
Total time: 9 seconds
但老实说,我什至不确定我是否以正确的方式处理这件事。我在正确的轨道上吗?有什么建议么?