Running parallel daisy instances
This is a short how to on running multiple daisies in parallel on one machine. By using different data directories it is possible to get multiple daisies up and running using only one set binaries.
Repository
Create a new data base (MySQL)
Create a new data base as described in the installation. Here is a summary.
Log in as root
mysql -uroot -pYourRootPassword
Create new data bases for the repository and activeMQ. In our example we'll just add the 'alt' suffix to the default data base names. We will also just reuse the same database users for these data bases.
CREATE DATABASE daisyrepositoryalt CHARACTER SET 'utf8'; GRANT ALL ON daisyrepositoryalt.* TO daisy@'%' IDENTIFIED BY 'daisy'; GRANT ALL ON daisyrepositoryalt.* TO daisy@localhost IDENTIFIED BY 'daisy'; CREATE DATABASE activemqalt CHARACTER SET 'utf8'; GRANT ALL ON activemqalt.* TO activemq@'%' IDENTIFIED BY 'activemq'; GRANT ALL ON activemqalt.* TO activemq@localhost IDENTIFIED BY 'activemq';
Create the data directory
Daisy repository initialisation
Go to the directory <DAISY_HOME>/install, and execute:
daisy-repository-init
Now here you must be carefull. After you choose your data base type, you will be asked to provide the data base URL, DO NOT use the default. Use this instead
jdbc:mysql://localhost/daisyrepositoryalt?characterEncoding=UTF-8
For the data base user, password, driver class, and driver location you can
use the defaults. The same goes for the initial user.
You will now be asked if you wish to create the data base. When you are
absolutely sure you typed in the data base URL for the new data base continue.
After the data base has been initialised you will be asked to choose the data directory location. This can be
/home/<daisyuser>/daisydata-alt
Now you are ready to pick a namespace. If you are planning to do imports and exports with other daisy instances on the machine then it would be best to pick a different namespace. ALT for example.
Now follow the instructions about mail configuration.
When you reach the embedded JMS part (activeMQ) make sure to use the right URL :
jdbc:mysql://localhost/activemqalt?characterEncoding=UTF-8
The rest of the steps you can use the defaults if you like.
Customizing the repository settings
Open the myconfig.xml in your favourite editor. This file is found in
/home/<daisyuser>/daisydata-alt/conf/myconfig.xml
Here is a list of changes you should make :
- Look for the term 'httpconnector'. You will see the port 9263 mentioned there. Since your other daisy instance is using this port change this to a different value, 9563 for example.
- in the mbeanserver target you will find the httpAdaptor and xmlHttpAdaptor. Change their respective port attributes from 9264 and 9265 to 9564 9565.
Customizing activeMQ settings
Open activemq-conf.xml
/home/<daisyuser>/daisydata-alt/conf/activemq-conf.xml
Here you have to change the port activemq listens to. Look for ':61616' and change this to something else like ':61656'.
Start the repository
Now you should be set to go. Try starting the repository. Go to <daisyhome>/repository-server/bin and run the startup script with your new data directory as argument.
./daisy-repository-server /home/<daisyuser>/daisydata-alt
Wiki
Again this is pretty much the same as the basic installation.
Initialize the wiki
Go to <DAISYHOME>/install and run
daisy-wiki-init
On the first question you will be asked to specify the repository. Here you can answer 'http://localhost:9563'. For the following questions on user and passowrd just use 'testuser' as username and password if you followed the defaults in the repository initialization that is.
Create the wiki data directory
Data directory initialization
Execute the following script
daisy-wikidata-init
When you are asked for a location of the data directory you might want to choose
/home/<daisyuser>/wikidata-alt
Next you will be prompted for the repository url again, answer 'http://localhost:9563'. For the following questions on user and password just use 'testuser' as username and password if you followed the defaults in the repository initialization that is.
Now you are asked for the repository data directory. In our example that is
/home/<daisyuser>/daisydata-alt
Wiki customization
Open de daisy.xconf file which is found in
/home/<daisyuser>/wikidata-alt/daisy.xconf
Now make the following changes :
- Look for 'repository-server-base-url'. Change this value from http://localhost:9263 to http://localhost:9563.
- Change the jms server url. Look for 'tcp://localhost:61616' and change this to tcp://localhost:61656.
Now it is time to change the wiki port. First copy the jetty configuration to the data directory.
cp <DAISYHOME>/daisywiki/conf/jetty-daisywiki.xml /home/<daisyuser>/wikidata-alt
Open the jetty-daisywiki.xml file and change the port number. Look for 'jetty.port' and change the value from '8888' to '8588'.
Create a site
Go to the directory <DAISY_HOME>/install, and execute:
daisy-wiki-add-site /home/<daisyuser>/wikidata-alt
First of all you will be prompted for the repository url again, answer
'http://localhost:9563'. For the following questions on user and password just
use 'testuser' as username and password if you followed the defaults in the
repository initialization that is.
Next you will be asked for a site name. You can answer 'alt-site' or something
else if you please.
Running the wiki
If you plan on running the wiki using the startup scripts found in
<DAISYHOME>/daisywiki/bin/
Then you might run into some problems concerning temorary files. A workaround
can be to copy the startup script and specify a different temporary directory.
First create a temporary directory. /var/tmp/alt for example
mkdir /var/tmp/alt
Create a new startup script
cp daisy-wiki <other-location>/daisy-wiki-alt
and change this line in the script
$JAVA_HOME/bin/java -Xmx128m -Djava.endorsed.dirs=$DAISYWIKI_HOME/endorsedlibs/ -Ddaisywiki.home=$DAISYWIKI_HOME -Dorg.mortbay.util.URI.charse t=UTF-8 -Dfile.encoding=UTF-8 -Duser.language=en -Duser.country=US -Duser.variant= -Ddaisywiki.data=$DAISYWIKI_DATA -Djava.awt.headless=true - jar start.jar $CONFFILE
to
$JAVA_HOME/bin/java -Xmx128m -Djava.io.tmpdir=/var/tmp/alt -Djava.endorsed.dirs=$DAISYWIKI_HOME/endorsedlibs/ -Ddaisywiki.home=$DAISYWIKI_HOME -Dorg.mortbay.util.URI.charse t=UTF-8 -Dfile.encoding=UTF-8 -Duser.language=en -Duser.country=US -Duser.variant= -Ddaisywiki.data=$DAISYWIKI_DATA -Djava.awt.headless=true - jar start.jar $CONFFILE
Start the wiki
daisy-wiki-alt /home/<daisyuser>/wikidata-alt
Now everything should be up and running. Go to http://<server>:8588/daisy/ and look at your new daisy instance.



There are no comments.