sudo su apt-get update apt-get install default-jdk
git clone https://github.com/ajanata/PretendYoureXyzzy.git cd PretendYoureXyzzy mv "build.properties.example" "build.properties"
now you might want to edit build.properties a bit;
nano build.properties
on line 13; you might want to add your own IP adress in order to be able to reach admin.jsp.
pyx.admin_addrs=ADD.YOUR.IP.ADRESS,127.0.0.1,0:0:0:0:0:0:0:1
you need to uncomment line 61 to 63 and comment 65 to 68. Also change
hibernate.url=jdbc:postgresql://localhost/pyx
to hibernate.url=jdbc:postgresql://localhost/cah
60 # for production use, use postgres 61 hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect 62 hibernate.driver_class=org.postgresql.Driver 63 hibernate.url=jdbc:postgresql://localhost/cah 64 65 # for local use, you can also use sqlite 66 # hibernate.dialect=net.socialgamer.cah.hibernate.SqliteDialect 67 # hibernate.driver_class=org.sqlite.JDBC 68 # hibernate.url=jdbc:sqlite:pyx.sqlite
then you need to set your password on line 72
# these likely need specified even with sqlite, even though they don't matter hibernate.username=pyx hibernate.password=PASSWORDHERE
apt-get install tomcat7 tomcat7-admin
once all the installations have finished you will need to stop the tomcat service
service tomcat7 stop
next, you have to edit users file in order to add yourself an administrator account
sudo nano /etc/tomcat7/tomcat-users.xml
there, you might see tomcat-users tag. You need to add the following line inside of that tag, obviously replacing username and password with something you are comfortable with.
<user username="admin" password="password" roles="manager-gui,admin-gui"/>
now we need to install PostgreSQL for our database.
apt-get install postgresql
switch to postgres user
sudo -i -u postgres
Then run the following by order, don't forget to replace information (username and password in build.properties should match these ones)
createdb cah psql template1 CREATE USER pyx WITH PASSWORD 'PASSWORDHERE'; GRANT ALL PRIVILEGES ON DATABASE "cah" to pyx; \q exit
now, you finally can import .sql file
psql -h localhost -d cah -U pyx -f cah_cards.sql
you need to install Maven package in order to build the source code
apt-get install maven
after the installation is done, it's time to build and run it
mvn clean package war:war -Dmaven.buildNumber.doCheck=false -Dmaven.buildNumber.doUpdate=false
you will get a file called ZY.war inside of the target file.
at this point, you need to start tomcat service back up
service tomcat7 start
afterwards, you need to go to: http://localhost:8080/manager/html/
login with information you set when you were editing the tomcat-users.xml
file.
Then deploy the ZY.war
last thing to do is restarting the tomcat service:
service tomcat7 restart
then all you have to do is, go:
@RevenantPrime Looks like I got both databases running (pyx and cah with the same database) ... and yes it is infact connecting to the database named pyx and not cah with the githubs url ...