This is documentation for the CCMS (Collaborative Collections Management System).
1. Reference
1.1. Commands
1.1.1. select
Retrieve objects from a set
select *
from set_name
[ limit count ]
Description
The select command retrieves a list of objects from a set according
to specified criteria.
Parameters
The first argument specifies * meaning all available attributes.
from
The from clause specifies the desired set that will be the source of
data.
limit
The limit clause specifies a maximum number of objects that will be
returned.
At present select returns a maximum of 20 records even if a
higher maximum is specified using limit.
|
Examples
To retrieve all fields of an arbitrary record:
select * from reserve limit 1;
1.1.2. show
List the values of a system variable
show name
Description
show lists the current values of system configurations or other
variables.
Parameters
|
||
|
Currently defined filters. |
|
|
Currently defined sets. |
Examples
show sets;
2. Server administration
2.1. System requirements
2.1.1. Hardware requirements
This section will contain system hardware requirements.
2.1.2. Software requirements
-
Operating system: Linux
-
Database system: PostgreSQL 18 or later
-
To build from source:
-
Go 1.21 or later
-
2.2. Building the software
It is suggested that a ccms user be created and the server run by
that user, for example, in /home/ccms.
To build CCMS, first set the GOPATH environment variable to specify
a path that can serve as the build workspace for Go, e.g.:
export GOPATH=$HOME/go
Then to build the server:
./build
The build script creates a bin/ subdirectory and builds the ccd
server and ccc client executables there:
./bin/ccd help
./bin/ccc help
In general running ccd takes the form:
ccd <command> <arguments>
Some typical commands are:
-
initinitializes a new CCMS instance -
startstarts the server -
stopshuts down the server -
versionprints the CCMS version
For more infomation about a specific command:
ccd help <command>
2.3. Server configuration
The ccd server makes use of local storage in a data directory
which is created using ccd with the init command. In this example
we will create the data directory as data/:
ccd init -D data
This will also create a file ccd.conf in the data directory with the
following structure:
[main]
host = host name of the PostgreSQL server
port = port number of the PostgreSQL server
user = database user that is the owner of the database
password = password of user
dbname = database name
sslmode = should be set to "require" or stronger option
This file should be edited to add database connection parameters, for example:
[main]
host = ccms.indexdata.com
port = 5432
user = ccms
password = w6bqYkFWm4rpGR5mCtFw
dbname = ccms
sslmode = require
The ccd server will assume that the user and database defined here
already exist; so they should be created before continuing. The
user should be the owner of the database.
2.4. Upgrading from a previous version
Upgrading from a previous version of CCMS is not currently supported.
2.5. Running the server
To start the server:
nohup ccd start -D data -l ccd.log &
To stop the server:
ccd stop -D data
The server can be set up to run with systemd via a file such as
/etc/systemd/system/ccms.service, for example:
[Unit]
Description=CCMS
After=network.target remote-fs.target
[Service]
Type=simple
User=ccms
ExecStart=/bin/bash -ce "exec /home/ccms/bin/ccd start -D /home/ccms/data -l /home/ccms/ccd.log"
Restart=on-abort
[Install]
WantedBy=multi-user.target
Then:
systemctl enable ccms systemctl start ccms