- Download TinyPM war for tomcat 6.x from here
- Install tomcat 6.x and mysql-server (5.x)
sudo apt-get install tomcat6 mysql-server
- Download mysql connector / j from mysql website (5.x)
- Go to /usr/share/tomcat6/lib copy the files in the dependency folder of the tinypm zip file downloaded in step 1. Copy the MySQL connector jar file here.
- Create a database using the following commands
CREATE DATABASE tinypmdb CHARACTER SET = 'utf8' COLLATE = 'utf8_general_ci';
- Create a user with SELECT, UPDATE, INSERT, LOCK TABLES and DELETE rights:
GRANT SELECT, UPDATE, INSERT, LOCK TABLES, DELETE ON tinypmdb.* TO 'username'@'localhost' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
- Run scripts to create the tinyPM database schema and data (instructions provided here are for MySQL console application):
u tinypmdb
. %PATH_TO_INSTALL_FOLDER%/sql/mysql/create_schema-2.x.sql
. %PATH_TO_INSTALL_FOLDER%/sql/mysql/create_data-2.x.sql
- Create search index using commands
sudo mkdir /var/search_index /var/search_index/tinypm
sudo chown -R tomcat6:tomcat6 /var/search_index/tinypm
- Create /var/lib/tomcat6/webapps/tinypm, extract the contents of the war file into this folder.
- Edit /var/lib/tomcat6/webapps/tinypm/WEB-INF/classes/hibernate.properties and enter the MySQL db details. uncomment the last line
#hibernate.search.default.indexBase = /var/search_index/tinypm
- Restart tomcat with sudo service tomcat6 restart, visit http://localhost:8080/tinypm (default credentials are admin/admin)