Archiva on Geronimo-2.0.2 with MySQL backend
Prerequisites
- Installed geronimo application server http://geronimo.apache.org
- Installed MySQL server with DBA account http://www.mysql.com
- Installed JDK 1.5+
- MySQL Driver v5.1.5 installed in the Geronimo repository
- commons-lang v2.2 installed in the Geronimo repository
- common-collections v3.2 installed in the Geronimo repository
MySQL
Create database
Login on the mysql server with the DBA account. ( mysql -h server - p )
Create a database
create database archiva;
Create user with sufficient access rights
GRANT SELECT,INSERT,UPDATE,DELETE,DROP,CREATE ON archiva.* TO archiva@localhost IDENTIFIED BY 'archiva';
Geronimo configuration
Start up
On my machine there is sometimes an out of memory error. To prevent this error there is an option parameter to the SUN JVM. Here is the description on a debian system
export JAVA_OPTS='-XX:MaxPermSize=128m'
Start the server
/path/to/geronimo/bin/geronimo.sh start
Database pool
Login with an administrator account on geronimo
default : http://localhost:8080/console/ user=system,pass=manager
Use the menu on the left:
Database Pools -> Using the Geronimo database pool wizard
Step 1 of the wizard
Name of database pool : archiva
Database Type : MySQL
Step 2 of the wizard
Driver Jar : mysql/mysql-connector/5.1.5/jar
Port Number : 3306
URL : jdbc:mysql://localhost:3306/archiva
User Name : archiva
Server Name : localhost
Database Name : archiva
Password : archiva
Confirm Password : archiva
Pool min size : 5
Pool max size : 15
Deploy Archiva
Login with an administrator account on geronimo
default : http://localhost:8080/console/ user=system,pass=manager
commons-collections v3.2 and commons-lang v2.2 must be in the Geronimo repository. You can check this in the "Common lib". If those libraries are not present the must be uploaded. There a a possibility to upload these libraries in "Common lib".
Use for commons-collections the groupId = "commons-collections" and the artifactId = "commons-collections"
Use for commons-lang the groupId = "commons-lang" and the artifactId = "commons-lang"
Deployment with the console
Download archiva http://www.apache.org/dyn/closer.cgi/maven/binaries/apache-archiva-1.0.war
Use "Deploy New" from the menu on the left in the console.
Archive : Use the downloadde apache-archiva-1.0.war
Plan : Use the deployment plan attached to this page
Commandline Deployment
Download the deployment plan attached to this page
Go to the bin directory
On linux :
cd /path/togeronimo/bin sh deploy.sh deploy /path/to/apache-archiva-1.0.war /path/to/geronimo-web.xml