1)tomcat8.5.35
2) mysql Ver 8.0.13 for Linux on x86_64 (MySQL Community Server - GPL)
3) mysql Ver 5.1.47(mysql-connector-java-5.1.47-bin.jar)
※最初mysql Ver.8を使ったら、ハマった!!、connectで接続エラー URLの仕様が変わったらしい。
下記をダウンロード
https://community.jaspersoft.com/project/jasperreports-server/releases
# unzip TIB_js-jrs-cp_7.1.0_bin.zip
# cd ./jasperreports-server-cp-7.1.0-bin/buildomatic/sample_conf
# cp mysql_master.properties ../default_master.properties
# cd ..
# vi default_master.properties
appServerType = tomcat
appServerDir = /opt/tomcat
dbType=mysql
dbPort=3306
js.dbName=jasperserver
dbHost=localhost
dbUsername=root
dbPassword=password
#---------JDBC Driver ---------------
jdbcDriverClass=com.mysql.cj.jdbc.Driver
maven.jdbc.groupId=mysql
maven.jdbc.artifactId=mysql-connector-java
maven.jdbc.version=5.1.47
# systemctl start mysqld
※商用DBの場合は、JDBCドライバのコピーが必要。
mysqlの場合(不要)
# cd ./conf_source/db
# mv mysql mysql.bak
# mkdir mysql mysql/jdbc
# cd mysql
# cp /tmp/mysql-connector-java-5.1.47.tar.gz .
# tar xvzf mysql-connector-java-5.1.47.tar.gz
# cp ./mysql-connector-java-5.1.47/mysql-connector-java-5.1.47-bin.jar jdbc
# cp -p ../mysql.bak/db.properties .
# cp -p ../mysql.bak/db.xml .
# cp -p ../mysql.bak/scripts.properties .
# cp -p ../mysql.bak/db.template.properties .
# vi db.properties
jdbcDriverClass=com.mysql.jdbc.Driver
maven.jdbc.groupId=mysql
maven.jdbc.artifactId=mysql-connector-java
maven.jdbc.version=5.1.47-bin
# cd ../../..
# pwd
~/jasperreports-server-cp-7.1.0-bin/buildomatic
# ./js-install-ce.sh
※????
# cp -p ./conf_source/db/mysql/db.xml .//build_conf/default/maven_settings.xml
【設定シェル】
# ダウンロードしたディレクトリで本shellを実行すると、
# /optにインストールする
#
export DWLDIR=`pwd`
export OPTDIR=/opt
export TOMDIR=/opt/tomcat
export BUIDIR=$OPTDIR/jasperreports-server-cp-7.1.0-bin/buildomatic
export MSQDIR=$BUIDIR/conf_source/db/mysql
export ASQDIR=$BUIDIR/conf_source/db/app-srv-jdbc-driver
cd $DWLDIR;tar xvzf mysql-connector-java-5.1.47.tar.gz
unzip $DWLDIR/TIB_js-jrs-cp_7.1.0_bin.zip -d $OPTDIR
cd $BUIDIR
cp $BUIDIR/sample_conf/mysql_master.properties $BUIDIR/default_master.properties
vi $BUIDIR/default_master.properties <<__EOF__ 2&>/dev/null
Go
########この内容を編集##############
appServerType = tomcat
appServerDir = /opt/tomcat
dbType=mysql
dbPort=3306
# js.dbName=jasperserver
# sugarcrm.dbName=sugarcrm
# foodmart.dbName=foodmart
js.dbName=jasperserver
sugarcrm.dbName=sugarcrm
foodmart.dbName=foodmart
dbHost=localhost
dbUsername=root
dbPassword=IWq%!d)DT5lt
##---------JDBC Driver ---------------
#jdbcDriverClass=com.mysql.cj.jdbc.Driver
jdbcDriverClass=com.mysql.jdbc.Driver
jdbcDataSourceClass=com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource
maven.jdbc.groupId=mysql_oracle
maven.jdbc.artifactId=mysql-connector-java
maven.jdbc.version=5.1.47-bin
########この内容を編集##############
←ESCコード(cntl+v esc)
ZZ
__EOF__
vi $BUIDIR/default_master.properties
set -xv
cp -rp $MSQDIR $MSQDIR.bak
rm -f $MSQDIR/jdbc/mariadb-java-client-1.6.3.jar
cp -p $DWLDIR/mysql-connector-java-5.1.47/mysql-connector-java-5.1.47-bin.jar $MSQDIR/jdbc
cp -p $DWLDIR/mysql-connector-java-5.1.47/mysql-connector-java-5.1.47-bin.jar $ASQDIR/jdbc
rm -rf $DWLDIR/mysql-connector-java-5.1.47
vi $MSQDIR/db.properties <<__EOF__ 2&>/dev/null
Go
########この内容を編集##############
jdbcDriverClass=com.mysql.jdbc.Driver
# jdbcDataSourceClass=org.mariadb.jdbc.MySQLDataSource
jdbcDataSourceClass=com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource
maven.jdbc.groupId=mysql_oracle
maven.jdbc.artifactId=mysql-connector-java
maven.jdbc.version=5.1.47-bin
########この内容を編集##############
←ESCコード(cntl+v esc)
ZZ
__EOF__
vi $MSQDIR/db.properties
pwd
cd $BUIDIR
pwd
rm $BUIDIR/conf_source/db/app-srv-jdbc-drivers/mariadb-java-client-1.6.3.jar
rm $BUIDIR/conf_source/ieCe/lib/mariadb-java-client-1.6.3.jar
./js-install-ce.sh
echo ----------------------FINISH-------------------
echo ------------------START TOMCAT -------------------
read
echo ------------------START COPY-------------------
cp -p $BUIDIR/build_conf/default/webapp/META-INF/context.xml $TOMDIR/webapps/jasperserver/META-INF/context.xml
cp -p $BUIDIR/build_conf/default/webapp/WEB-INF/hibernate.properties $TOMDIR/webapps/jasperserver/WEB-INF/hibernate.properties
cp -p $BUIDIR/build_conf/default/webapp/WEB-INF/js.quartz.properties $TOMDIR/webapps/jasperserver/WEB-INF/js.quartz.propertie
cp -p $BUIDIR/conf_source/db/mysql/jdbc/mysql-connector-java-5.1.47-bin.jar $TOMDIR/lib
echo tbeller.usejndi = false>$TOMDIR/webapps/jasperserver/WEB-INF/classes/resfactory.properties
chown tomcat:tomcat $TOMDIR/webapps/jasperserver/META-INF/context.xml $TOMDIR/webapps/jasperserver/WEB-INF/hibernate.properties $TOMDIR/webapps/jasperserver/WEB-INF/js.quartz.propertie $TOMDIR/lib/mysql-connector-java-5.1.47-bin.jar $TOMDIR/webapps/jasperserver/WEB-INF/classes/resfactory.properties
chmod go+rw $TOMDIR/webapps/jasperserver/WEB-INF/logs
0 件のコメント:
コメントを投稿