...
Info |
---|
Last tested on: 2020: Ubuntu 20.04.13 |
Installation Prerequisites
...
Next, create a system account for installing and managing CollectionSpace. Use the name "cspace" collectionspace
for the account:
Code Block |
---|
sudo useradd -c "CollectionSpace admin linux account" -m -s /bin/bash cspacecollectionspace |
Next, set a password for the new "cspace" account collectionspace
account. Do NOT use the following example password. Create your own password and record it somewhere secure:
Code Block |
---|
echo -e "cspaceExamplePassword\ncspacenExamplePassword" | sudo passwd cspacecollectionspace ### Replace 'cspaceExamplePassword' with a strong password |
Next, install the prerequisites using apt
:
Code Block |
---|
|
sudo apt update
sudo apt install ant maven imagemagick openjdk-8-jdk wget git
|
...
Code Block |
---|
Processing triggers for systemd (245.4-4ubuntu3.211) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for ca-certificates (20201027ubuntu0.2020210119~20.04.1) ...
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.
done.
Processing triggers for mime-support (3.64ubuntu1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.12) ...
Processing triggers for libgdk-pixbuf2.0-0:amd64 (2.40.0+dfsg-33ubuntu0.2) ... |
If you think you've encountered an error, send an email to the CollectionSpace "Talk" list at talk@collectionspace.org. Include any error messages you've seen and give a detailed description of what steps you've already performed.
...
Multiexcerpt macro |
---|
|
Set up TomcatLogin Log in to your Ubuntu server using an account with sudo privileges. Go to the directory where you want to install CollectionSpace. We recommend : /opt/collectionspace . bashCollectionSpace runs as a Tomcat 8 server application. A pre-configured version of Tomcat 8 is provided with the CollectionSpace distribution package. Start by downloading the CollectionSpace distribution package "tarball": bashUnpack the tarball: bashThis will create an apache-tomcat-8.5.51 directory in / usropt/ local/sharecollectionspace . Next, make necessary files owned by the cspace user collectionspace user: bashYou can remove the tarball if you want/need:
|
...
Multiexcerpt macro |
---|
name | SETUPENVIRONMENTVARIABLES |
---|
|
Setting the CollectionSpace Environment VariablesFor the CollectionSpace server to install and run properly, it requires the following shell environment variables to be defined for the cspace user collectionspace user account. Ensure that the following values correspond to the cspace userexist in the collectionspace user's shell environment. In the next paragraph, we provide instructions for setting these environment variables automatically when you login log in as the cspace user collectionspace user. - CSPACE_JEESERVER_HOME: The full path to the apache-tomcat-8.5.51 directory that was created when you unpacked the CollectionSpace tarball; example,
"/usropt/local/sharecollectionspace/apache-tomcat-8.5.51" - CATALINA_HOME: The full path to the apache-tomcat-8.5.51 directory, usually identical to the value of
CSPACE_JEESERVER_HOME . - CATALINA_PID: The full path to a file which will hold the Tomcat server process number. This is used by the Tomcat shutdown script.
- CATALINA_OPTS: Environment options for the Tomcat server process. The example value for this variable in the next section is a Java Virtual Machine (JVM) memory setting.
JAVA_HOME: The full path to your Java directory. If you are unsure where this variable should point to, you can execute this command: bashwhich gets you the path to the Java installation taking only the part that comes before the text "jre/bin/java ". See the example values below. - DB_HOST: The hostname or IP address of the server running PostgreSQL. (Commonly 'localhost' when running on the same machine as catalina/ tomcat)
- DB_PORT: The port for the Postgresql servicer. Usually
5432 - DB_CSADMIN_PASSWORD: The password for the administrative database user for the CollectionSpace application. This must match the password for the user that you specified while setting up PostgreSQL in the prerequisites section. (This administrative user by default will be named csadmin, and will be a postgresql superuser. However, this user will have fewer privileges than the overall database administrator superuser, by default named postgres.)
- DB_NUXEO_PASSWORD: Any database-legal password of your choice for the nuxeo database user. This user can work with CollectionSpace data stored in Nuxeo databases. Nuxeo is essentially the content management system underlying CollectionSpace.
- DB_CSPACE_PASSWORD: Any database-legal password of your choice for the cspace database user. This user can work with CollectionSpace data for users, roles, and authentication and authorization.
- DB_READER_PASSWORD: Any database-legal password of your choice for the reader database user. This user will have read-only access to CollectionSpace data stored in Nuxeo databases.
- CSPACE_INSTANCE_ID: String appended to default CollectionSpace database names. Use a value of "
_default " by default. If your instance of CollectionSpace is sharing a PostgreSQL server with other CollectionSpace instances, this environment variable provides a way to distinguish your databases from others. - JEE_PORT: The HTTP port for the Services layer. Usually
8180 - ANT_OPTS: Environment options for the Apache Ant build tool. The recommended options below are Java Virtual Machine (JVM) memory settings.
- MAVEN_OPTS: Environment options for the Maven build tool. The recommended options below are Java Virtual Machine (JVM) memory settings.
By default, all but the "core " CollectionSpace tenants/profiles are disabled. You'll need to explicitly enable the tenants you want to use by setting environment variables for them. - CSPACE_CORE_CREATE_DISABLED_OPT: Default value is
true . If set to false , enables the core/common tenant. - CSPACE_BONSAIANTHRO_CREATE_DISABLED_OPT: Default value is
true . If set to false , enables the Bonsai Anthropology tenant. - CSPACE_FCARTBONSAI_CREATE_DISABLED_OPT: Default value is
true . If set to false , enables the Fine and Contemporary Art Bonsai tenant. - CSPACE_HERBARIUMBOTGARDEN_CREATE_DISABLED_OPT: Default value is
true . If set to false , enables the Herbarium Botanical Garden tenant. - CSPACE_LHMCFCART_CREATE_DISABLED_OPT: Default value is
true . If set to false , enables the Local History and Material Culture Fine and Contemporary Art tenant. - CSPACE_MATERIALSHERBARIUM_CREATE_DISABLED_OPT: Default value is
true . If set to false , enables the Materials Herbarium tenant. - CSPACE_PUBLICARTLHMC_CREATE_DISABLED_OPT: Default value is
true . If set to false , enables the Public Art Local History and Material Culture tenant. - CSPACE_ANTHROMATERIALS_CREATE_DISABLED_OPT: Default value is
true . If set to false , enables the Anthropology Materials tenant. - CSPACE_BOTGARDENPUBLICART_CREATE_DISABLED_OPT: Default value is
true . If set to false , enables the Botanical Garden Public Art tenant.
Your CollectionSpace instance can be configured to fetch data from another CollectionSpace instance. For example, the Materials profile/tenant can be configured to fetch shared authority and vocabulary data from a CollectionSpace instance that is setup to share common authority data. The following environment variables can used to create a connection to that CollectionSpace instance. CSPACE_CLIENT_SAS_URL_OPT: The URL to the "shared" CollectionSpace instance -e.g., http://nightly.collectionspace.org:8180/cspace-services/ CSPACE_CLIENT_SAS_USER_OPT: A username for an account on the "shared" CollectionSpace instance. CSPACE_CLIENT_SAS_PASSWORD_OPT: The password for the account on the "shared" CollectionSpace instance. CSPACE_CLIENT_SAS_SSL_OPT: Set to true if the "shared" CollectionSpace instance is running SSL/HTTS.
The example below is for a Linux Bash shell. As the cspace collectionspace user, edit ~/.bashrc (or ~/.bash_profile ) and be sure to substitute the actual values for that are specific to your environment. Login as the cspace user collectionspace user: Now edit the .bashrc file: Add the following lines of text to the end of the .bashrc file: bashtrueSave your changes and exit the vim editor. Next, make sure to source your ~/.bashrc so the environment variables are set and available. The next time you login to the cspace account collectionspace account, these environment variables will be set automatically. WARNING: Use difficult to guess values for the password environment variables above -i.e., the ones ending with "_PASSWORD ". The value for the environment variable DB_CSADMIN_PASSWORD should be the password you created when you setup PostgreSQL in a previous section of this installation guide. |
Now that we have the environment set up, we can grab the source code for CollectionSpace. The source code resides in two projects hosted on GitHub: services, and application. Logged in as the cspace
user collectionspace
user, enter the following commands:
...
To start the CollectionSpace server, login to the host machine as the cspace
collectionspace
user (or sudo su -
cspace collectionspace
) and run this command:
Code Block |
---|
|
$CSPACE_JEESERVER_HOME/bin/startup.sh |
...
Now that your CollectionSpace server is running, open a browser and go to http://<ip-address>:8180/
cspace/core/login
where <ip-address> is the hostname or IP address of the machine where you installed CollectionSpace. If you have a web browser running on the same server that you installed CollectionSpace on, you should be able to use this URL: http://localhost:8180/cspace/core/login
You should be able to log in to the default core
tenant using the user admin@core.collectionspace.org
and the password Administrator
.
...
To properly shutdown the CollectionSpace, login to the host machine as the cspace
collectionspace
user and enter this command:
...