Two-Computer Setup
Campcaster-station (the server components) and campcaster-studio (the graphical client) can be installed on separate computers on a local network. Unfortunately, at the moment, the setup is not as simple as it should be. This page will tell you how to do it.
The solution involves the use of the Network File System protocol to allow the client computer to access files over the network as easily as if the networked devices were attached as local disks.
We will assume that you are running Ubuntu 6.06 (Dapper) on both computers; commands and file locations may be different in other distributions.
The instructions differ somewhat between the official releases (referred to here as Packaged Versions) and the development environment.
Notes: You don't need to do any of following if you only want to use the web interface. In that case, you don't even need to install the campcaster-studio package. Just open http://<server>/campcaster (where <server> is the name or IP address of the server computer) with a browser on any computer which can access the server.
If your network has a firewall, it must be set up to allow NFS traffic. Depending on your firewall, this can be fairly difficult. Here are links to howtos for Ubuntu Gentoo.
1. Set up the server
Package version
On the server computer, install campcaster-station. Start a file browser (Places -> Computer -> Filesystem), open the folder /opt/campcaster/var/Campcaster, and right-click on storageServer. Click on "Share folder" (enter your password, if prompted), and select "NFS" from the "Share with" drop-down menu.
Ubuntu will automatically install the packages necessary for NFS file sharing.
In the Share Folder window, click on "Add host", and select an option from the drop-down menu which includes your client computer. The default setting will probably be OK. You can check the "Read only" box; Campcaster only needs read access to this directory.
Next, edit the storage server configuration file as root; for example you can type
sudo gedit /opt/campcaster/var/Campcaster/storageServer/var/conf.php
find the line
'storageUrlHost' => 'localhost',
and replace localhost with the name or IP address of the server computer under which it can be accessed from the client computer. This will probably be something like '192.168.0.123'.
Development Environment version
On the server computer, install Campcaster using the steps described on the DevelopmentEnvironment page.
Start a file browser (Places -> Computer -> Filesystem), open the folder /home/<your user name>/src/campcaster/src/modules, and right-click on storageServer. Click on "Share folder" (enter your password, if prompted), and select "NFS" from the "Share with" drop-down menu.
Ubuntu will automatically install the packages necessary for NFS file sharing.
In the Share Folder window, click on "Add host", and select an option from the drop-down menu which includes your client computer. The default setting will probably be OK. You can check the "Read only" box; Campcaster only needs read access to this directory.
Next, edit the storage server configuration file as root; for example you can type
gedit /home/<your user name>/src/campcaster/src/modules/storageServer/var/conf.php
find the line
'storageUrlHost' => 'localhost',
and replace localhost with the name or IP address of the server computer under which it can be accessed from the client computer. This will probably be something like '192.168.0.123'.
When you create an NFS share, you must tell the kernel that there are changes in the sharing:
sudo exportfs -ra
and then to be sure, restart the NFS daemon and the NFS kernel daemon.
sudo /etc/init.d/nfs-kernel-server restart
and
sudo /etc/init.d/nfs-common restart
Now your server should be ready to accept the connections from the client.
2. Set up the client
Package Version On the client computer, install both the campcaster-station and the campcaster-studio packages, as well as the nfs-common package:
sudo apt-get install campcaster-station campcaster-studio nfs-common
Add the following line to the /etc/fstab file (as root):
<server>:/opt/campcaster/var/Campcaster/storageServer /opt/campcaster/var/Campcaster/storageServer nfs defaults 0 0
where <server> is the name or IP address of the server computer under which it can be accessed from the client computer.
Mount the share for the first time (later it will be mounted automatically when the system boots up).
sudo mount /opt/campcaster/var/Campcaster/storageServer
Now, start up Studio. Log in, open Options -> Servers, and change all three 'localhost' entries to '<server>' (the name or IP address of the server computer). Click on OK, exit Studio, and start it again; it should be accessing the storage and scheduler on the server computer now.
To change the configuration of the Scheduler, edit the file /opt/campcaster/etc/campcaster-scheduler.xml as root, and change the "localhost" entries under authenticationClientFactory and storageClientFactory to "<server>", and modify the
<user login="..." password="..." />
entry to a user name and password valid on the server computer.
Development Environment version
On the client computer, install the development environment version as described here as well as the nfs-common package:
sudo apt-get install nfs-common
Open the fstab file (as root):
sudo gedit /etc/fstab
Add the following lines to the file:
# Campcaster remote storage server <server>:/home/<user name on server>/src/campcaster/src/modules/storageServer /home/<username on client>/src/campcaster/src/modules/storageServer nfs defaults 0 0
where: * <server> is the name or IP address of the server computer under which it can be accessed from the client computer * <user name on server> is the user name where the Campcaster development environment is installed * <user name on client> is the user name on the client computer where the Campcaster development environment is installed
Mount the shared remote directory for the first time (later it will be mounted automatically when the system boots up).
sudo mount /home/<your user name>/src/campcaster/src/modules/storageServer
Now, start up Studio. Log in, open Options -> Servers, and change all three 'localhost' entries to '<server>' (the name or IP address of the server computer). Click on OK, exit Studio, and start it again; it should be accessing the storage and scheduler on the server computer now.
To change the configuration of the Scheduler, edit the file /opt/campcaster/etc/campcaster-scheduler.xml as root, and change the "localhost" entries under authenticationClientFactory and storageClientFactory to "<server>", and modify the
<user login="..." password="..." />
entry to a user name and password valid on the server computer.
Notes
- When the remote storageServer directory is mounted, it will hide the local storageServer directory; if you unmount it, the local directory will reappear.
- If your server is running the development environment, the storage server configuration file is at ~/.campcaster/storageServer.conf.php, and the storage server directory you need to share is /home/<username>/src/campcaster/src/modules/storageServer. You need to create this directory, with the same path (including the same user name), on the client computer, and mount it there. If your client computer is also running the development environment, you first need to rename the storageServer directory that's already there, in the same way as shown above.
