Next: , Previous: , Up: How-to   [Contents][Index]


2.6 Scenario 5: add a second server

On another (second) host, initialise the server. As we seen before (Scenario 1), username1 is an already existing user login (on this server).

 hostname2# mediatex adm init
 hostname2# mediatex adm add user username1
 hostname2$ su username1

Change the hostname in /etc/mediatex/mdtx.conf configuration file

<<<
host    localhost
---
host    hostname2
>>>

Try to join the “hello” collection. The host fingerprint should match with the one given in hostname1 configuration file.

 hostname2# mediatex adm add coll hello@hostname1

This has created your local collection key. Send it to a PUBLISHER (see Who) already managing this collection.

 hostname2# cat ~mdtx-hello/.ssh/id_dsa.pub

PUBLISHER has to add your key to the collection.

hostname1$ mediatex add key KEYFILE to coll hello

Finally, retry to join the collection.

 hostname2# mediatex adm add coll hello@hostname1
 hostname2$ su username1

Now the second server should be connected. We will check it.


First, empty the hostname1 cache and ask the daemon to scan it.

hostname1$ rm -fr ~mdtx/cache/mdtx-hello/logo*
hostname1$ rm -fr ~mdtx/cache/mdtx-hello/supports
hostname1$ mediatex srv scan

Secondly, remove support on hostname1 and share the ex-cd1 support with the collection on hostname2.

hostname1$ mediatex del supp ex-cd1
hostname1$ mediatex del supp ex-cd2
 hostname2$ mediatex add supp ex-cd1 to coll hello

As a USER, browse the collection on the first server via this URL: https://hostname1/~mdtx-hello and ask once again for the logo image’s archive, providing your email address.

When first server reload (scheduled by CRON), it will notify the second server.

hostname1$ mediatex srv notify

PUBLISHER on hostname2 is now asked to provide the supports it shares

 hostname2$ mediatex motd
 hostname2$ mediatex check supp ex-cd1 on \
                           /usr/share/mediatex/misc/logoP1.iso

Once second server notify, first server will copy back the provided file it will needs, to serve the USER query.

 hostname2$ mediatex srv notify
hostname1$ mediatex srv extract
hostname1$ ls ~mdtx/cache/mdtx-hello/logoP1.cat

Notice: as for every supports having a bad score, the uploaded files (Scenario 4) are duplicated too.

 hostname2$ mediatex srv extract
 hostname2$ ls ~mdtx/cache/mdtx-hello/cow*

Next: , Previous: , Up: How-to   [Contents][Index]