Saya menggunakan jasperserver versi di bawah, karena untuk mempermudah saja, installnya.
Karena sudah bundle dengan MySql, dan tomcat.
jasperserver-2.1-linux-installer.bin
Installasi saya taruh di /home/jasperserver-2.1
[root@temo jasperserver-2.1]# ls
ant jasperctl.sh license.txt scripts
apache-tomcat java mysql uninstall
docs js-installer-version.txt releaseNotes.txt
ireport licenses samples
[root@temo jasperserver-2.1]#
/home/jasperserver-2.1/apache-tomcat/webapps
copy folder jasperserver ke jasperprc, jaspershp, jaspervr di sesuaikan dgn namanya.
Edit file2 berikut, di sesuaikan dgn kebutuhan.
[root@temo WEB-INF]#
hibernate.properties jboss-web.xml web.xml
[root@temo WEB-INF]#
Edit web.xml, edit bagian ini ...
Di samakan dgn DBnya mysql.
Untuk hibernate.properties
# Properties file with JDBC-related settings.
# Applied by PropertyPlaceholderConfigurer from "applicationContext-*.xml".
# Targeted at system administrators, to avoid touching the context XML files.
# Property that determines the Hibernate dialect
metadata.hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect
metadata.hibernate.dataSource.jndiName=jdbc/jaspershp
Dan seterusnya.
Buat database di mysql.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| foodmart |
| jasperprc |
| jaspershp |
| jaspervr |
| mysql |
| sugarcrm |
| test |
+--------------------+
8 rows in set (0.03 sec)
mysql>
Edit file di :
/home/jasperserver-2.1/apache-tomcat/webapps/jaspershp/META-INF
nama file context.xml
name="jdbc/jaspershp"
type="javax.sql.DataSource"
password="passwordnya"
driverClassName="com.mysql.jdbc.Driver"
maxIdle="30"
maxWait="1000"
username="usernya"
url="jdbc:mysql://127.0.0.1:3306/jaspershp?useUnicode=true&characterEncoding=UTF-8"
maxActive="20"/>
Restart apache tomcat, melalui manager.
note: bbrp langkah di lewati, spt, create db, import db data(import DB data dump harus di ganti sesuai dbnya [use namadbnya])
Jangan lupa, update privilage untuk user jasperadmin agar bisa mengakses tabel yang baru
ReplyDelete