of Kiss Coda Wiki
You may want to look at Server Binary
Installer for a quick and
easy way to get a server (or a multiserver realm) up and running. It is
designed with a novice administrator in mind but for usability in large
scale production as well. It puts all of its stuff under one directory
/vice) so that you will not have trouble cleaning if you need
a retry. For the record, it is free (as in speech) and open source.
Coda is using a global name space and relies on DNS for that purpose. Special records should be put in DNS for a Coda realm.
Nevertheless you do not need your own DNS server, in fact you should instead use any of the many free or commercial DNS services available on the net. You do not need any Coda-specific DNS configuration on your computers either. If your host is capable of talking to google.com that should mean you have got working DNS name resolution. See “What is all the fuss about DNS”.
For Debian GNU (possibly just replace “stable” with “testing” or “unstable”):
echo 'deb http://www.coda.cs.cmu.edu/debian stable/' >> /etc/apt/sources.list apt-get update apt-get install coda-server
For building from source, use the exact same script that we used to build
Coda client, found in Quick Client
Action. The only difference is that instead
of just running
./coda_cvs.sh you run
If you’ve run
./coda_cvs.sh to build Coda client, then you also have
the server part - it just wasn’t installed. In that case, to install it,
cd coda-cvs/coda && make server-install
(Folks who dissect the script and perform the steps manually see that
we just run
make server-install instead of
make client-install in the
final step, in Coda installation).
Needed only once:
Needed in every shell:
export PATH="/usr/local/coda/sbin:/usr/local/coda/bin:$PATH" hash -r
To configure the Coda server, you invoke
vice-setup. Here’s a complete
session with answers, without the verbose instructions printed along
NOTE: If you ever want to re-create the configuration, then first stop all Coda server processes (if you have started any) using something like this:
# volutil shutdown; pkill updateclnt; pkill updatesrv; pkill auth2
# rm -rf /vice/; rm /vicepa/*
This will clean everything so that you can call
WARNING: Deleting files under
/vicepa will actually delete files on
the Coda server - don’t do it if you have important data there.
NOTE: the overwhelming majoriry of the questions and commands shown below are actually redundant (and not present in the binary installer), they are artifacts of the past research-related development which gave life to Coda.
# vice-setup Do you want the file /usr/local/coda/etc/server.conf created? [yes] What is the root directory for your coda server(s)? [/vice] Is this the master server, aka the SCM machine? (y/n) y Enter a random token for update authentication : bilbo12 The following token must be identical on all servers. Enter a random token for auth2 authentication : bilbo12 The following token must be identical on all servers. Enter a random token for volutil authentication : bilbo12 The serverid is a unique number between 0 and 255. You should avoid 0, 127, and 255. serverid: 1 I will create the initial administrative user with Coda password "changeme". This user/password is only for authenticating with Coda and not for logging into your system (i.e. we don't use /etc/passwd authentication for Coda) Enter the uid of this user: 2 Enter the username of this user: admin Are you ready to set up RVM? [yes/no] yes What will be your log file (or partition)? /usr/local/coda/LOG What is your log size? (enter as e.g. '20M') 20M Where is your data file (or partition)? /usr/local/coda/DATA [32M, 64M, 128M, 256M, 512M, 768M, 1G]: 768M Proceed, and wipe out old data? [y/n] y Where shall we store your file data [/vicepa]? Shall I set up a vicetab entry for /vicepa (y/n) y Select the maximum number of files for the server. [256K, 1M, 2M, 16M]: 16M Server directory /vicepa is set up! Congratulations: your configuration is ready... Shall I try to get things started? (y/n) n Here is what you would have to do to get things up and running - Coda authentication server (auth2 &) - Coda update server (updatesrv) - Coda update client (updateclnt -h coda_server.example.com) - Coda file server (startserver) - createvol_rep / coda_server.example.com/vicepa enjoy Coda.
In the final output of the above command, we see two things:
So let’s go, let’s start the server:
# auth2 && updatesrv && updateclnt -h coda_server.example.com && startserver
And create the initial, root volume (again, done only once!):
# createvol_rep / coda_server.example.com/vicepa Replicated volumeid is 7f000000 creating volume /.0 on coda_server.example.com (partition /vicepa) V_BindToServer: binding to host coda_server.example.com V_BindToServer: binding to host coda_server.example.com Set Log parameters Fetching volume lists from servers: V_BindToServer: binding to host coda_server.example.com GetVolumeList finished successfully coda_server.example.com - success V_BindToServer: binding to host coda_server.example.com VLDB completed. <echo / 7f000000 1 01000001 0 0 0 0 0 0 0 >> /vice/db/VRList.new> V_BindToServer: binding to host coda_server.example.com VRDB completed. Do you wish this volume to be Backed Up (y/n)? [n]
That’s it! The Coda server should now be on air.
Hint: An error very often encountered at this stage is
"Failed to dump VRDB into /vice/db/VRList.new".
This usually means that your hostname
(e.g. coda_server.example.com) is resolving to 127.0.0.1. You can
fix this by assigning the external IP address of your server to its
/etc/hosts. If this does not fix things, do a trace with
sh -x createvol_rep
to see where the problem lies and ask for help from the lists.
Well, first of all, you need a Coda client, right? The
procedure for installing and testing one is at Quick Client
Action. You really should test the client
against the official Coda test server (
testserver.coda.cs.cmu.edu) first -
it’s much easier to test your server if you know that the client works.
Ok, that said, there’s nothing specific that you need to configure on the client side.
Again, you do not need to configure anything on the client, it can connect to any Coda realm, including your own – provided that you have a DNS server which contains at least an “A” record for your Coda server (“A” provides mapping between a hostname and an IP address). In that case, access the server through a full hostname (“coda_server.example.com”) and not through the realm/domain name (“example.com”).
However, it’s a much better approach to have control over your DNS and add the appropriate “SRV” records. That way you can access the files through the realm name (such as “example.com”, without the need for a specific hostname), and the server layout behind the name will be irrelevant to the end users.
Well, to telegraph your interest in your Coda server files, run the handy
cfs listvol command. (Replace “example.com” with “coda_server.example.com”
if you only have an “A” DNS record, as we explained above).
$ cfs lv /coda/example.com Status of volume 7f000000 (2130706432) named "/" Volume type is ReadWrite Connection State is Reachable Reintegration age: 0 sec, time 5.000 sec Minimum quota is 0, maximum quota is unlimited Current blocks used are 2 The partition has 31728 blocks available out of 31729
Now, cd into the directory, try adding a file (and get “Permission denied”), then authenticate as “admin”, run ctokens to see your auth information, and then try writing the file again to see it working.
$ cd /coda/example.com $ echo > a -bash: a: Permission denied $ clog email@example.com username: firstname.lastname@example.org Password: (The default password is 'changeme'!) $ ctokens Tokens held by the Cache Manager for USER: @example.com Coda user id: 2 Expiration time: Wed Mar 21 19:02:26 2007 $ echo > a
To shut down the Coda server, run
volutil shutdown as root.
Note that the command will return quickly, but it will take about 15 seconds after that for the Coda server to close down and exit properly.
Then you can also shut down the supporting daemons - updateclnt, updatesrv and auth2. A line like this would work:
# pkill updateclnt; pkill updatesrv; pkill auth2.
Now that we’ve piqued your interest in Coda, go read more proper Coda documentation, deploying new Coda installations and promoting Coda!
At its former host wikidev.net this page has been accessed 2512 times.
Last modified: Thu Jun 26 07:37:01 UTC 2014