Random Images

Print

CyclosInstall

Successful Install cyclos on Mepis 8 linux (2009-05-26)

java version:

java version "1.5.0_18"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_18-b02)
Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_18-b02, mixed mode)

To install sun java add theese to /etc/apt/sources.list

deb http://ftp.debian.org/debian/ unstable non-free
deb-src http://ftp.debian.org/debian/ unstable non-free


apt-get update
apt-get install apt-get install sun-java5-jdk

in /etc/alternatives/ java javac and other symlinks are points to the GNUjava, edit them to point /usr/lib/jvm/java-1.5.0-sun until you get  the version above, from java -version

tomcat 6.0.18, downloaded as binary (also works with v6.0.20 tried on mepis8 32bit i386)


download cyclos 3.5 RC2 http://sourceforge.net/project/downloading.php?group_id=134125&filename=cyclos_3.5_RC2.zip&a=75411430
 


Unzip tomcat.

In the webapps directory, create a dir call cyclos.

Unzip the cyclos to a directory somewere else, and copy WEB dir's content to /apache-tomcat-6.0.18/webapps/cyclos

Edit apache-tomcat-6.0.18/conf/tomcat-users.xml 

Uncomment the user part, set a secret password, and ADD a manager role manually:

<role rolename="manager"/>
  <user username="tomcat" password="YOURSECRET" roles="tomcat,manager"/>

Goto apache-tomcat-6.0.18/bin

./startup.sh or ./catalina.sh start

We tested only without sql yet in the config file:

apache-tomcat-6.0.18/webapps/cyclos/WEB-INF/classes/cyclos.properties

change to this:

### Disc cache for images
cyclos.imageDiskCache.enable = true

####### Database access (Hibernate) configuration ########

### MySQL
#hibernate.dialect = org.hibernate.dialect.MySQLInnoDBDialect
#hibernate.connection.driver_class = com.mysql.jdbc.Driver
#hibernate.connection.url = jdbc:mysql://localhost/cyclos3
#hibernate.connection.username = root
#hibernate.connection.password =
### Connection provider properties
#hibernate.connection.provider_class = org.hibernate.connection.C3P0ConnectionProvider
#hibernate.c3p0.minPoolSize = 5
#hibernate.c3p0.maxPoolSize = 200
#hibernate.c3p0.acquireIncrement = 5
#hibernate.c3p0.maxIdleTime = 21600
#hibernate.c3p0.idleConnectionTestPeriod = 3600
#hibernate.c3p0.testConnectionsOnCheckIn = true
#hibernate.c3p0.preferredTestQuery = select 1
#hibernate.c3p0.maxStatementsPerConnection = 10
#hibernate.c3p0.acquireRetryAttempts = 5
#hibernate.c3p0.numHelperThreads = 10

### HSQLDB (In-memory mode) - not recommended for production
hibernate.dialect = org.hibernate.dialect.HSQLDialect
hibernate.connection.driver_class = org.hsqldb.jdbcDriver
hibernate.connection.url = jdbc:hsqldb:mem:/cyclos3
hibernate.connection.username = sa
hibernate.connection.password =

### Hypersonic SQL (File mode) - not recommended for production
#hibernate.dialect = org.hibernate.dialect.HSQLDialect
#hibernate.connection.driver_class = org.hsqldb.jdbcDriver
#hibernate.connection.url = jdbc:hsqldb:file:data/cyclos3
#hibernate.connection.username = sa
#hibernate.connection.password =

### Additional properties
hibernate.current_session_context_class=org.hibernate.context.ThreadLocalSessionContext
hibernate.connection.autoReconnect = true
hibernate.connection.autoReconnectForPools = true
hibernate.connection.is-connection-validation-required = true
hibernate.default_batch_fetch_size = 20
hibernate.jdbc.batch_size = 20
hibernate.use_outer_join=true

### Second level cache settings - Should be enabled in production in order to reduce the DB access
#No need to specify a provider class - will use Cyclos built in cache provider
hibernate.cache.use_query_cache=true
hibernate.cache.use_second_level_cache=true

### Show SQL in logs. Only to debug
#hibernate.show_sql = true
#hibernate.format_sql = true
 

Success with mysql (very easy)

apt-get install mysql-server

In the middle of the install process, mysql ask for a root password(not the system's) let it be:12345

mysql -uroot -p12345
Welcome to the MySQL monitor

mysql> create database cyclos;
Query OK, 1 row affected (0.01 sec)

mysql> grant all privileges on cyclos.* to cyclos@localhost identified by '12345';
mysql> grant all privileges on cyclos.* to cyclos@127.0.0.1 identified by '12345';

The repetition here is defensive programming in case someone messes with the host file or something.
For full details on user account management see: "MySQL User Account Management" in the MySQL manual.
If you need some other local access you can put for example:

grant all privileges on cyclos.* to cyclos@'192.168.1.%' identified by '12345';
Query OK, 0 rows affected (0.05 sec)
flush privileges; (Don't forget this)

ctrl-D
msyql> bye
 

The above lines are from cycloswiki, but the default cyclos settings in cyclos.properties not match!

So here is the WORKING cyclos.propeties for mysql database using:

### Skip all database initialization tests
cyclos.database.skipTests = false

### Embedded mode - when true, create the database if it's not found
cyclos.embedded.enable = true
### Database language when the database is created with the embedded mode
cyclos.embedded.locale = en_US
### Default logs directory
cyclos.default.logDir=%t
cyclos.default.logPrefix=cyclos_

### Automatically apply schema upgrades for new versions
cyclos.autoSchemaUpgrade.enable = true

### Disc cache for images
cyclos.imageDiskCache.enable = true

####### Database access (Hibernate) configuration ########

### MySQL
hibernate.dialect = org.hibernate.dialect.MySQLInnoDBDialect
hibernate.connection.driver_class = com.mysql.jdbc.Driver
hibernate.connection.url = jdbc:mysql://localhost/cyclos
hibernate.connection.username = cyclos
hibernate.connection.password = 12345
### Connection provider properties
hibernate.connection.provider_class = org.hibernate.connection.C3P0ConnectionProvider
hibernate.c3p0.minPoolSize = 5
hibernate.c3p0.maxPoolSize = 200
hibernate.c3p0.acquireIncrement = 5
hibernate.c3p0.maxIdleTime = 21600
hibernate.c3p0.idleConnectionTestPeriod = 3600
hibernate.c3p0.testConnectionsOnCheckIn = true
hibernate.c3p0.preferredTestQuery = select 1
hibernate.c3p0.maxStatementsPerConnection = 10
hibernate.c3p0.acquireRetryAttempts = 5
hibernate.c3p0.numHelperThreads = 10

### HSQLDB (In-memory mode) - not recommended for production
#hibernate.dialect = org.hibernate.dialect.HSQLDialect
#hibernate.connection.driver_class = org.hsqldb.jdbcDriver
#hibernate.connection.url = jdbc:hsqldb:mem:/cyclos3
#hibernate.connection.username = sa
#hibernate.connection.password =

### Hypersonic SQL (File mode) - not recommended for production
#hibernate.dialect = org.hibernate.dialect.HSQLDialect
#hibernate.connection.driver_class = org.hsqldb.jdbcDriver
#hibernate.connection.url = jdbc:hsqldb:file:data/cyclos3
#hibernate.connection.username = sa
#hibernate.connection.password =

### Additional properties
hibernate.current_session_context_class=org.hibernate.context.ThreadLocalSessionContext
hibernate.connection.autoReconnect = true
hibernate.connection.autoReconnectForPools = true
hibernate.connection.is-connection-validation-required = true
hibernate.default_batch_fetch_size = 20
hibernate.jdbc.batch_size = 20
hibernate.use_outer_join=true

### Second level cache settings - Should be enabled in production in order to reduce the DB access
#No need to specify a provider class - will use Cyclos built in cache provider
hibernate.cache.use_query_cache=true
hibernate.cache.use_second_level_cache=true

### Show SQL in logs. Only to debug
#hibernate.show_sql = true
#hibernate.format_sql = true
 

We tested with a couple of test payments, all worked, after restarting of tomcat all member and payment information were avalible.

 


See also: TitleServerCyclosIntegration



Created by: anonymous. Last Modification: 2009-06-08 (Mon) 13:38:26 CEST by cell.