Alfresco offre une vraie alternative Open Source pour la Gestion de Contenu d'Entreprise (ECM) - Gestion de Documents, Collaboration, Gestion des Archives/Enregistrements légaux, Gestion de Contenu Web et Gestion des Documents Numérisés. Vous pouvez [[http://rockmebabe.free.fr/page.php?menu=menu-toolbox.php&linkto=toolbox/20090315-Installer-Alfresco-Ubuntu-8.10/content.html&download=toolbox/20090315-Installer-Alfresco-Ubuntu-8.10/install_alfresco.sh&title=Installer%20Alfresco%20Labs%203%20-%20Ubuntu%208.10&dir=toolbox/20090315-Installer-Alfresco-Ubuntu-8.10/&image=|télécharger ici]] un script bash d'installation pour Alfresco Labs 3.0 Stable. Exemple d'utilisation du script [[http://rockmebabe.free.fr/page.php?menu=menu-toolbox.php&linkto=toolbox/20090315-Installer-Alfresco-Ubuntu-8.10/content.html&download=toolbox/20090315-Installer-Alfresco-Ubuntu-8.10/install_alfresco.sh&title=Installer%20Alfresco%20Labs%203%20-%20Ubuntu%208.10&dir=toolbox/20090315-Installer-Alfresco-Ubuntu-8.10/&image=|install_alfresco.sh]]: * Affichage des options d'usage : ./install_alfresco.sh -h * Installation de ALfresco avec les options par défaut : ./install_alfresco.sh * Installation de Alfresco avec PostgreSQL : ./install_alfresco.sh -s postgresql * Installation de Alfresco avec MySQL : ./install_alfresco.sh -s mysql Une autre alternative au script [[http://rockmebabe.free.fr/page.php?menu=menu-toolbox.php&linkto=toolbox/20090315-Installer-Alfresco-Ubuntu-8.10/content.html&download=toolbox/20090315-Installer-Alfresco-Ubuntu-8.10/install_alfresco.sh&title=Installer%20Alfresco%20Labs%203%20-%20Ubuntu%208.10&dir=toolbox/20090315-Installer-Alfresco-Ubuntu-8.10/&image=|install_alfresco.sh]] est de suivre le tuto ci-dessous. La procédure d'installation suivante permet d'installer Alfresco Labs 3.0 Stable sur Ubuntu 8.10. Copiez/Coller simplement les lignes de code dans votre terminal ( must be root !) ===Installation=== ==Installation de sun-java6-jdk== Le paquet sun-java6-jdk est dans les dépots ubuntu. sudo -s apt-get install sun-java6-jdk java -version JAVADIR=`ls /usr/lib/jvm | grep java-6-sun-` JAVA_HOME="/usr/lib/jvm/${JAVADIR}" Nous utiliserons la variable JAVA_HOME plus loin dans ce document ! ==Installation de Alfresco Labs 3== URLALFRESCO=http://eu.dl.alfresco.com/release/labs/build-1526/\ Alfresco-Labs-3Stable-Linux-x86-Install?dl_file=release/labs/\ build-1526/Alfresco-Labs-3Stable-Linux-x86-Install ALFRESCOINSTALLFILE=`basename $URLALFRESCO` mkdir ~/alfresco-download/ wget -c $URLALFRESCO -O ~/alfresco-download/$ALFRESCOINSTALLFILE chmod +x ~/alfresco-download/$ALFRESCOINSTALLFILE ~/alfresco-download/$ALFRESCOINSTALLFILE --mode console ==Compilation et installaion de SWFTOOLS== On telecharge les sources, on compile et on installe: URLSWFTOOLS=http://www.swftools.org/swftools-2009-03-08-1844.tar.gz SWFTOOLSINSTALLFILE=`basename $URLSWFTOOLS` apt-get install build-essential zlib1g-dev libjpeg62-dev libgif-dev libfreetype6-dev tofrodos wget -c $URLSWFTOOLS -O ~/alfresco-download/$SWFTOOLSINSTALLFILE SWFTOOLSINSTALLDIR=`cd ~/alfresco-download/ && tar xvzf ~/alfresco-download/$SWFTOOLSINSTALLFILE | awk -F '/' '{print $1}' | sort -u` cd ~/alfresco-download//$SWFTOOLSINSTALLDIR && ./configure && make && make install ==Désinstallation de OpenOffice 2.4== apt-get remove openoffice.org-core openoffice.org-writer openoffice.org-math \ openoffice.org-impress openoffice.org-gtk openoffice.org-gnome openoffice.org-draw \ openoffice.org-common openoffice.org-calc python-uno openoffice.org-emailmerge \ openoffice.org-style-human ttf-opensymbol openoffice.org-base-core ==Installation de OpenOffice 3== Alfresco n'est pas comptatible avec OpenOffice 2.4. Nous devons installer OpenOffice 3 if [ ! -f "/opt/openoffice.org3/program/soffice" ] then cd ~/alfresco-download ARCH=`uname -m` [ "$ARCH" = "x86_64" ] || wget -c http://ftp.sunet.se/pub/Office/OpenOffice.org/localized/fr/3.0.1/OOo_3.0.1_LinuxIntel_install_fr_deb.tar.gz -O ~/alfresco-download/OOo_3.0.1_LinuxIntel_install_fr_deb.tar.gz [ "$ARCH" = "x86_64" ] || wget -c http://ftp.nluug.nl/pub/office/openoffice/localized/fr/3.0.1/OOo_3.0.1_LinuxIntel_langpack_fr_deb.tar.gz -O ~/alfresco-download/OOo_3.0.1_LinuxIntel_langpack_fr_deb.tar.gz [ "$ARCH" = "x86_64" ] && wget -c http://ftp.nluug.nl/pub/office/openoffice/localized/fr/3.0.1/OOo_3.0.1_LinuxX86-64_install_fr_deb.tar.gz -O ~/alfresco-download/OOo_3.0.1_LinuxIntel_install_fr_deb.tar.gz [ "$ARCH" = "x86_64" ] && wget -c http://ftp.nluug.nl/pub/office/openoffice/localized/fr/3.0.1/OOo_3.0.1_LinuxX86-64_langpack_fr_deb.tar.gz -O ~/alfresco-download/OOo_3.0.1_LinuxIntel_langpack_fr_deb.tar.gz mkdir -p ~/alfresco-download/debs/ cd ~/alfresco-download/debs/ && tar xvzf ~/alfresco-download/OOo_3.0.1_LinuxIntel_install_fr_deb.tar.gz cd ~/alfresco-download/debs/ && tar xvzf ~/alfresco-download/OOo_3.0.1_LinuxIntel_langpack_fr_deb.tar.gz mkdir -p /var/ooffice-repository/ for file in `find ~/alfresco-download/debs/ -type f -name "*.deb"` do cp -uv "$file" /var/ooffice-repository/ done cd /var/ && bash -c 'dpkg-scanpackages ooffice-repository/ /dev/null | gzip -9c > ooffice-repository/Packages.gz' bash -c 'echo "deb file:/var ooffice-repository/" > /etc/apt/sources.list.d/ooffice.list' apt-get update for pack in `zcat /var/ooffice-repository/Packages.gz | grep ^Package: | awk '{print $2}'` do apt-get -f install apt-get -y --force-yes install $pack done else echo "Nothing to do" fi ===Configuration de Alfresco Labs 3=== function addToFile(){ str="$1" cfgfile="$2" delline=$3 [ "$delline" = "" ] || sed -i '/^$delline/d' $cfgfile bash -c "echo \"$str\" >> $cfgfile" } JAVADIR=`ls /usr/lib/jvm | grep java-6-sun-` JAVA_HOME="/usr/lib/jvm/${JAVADIR}" sed -i "s#^ALF_HOME=.*#ALF_HOME=/opt/Alfresco#g" /opt/Alfresco/alfresco.sh sed -i "s#^export JAVA_HOME=.*#export JAVA_HOME=$JAVA_HOME#g" /opt/Alfresco/alfresco.sh sed -i "s#^ALF_HOME=.*#ALF_HOME=/opt/Alfresco#g" /opt/Alfresco/virtual_alf.sh sed -i "s#^export JAVA_HOME=.*#export JAVA_HOME=$JAVA_HOME#g" /opt/Alfresco/virtual_alf.sh ALFCFGFILE=/opt/Alfresco/tomcat/shared/classes/alfresco/extension/custom-repository.properties [ -f "${ALFCFGFILE}.bak" ] || cp ${ALFCFGFILE} ${ALFCFGFILE}.bak dos2unix $ALFCFGFILE addToFile "#Config" $ALFCFGFILE "#Config" addToFile "img.root=/usr/" $ALFCFGFILE "img.root=" addToFile "swf.exe=/usr/local/bin/pdf2swf" $ALFCFGFILE "swf.exe=" addToFile "ooo.exe=/opt/openoffice.org3/program/soffice" $ALFCFGFILE "ooo.exe=" addToFile "dir.root=/opt/Alfresco/alf_data" $ALFCFGFILE "dir.root=" ===choix de la base de donnée=== A ce stade, Alfresco est installé. Il nous reste maintenant à choisir la base de donnée. Alfresco est comptatible avec la plupart des serveurs de base de données (MySQL, PostgreSQL, Oracle, DB2, Derby, ...). Nous verrons comment configurer Alfresco avec : * MySQL * PostgreSQL * Derby ==Configuration Alfresco / MySQL== HIBFILE=/opt/Alfresco/tomcat/shared/classes/alfresco/extension/custom-hibernate-dialect.properties CUSTOREPOPROPERTY=/opt/Alfresco/tomcat/shared/classes/alfresco/extension/custom-repository.properties apt-get -y --force-yes install mysql-server echo echo "Enter MySQL root password" bash -c "mysql -p < /opt/Alfresco/extras/databases/mysql/db_setup.sql" addToFile "db.driver=org.gjt.mm.mysql.Driver" $CUSTOREPOPROPERTY "db.driver=" addToFile "db.url=jdbc:mysql://localhost/alfresco" $CUSTOREPOPROPERTY "db.url=" addToFile "db.password=alfresco" $CUSTOREPOPROPERTY "db.password=" addToFile "db.username=alfresco" $CUSTOREPOPROPERTY "db.username=" addToFile "hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect" $HIBFILE "hibernate.dialect=org" ==Configuration Alfresco / PostgreSQL== HIBFILE=/opt/Alfresco/tomcat/shared/classes/alfresco/extension/custom-hibernate-dialect.properties CUSTOREPOPROPERTY=/opt/Alfresco/tomcat/shared/classes/alfresco/extension/custom-repository.properties apt-get -y --force-yes install postgresql-8.3 sudo -u postgres bash -c "psql postgres -d template1 -c 'create database alfresco;'" sudo -u postgres bash -c "psql postgres -d template1 -c \"create user alfresco with password 'alfresco';\"" sudo -u postgres bash -c "psql postgres -d template1 -c 'grant all on database alfresco to alfresco;'" wget -c http://jdbc.postgresql.org/download/postgresql-8.3-604.jdbc4.jar -O /opt/Alfresco/tomcat/common/lib//postgresql-8.3-604.jdbc4.jar addToFile "db.driver=org.postgresql.Driver" $CUSTOREPOPROPERTY addToFile "db.url=jdbc:postgresql://localhost:5432/alfresco" $CUSTOREPOPROPERTY addToFile "db.password=alfresco" $CUSTOREPOPROPERTY addToFile "db.username=alfresco" $CUSTOREPOPROPERTY addToFile "hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect" $HIBFILE "hibernate.dialect=" ==Configuration Alfresco / Derby== Alfresco est configuré par défaut pour fonctionner avec Derby. Dans ce cas, il n'y a rien à faire. ===Premier usage=== Il faut dans un premier temps démarrer le service Alfresco: /opt/Alfresco/alfresco.sh start sleep 3 tail -f /opt/Alfresco/alfresco.log On peut maintenant se connecter via l'url : http://127.0.0.1:8080/alfresco/ login : admin password : admin Dépéchez vous de **modifier le mot de passe de l'utilisateur admin !!!** ===Complément d'installation=== ==Personnaliser Alfresco == Par défaut, vous pouvez voir en haut à gauche de l'interface Web d'alfresco "Company Home". Evidement, vous pouvez adapter cela à vos besoin/votre entreprise. Pour ce faire, il faut modifier le fichier : /opt/Alfresco/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/messages/webclient_en_US.properties Rechercher la ligne contenant : company_home=Company Home Et adapter la à vos besoin : sed -i "s#^company_home=.*#company_home=Ma petite entreprise#g" /opt/Alfresco/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/messages/webclient_en_US.properties ==Sécuriser Alfresco == Etrangement, le répertoire d'installation /opt/Alfresco est accessible en lecture à tous les utilisateurs de la machine ! Ce répertoire contient en clair les login et mot de passe pour la connection à la base de donnée. Il faut donc sécuriser l'accès à ce répertoire: chmod -R 700 /opt/Alfresco ===Liens utiles=== * [[http://www.alfresco.com/help/3/labs/ECMExplorerHelp | Aide officielle ]] * [[http://forums.alfresco.com/fr/ | forum officielle ]] * [[http://rockmebabe.free.fr/page.php?menu=menu-toolbox.php&linkto=toolbox/20090315-Installer-Alfresco-Ubuntu-8.10/content.html&download=toolbox/20090315-Installer-Alfresco-Ubuntu-8.10/install_alfresco.sh&title=Installer%20Alfresco%20Labs%203%20-%20Ubuntu%208.10&dir=toolbox/20090315-Installer-Alfresco-Ubuntu-8.10/&image= | Alfresco on Ubuntu 8.10 ]] Have Fun :-)