# Création d'un répertoire Constellio
mkdir /opt/constellio
# Créer le répertoire git
/opt/constellio/git et webapp
mkdir /opt/constellio/git
mkdir /opt/constellio/webapp
# Dans ce répertoire, cloner constellio
git clone https://github.com/doculibre/constellio.git
cd constellio
# Choisir le dernier release (x.x.x, ici 7.7.5) :
git tag -l
git checkout 7.7.5
# Créer un fichier de version (indique le numéro de version pour le build)
nano /opt/constellio/git/version
# Ajouter le numéro de version du tag (remplacer par le tag sélectionné) :
7.7.5
# Configurer le build avec les fichiers gradle
cd /opt/constellio/git
wget https://raw.githubusercontent.com/doculibre/constellio/master/build.gradle.main
mv build.gradle.main build.gradle
wget https://raw.githubusercontent.com/doculibre/constellio/master/settings.gradle.main
mv settings.gradle.main settings.gradle
# Construire Constellio
/opt/gradle/bin/gradle war
# Lorsque le build est complété, la terminal indiquera :
# ....
# BUILD SUCCESSFUL
# Récupérer le build dans :
/opt/constellio/git/constellio/build/libs
# Copier le fichier "war" dans :
/opt/constellio/webapp
cp constellio-7.7.5.war /opt/constellio/webapp
# Dézipper
unzip constellio-7.7.5.war
# Récupérer le build dans :
/opt/constellio/git/constellio/build/libs
# Copier le fichier "war" dans :
/opt/constellio/webapp
cp constellio-7.7.5.war /opt/constellio/webapp
# Dézipper
unzip constellio-7.7.5.war
# Créer le fichier waitforsolr
nano /opt/constellio/waitforsolr
# Avec le contenu suivant :
----
#!/bin/bash
until$(curl --output /dev/null --silent --head --fail http://localhost:8983/solr); do
printf '.'
sleep 2
done
----
# Modifier l'accès au répertoire
chmod u+x /opt/constellio/waitforsolr
# Dans le chemin /opt/constellio, créer les répertoires suivants :
mkdir conf
cd conf
# Créer le fichier constellio.properties
nano constellio.properties
----
# === DATASTORE CONFIGURATION ===
# *** WARNING : collections will be deleted ***
dao.records.type=http
dao.records.http.url=http://localhost:8983/solr/
dao.contents.type=filesystem
dao.settings.type=filesystem
dao.contents.filesystem.folder=/opt/constellio/contents/
secondTransactionLog.enabled=true
secondTransactionLog.folder=/opt/constellio/transaction_log/
----
# Créer constellio.setup.properties
nano constellio.setup.properties
----
#These configs are used when Constellio is started the first time
admin.servicekey=adminkey
admin.password=password
mainDataLanguage=fr
collections=collection
collection.collection.languages=fr
collection.collection.modules=com.constellio.app.modules.rm.ConstellioRMModule
----