This installation was tested on Debian Lenny with Tomcat using the internal http-server and MYSQL. HSQLDB and Jetty were not tested yet.
regard that the installation does not work if you install sun-java after the tomcat packages. There seems to be this[1] issue.
java已经不支持apt-get下载了,请前去java网站下载,笔者使用的版本是jre-6u45-linux-x64.bin
sudo apt-get install xinit gdm ubuntu-desktop mysql-server tomcat6 tomcat6-admin chmod +x ~/Downloads/jre-6u45-linux-x64.bin ~/Downloads/jre-6u45-linux-x64.bin
mysql -u root -p
create database xplanner character set utf8;
grant all privileges on xplanner.* to xplanner@localhost identified by 'xp';
Edit /etc/tomcat6/tomcat-users.xml and add the role manager and a new user with that role. Your tomcat-users.xml should look similar to this now:
<?xml version='1.0' encoding='utf-8'?> <tomcat-users> <role rolename="tomcat"/> <role rolename="manager"/> <role rolename="manager-gui"/> <user username="tomcat" password="tomcat" roles="tomcat,manager,manager-gui"/> <user username="mangr" password="mangr" roles="manager,manager-gui"/> </tomcat-users>
Edit file /etc/tomcat6/policy.d/04webapps.policy and add following permissions
permission javax.security.auth.AuthPermission "modifyPrincipals"; permission java.net.SocketPermission "127.0.0.1:3306","connect, resolve"; permission java.net.SocketPermission "localhost:9090","connect,resolve"; permission java.lang.RuntimePermission "getProtectionDomain"; permission java.lang.RuntimePermission "shutdownHooks"; permission java.lang.RuntimePermission "accessClassInPackage.org.apache.jasper.el"; permission java.lang.RuntimePermission "accessClassInPackage.org.apache.coyote"; permission java.lang.RuntimePermission "accessClassInPackage.javax.el"; permission java.lang.reflect.ReflectPermission "suppressAccessChecks"; permission java.lang.RuntimePermission "accessDeclaredMembers"; permission java.io.FilePermission "/var/lib/tomcat6/webapps/xplanner-plus/xplanner-plus-activity.log", "read,write"; permission java.io.FilePermission "*","read"; permission java.io.FilePermission "/usr/share/tomcat6/common/-","read"; permission java.io.FilePermission "/usr/share/tomcat6/bin/bootstrap.jar", "read"; permission java.io.FilePermission "/usr/share/java/commons-daemon.jar", "read"; permission java.io.FilePermission "/var/lib/tomcat6/webapps/xplanner-plus/WEB-INF/classes/logging.properties","read"; permission java.util.PropertyPermission "*","read,write"; permission java.net.SocketPermission "jakarta.apache.org:80","connect,resolve";
Open your tomcat manager. The address should look similar to this http://yourserver:8180/manager/html Under "WAR file to deploy" select the Xplanner+ file you downloaded first and press upload. Alternatively you can manually put the war-file into /var/lib/tomcat6/webapps, it will be automatically be deployed.
XPlanner+ works out of the box if you use the default configuration. The default configuration can be found in:
/var/lib/tomcat6/webapps/xplanner-plus/WEB-INF/classes/xplanner-custom.properties
Default means to use HSQLDB, if you are using MYSQL or use other user/passwords you need to edit this file.
uncomment properties for MYSQL, and you should have the following;
## XPlanner hibernate configuration
hibernate.dialect=com.technoetic.xplanner.db.hibernate.XPlannerMySQLDialect
hibernate.connection.driver_class=com.mysql.jdbc.Driver
hibernate.connection.dbname=xplanner
hibernate.connection.url=jdbc:mysql://localhost/xplanner?autoReconnect=true&useUnicode=true&characterEncoding=UTF8
hibernate.connection.username=xplanner
hibernate.connection.password=xp
hibernate.show_sql=false
xplanner.migration.databasetype=mysql
and comment properties for HSQLDB;
# Hibernate HSQLDB Configuration - embedded persistent HSQLDB #hibernate.dialect=net.sf.hibernate.dialect.HSQLDialect #hibernate.connection.url=jdbc:hsqldb:file:hsqldb/xplanner #hibernate.connection.driver_class=org.hsqldb.jdbcDriver #hibernate.connection.username=sa #hibernate.connection.password= # TODO(PATCH) Find a way not to repeat these migrations for all databases but work on a global database mode that select Dialect, migration database type, patch path... #xplanner.migration.databasetype=hsqldb #xplanner.migration.patchpath=patches/hsqldb:com.technoetic.xplanner.upgrade:com.technoetic.xplanner.security.install
In this example there is no email-configuration and no security configuration!
the login-link should be something like http://localhost:8080/xplanner-plus log in with sysadmin/admin
Errors can be found in /var/log/syslog or catalina.YYYY-MM-DD.log