Following are the steps through which we have setup an analytics of one complex database which helped our development team to gain insight of the database in no time.
It’s as simple as following below steps:
- Install JDK – https://www.digitalocean.com/community/tutorials/how-to-install-java-on-ubuntu-with-apt-get
- Install and setup Schema spy and graphviz – https://priyankacool10.wordpress.com/2012/10/13/how-to-install-schemaspy-for-a-database-in-ubuntu-12-04/
- Get pg connector – sudo wget http://jdbc.postgresql.org/download/postgresql-9.3-1102.jdbc4.jar
- Run below command after replacing db details, it will generate outputDir folder with required files in it.
java -jar schemaSpy_5.0.0.jar -t pgsql -host <database end point>:<db port> -db <db name> -u <db user> -p <db password> -o outputDir -dp postgresql-9.3-1102.jdbc4.jar -s public
- Install tomcat 7 in your EC2- sudo apt-get install tomcat7
- Now run this command to move your output folder to tomcat : sudo mv outputDir / /var/lib/tomcat7/webapps/db/
- Now you an access it through : http://<host>:8080/db/index.html
Feel free to contact us if you need any help setting it up in your project.