#!/bin/bash export ANT_OPTS=-Xmx1024m INSTALLER_DIR=`pwd` if [[ `id -u` != 0 ]] then echo "Sorry but this install script needs root permission to run." exit 1 fi # Tell user what will be done echo "================================================================ This script will install Muradora and all its related components consisting of: - Fedora 2.2.3 - Solr (1.3 development version) - Oracle DB XML (2.3.10) - melcoe-pdp - melcoe-pep - Orbeon XForms engine - Apache Axis2 - Muradora The pre-requisites are: - Any Tomcat server is shutdown - Ant is installed - Sun JDK > 1.5 is installed - There is an LDAP for Fedora to authenticate against. - You have three databases set up for Fedora. Fedora requires a fedora object database, another database for the resource index (for the latter you can use the embedded Kowari database), and the third one is for Muradora access statistics ================================================================ " printf "\n" echo -n "Have you met all the pre-requisites? [Y,n]" read MEET_PREREQ if [[ -n "${MEET_PREREQ}" ]] && [[ ${MEET_PREREQ} != "Y" ]] && [[ ${MEET_PREREQ} != "y" ]] then printf "\n" printf "\n" echo "Please make sure you have met the above pre-requisites" echo "before re-running this installer" exit 1 fi #------------------------------------------------------------------------- # Check if JAVA_HOME is defined and valid while true do if [[ -a "${JAVA_HOME}/bin/java" ]] then break else JAVA_HOME="" printf "\n" printf "\n" echo "Unable to locate SUN JDK >= 1.5" echo "Please enter the directory where SUN JDK >= 1.5 is installed: " read JAVA_HOME fi done export JAVA_HOME export PATH=${JAVA_HOME}/bin:$PATH # Check if DB XML is installed echo "================================================================" while true do DBXML_HOME="" printf "\n" printf "\n" echo "Muradora requires Oracle DB XML to be installed on your system." echo "If you've already installed DB XML before, you can say no in the next step," echo "and specify where DB XML is installed on your system" echo "Hit enter to continue" read printf "\n" printf "\n" echo -n "Do you want to install DB XML :[Y,n]" read INSTALL_DBXML if [[ -z $INSTALL_DBXML ]] || [[ $INSTALL_DBXML == "Y" ]] || [[ $INSTALL_DBXML == "y" ]] then echo -n "Please enter the directory for installing dbxml: " read DBXML_HOME echo "================================================================" echo "Note: Compiling and installing DB XML can take a VERY LONG TIME" echo "================================================================" echo "Hit enter to continue" read tar -xf dbxml-2.3.10.tar cd dbxml-2.3.10 ./buildall.sh --prefix=${DBXML_HOME} --enable-java if [[ $? != 0 ]] then printf "\n" printf "\n" echo "Failed to install Oracle DB XML" echo "Please check the log file for errors. Exiting ..." exit 1 fi rm -rf dbxml-2.3.10 break; else echo "Please enter the directory where Oracle DB XML 2.3.10 is installed: " read DBXML_HOME # Check if it is really installed if ! [[ -a ${DBXML_HOME}/bin/dbxml ]] then echo "Unable to locate DB_XML executable" continue fi break fi done export DBXML_HOME export LD_LIBRARY_PATH=${DBXML_HOME}/lib:$LD_LIBRARY_PATH #Needed for MacOSX export DYLD_LIBRARY_PATH=${DBXML_HOME}/lib:$DYLD_LIBRARY_PATH export PATH=$DBXML_HOME/bin:$PATH cd $INSTALLER_DIR # TOMCAT Settings echo "================================================================" while true do printf "\n" printf "\n" echo "Do you want to install a new Tomcat? [Y, n] " read USE_TOMCAT if [[ -z ${USE_TOMCAT} ]] || [[ ${USE_TOMCAT} == "Y" ]] || [[ ${USE_TOMCAT} == "y" ]] then echo "Installing Tomcat ...." echo "Please enter the directory for the new Tomcat installation: " read TOMCAT_HOME if [[ -z ${TOMCAT_HOME} ]] then echo "Invalid directory" continue; fi if [[ -a ${TOMCAT_HOME} ]] then echo "There is already a Tomcat installation here" echo "Do you want to delete it? [N, y] " echo "*** Warning: If Yes, this will delete everything in ${TOMCAT_HOME}***" read OVERWRITE_TOMCAT if [[ -z $OVERWRITE_TOMCAT ]] || [[ ${OVERWRITE_TOMCAT} == "N" ]] || [[ $OVERWRITE_TOMCAT == "n" ]] then #Removing all our existing webapps rm -rf $TOMCAT_HOME/webapps/muradora* $TOMCAT_HOME/webapps/fedora* \ $TOMCAT_HOME/webapps/axis2* $TOMCAT_HOME/webapps/solr* $TOMCAT_HOME/webapps/orbeon* \ $TOMCAT_HOME/webapps/fop* $TOMCAT_HOME/webapps/imagemanip* continue; else rm -rf $TOMCAT_HOME fi fi cp -r apache-tomcat-6.0.16 ${TOMCAT_HOME} break; else echo -n "Please enter your TOMCAT_HOME value: " read TOMCAT_HOME if [[ -a "${TOMCAT_HOME}/bin/catalina.sh" ]] then rm -rf $TOMCAT_HOME/webapps/muradora* \ $TOMCAT_HOME/webapps/fedora* \ $TOMCAT_HOME/webapps/axis2* \ $TOMCAT_HOME/webapps/solr* \ $TOMCAT_HOME/webapps/orbeon* \ $TOMCAT_HOME/webapps/fop* \ $TOMCAT_HOME/webapps/imagemanip* break; else echo "Unable to locate Tomcat" fi fi done export TOMCAT_HOME export CATALINA_HOME=$TOMCAT_HOME # Installing Orbeon webap echo "================================================================" echo "Installing Orbeon webapp" cp orbeon.war $TOMCAT_HOME/webapps/. mkdir $TOMCAT_HOME/webapps/orbeon cd $TOMCAT_HOME/webapps/orbeon jar -xf ../orbeon.war cd $INSTALLER_DIR sed -e "s,TOMCAT_HOME,${TOMCAT_HOME}," settings/orbeon-log4j.xml > $TOMCAT_HOME/webapps/orbeon/WEB-INF/resources/config/log4j.xml #Modifying TOMCAT_HOME/conf/server.xml printf "\n" printf "\n" echo "We need to change $TOMCAT_HOME/conf/server.xml so that Orbeon and Muradora webapps can share the same context" printf "\n" printf "\n" echo -n "Do you want to patch $TOMCAT_HOME/conf/server.xml? [Y,n]" read PATCH_TOMCAT_SERVER_CONF if [[ -z ${PATCH_TOMCAT_SERVER_CONF} ]] || [[ ${PATCH_TOMCAT_SERVER_CONF} == Y ]] \ || [[ ${PATCH_TOMCAT_SERVER_CONF} == y ]] then mv $TOMCAT_HOME/conf/server.xml $TOMCAT_HOME/conf/server.xml.bak cp settings/tomcat-server.xml $TOMCAT_HOME/conf/server.xml else printf "\n" printf "\n" echo "You will need to modify $TOMCAT_HOME/conf/server.xml by hand to include:" cat settings/tomcat-server-patch.xml fi # Installing Axis2 cp axis2.war $TOMCAT_HOME/webapps/. rm -rf $TOMCAT_HOME/webapps/axis2 mkdir $TOMCAT_HOME/webapps/axis2 cd $TOMCAT_HOME/webapps/axis2 jar -xf ../axis2.war cd $INSTALLER_DIR # Install melcoe-pdp echo "================================================================" printf "\n" printf "\n" echo -n "Please enter the directory where you install melcoe-pdp: [/usr/local/melcoe-pdp]" read MELCOEPDP_HOME if [[ -z ${MELCOEPDP_HOME} ]] then MELCOEPDP_HOME=/usr/local/melcoe-pdp fi export MELCOEPDP_HOME printf "\n" printf "\n" echo "Please wait while we install melcoe-pdp to ${MELCOEPDP_HOME}" cd melcoe-pdp ant uninstall ant install if [[ $? != 0 ]] then printf "\n" printf "\n" echo "Failed to install MELCOE-PDP!" echo "Please check the log file for errors. Exiting ..." exit 1 fi printf "\n" printf "\n" echo "Please wait while we load the default policies located in ${MELCOEPDP_HOME}/policies" ant load-policies if [[ $? != 0 ]] then printf "\n" printf "\n" echo "Failed to load bootstrap policies ! " echo "Please check the log file for errors. Exiting ..." exit 1 fi #Installing Fedora printf "\n" printf "\n" echo "================================================================" cd ${INSTALLER_DIR} echo "Starting Installer for Fedora 2.2.3" # Get the DNS name of the server echo "Please enter the fully qualified hostname of your server: " read FQDNS # Get FEDORA_HOME echo "Please enter the directory for FEDORA_HOME: [/usr/local/fedora-2-2.3] " read FEDORA_HOME if [[ -z $FEDORA_HOME ]] then FEDORA_HOME=/usr/local/fedora-2.2.3 fi export FEDORA_HOME # Get the fedoraAdmin password while true do echo -n "Please enter the Fedora administrator password: " read ADMIN_PASSWORD if [[ -z $ADMIN_PASSWORD ]] then echo "fedoraAdmin password cannot be empty" continue; fi break; done # Get the fedoraPublic password while true do echo -n "Please enter the Fedora public/anonymous user password: " read PUBLIC_PASSWORD if [[ -z $PUBLIC_PASSWORD ]] then echo "Public/Anonymous user password cannot be empty" continue; fi break; done # Generating the bootstrap user file sed -e "s/adminPassword/$ADMIN_PASSWORD/" -e "s/publicPassword/$PUBLIC_PASSWORD/" settings/fedora-users.xml > fedora-users.xml #Get the database details while true do echo -n "Please enter your database types. Valid values are [mckoi mysql oracle postgresql]: " read DATABASE if [[ $DATABASE == "oracle" ]] then echo -n "Please enter the full path to your JDBC driver: " read DATABASE_DRIVER_PATH echo -n "Please enter the name of your Oracle driver class: [oracle.jdbc.driver.OracleDriver]" read DATABASE_DRIVER_CLASS if [[ -z ${DATABASE_DRIVER_CLASS} ]] then DATABASE_DRIVER_CLASS=oracle.jdbc.driver.OracleDriver fi echo "Please enter the name of your JDBC URL for Fedora: [jdbc:oracle:thin:@localhost:1521:fedora] " read DATABASE_FEDORA_URL if [[ -z $DATABASE_FEDORA_URL ]] then DATABASE_FEDORA_URL="jdbc:oracle:thin:@localhost:1521:fedora" fi echo "Please enter the name of your JDBC URL for Logging database: [jdbc:oracle:thin:@localhost:1521:muradoralog] " read DATABASE_MURADORALOG_URL if [[ -z $DATABASE_MURADORALOG_URL ]] then DATABASE_MURALOG_URL="jdbc:oracle:thin:@localhost:1521:muradoralog" fi RI_DATABASE=kowari DATABASE_FEDORA_URL_TYPE=database.oracle.jdbcURL DATABASE_FEDORA_DRIVER_CLASS_TYPE=database.oracle.jdbcDriverClass DATABASE_FEDORA_DRIVER_PATH_TYPE=database.oracle.driver elif [[ $DATABASE == "mckoi" ]] then echo "Please enter the full path to your JDBC driver" echo -n "or you can youse the included driver: [included]" read DATABASE_DRIVER_PATH if [[ -z $DATABASE_DRIVER_PATH ]] then DATABASE_DRIVER_PATH=included fi echo -n "Please enter the name of your MCKOI driver class: [com.mckoi.JDBCDriver]" read DATABASE_DRIVER_CLASS if [[ -z $DATABASE_DRIVER_CLASS ]] then DATABASE_DRIVER_CLASS=com.mckoi.JDBCDriver fi echo -n "Please enter the name of your JDBC URL for Fedora: [jdbc:mckoi://localhost:9157/] " read DATABASE_FEDORA_URL if [[ -z $DATABASE_FEDORA_URL ]] then DATABASE_FEDORA_URL="jdbc:mckoi://localhost:9157/" fi echo -n "Please enter the name of your JDBC URL for Logging database: " read DATABASE_MURADORALOG_URL if [[ -z $DATABASE_MURADORALOG_URL ]] then echo "Muradora requires a valid JDBC URL for its logging database" continue; fi RI_DATABASE=kowari DATABASE_FEDORA_URL_TYPE=database.mckoi.jdbcURL DATABASE_FEDORA_DRIVER_CLASS_TYPE=database.mckoi.jdbcDriverClass DATABASE_FEDORA_DRIVER_PATH_TYPE=database.mckoi.driver elif [[ $DATABASE == "mysql" ]] then echo -n "Please enter the full path to your JDBC driver: [included] " read DATABASE_DRIVER_PATH if [[ -z $DATABASE_DRIVER_PATH ]] then DATABASE_DRIVER_PATH=included fi echo -n "Please enter the name of your Mysql driver class: [com.mysql.jdbc.Driver] " read DATABASE_DRIVER_CLASS if [[ -z $DATABASE_DRIVER_CLASS ]] then DATABASE_DRIVER_CLASS=com.mysql.jdbc.Driver fi echo "Please enter the name of your JDBC URL for Fedora: [jdbc:mysql://localhost/fedora?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true] " read DATABASE_FEDORA_URL if [[ -z $DATABASE_FEDORA_URL ]] then DATABASE_FEDORA_URL="jdbc:mysql://localhost/fedora?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true" fi echo "Please enter the name of your JDBC URL for Logging database: " read DATABASE_MURADORALOG_URL if [[ -z $DATABASE_MURADORALOG_URL ]] then echo "Muradora requires a valid JDBC URL for its logging database" continue; fi RI_DATABASE=kowari DATABASE_FEDORA_URL_TYPE=database.mysql.jdbcURL DATABASE_FEDORA_DRIVER_CLASS_TYPE=database.mysql.jdbcDriverClass DATABASE_FEDORA_DRIVER_PATH_TYPE=database.mysql.driver elif [[ $DATABASE == "postgresql" ]] then echo -n "Please enter the full path to your JDBC driver: [included]" read DATABASE_DRIVER_PATH if [[ -z $DATABASE_DRIVER_PATH ]] then DATABASE_DRIVER_PATH=included fi echo -n "Please enter the name of your Postgresql driver class: [org.postgresql.Driver] " read DATABASE_DRIVER_CLASS if [[ -z $DATABASE_DRIVER_CLASS ]] then DATABASE_DRIVER_CLASS=org.postgresql.Driver fi echo "Please enter the name of your JDBC URL for Fedora: [jdbc:postgresql://localhost/fedora] " read DATABASE_FEDORA_URL if [[ -z $DATABASE_FEDORA_URL ]] then DATABASE_FEDORA_URL="jdbc:postgresql://localhost/fedora" fi RI_DATABASE=postgresql echo "Please enter the name of your JDBC URL for Resource Index: [jdbc:postgresql://localhost/riTriples] " read DATABASE_RI_URL if [[ -z $DATABASE_RI_URL ]] then DATABASE_RI_URL="jdbc:postgresql://localhost/riTriples" fi echo -n "Please enter the name of your JDBC URL for Logging database:[jdbc:postgresql://localhost/muradoralog] " read DATABASE_MURADORALOG_URL if [[ -z $DATABASE_MURADORALOG_URL ]] then DATABASE_MURADORALOG_URL="jdbc:postgresql://localhost/muradoralog" fi DATABASE_FEDORA_URL_TYPE=database.postgresql.jdbcURL DATABASE_FEDORA_DRIVER_CLASS_TYPE=database.postgresql.jdbcDriverClass DATABASE_FEDORA_DRIVER_PATH_TYPE=database.postgresql.driver else echo "Invalid database value" continue; fi echo -n "Please enter your database login name: " read DATABASE_USERNAME echo -n "Please enter your database password: " read DATABASE_PASSWORD if [[ -z $DATABASE_USERNAME ]] || [[ -z $DATABASE_PASSWORD ]] then echo "Database username and password cannot be empty." continue; fi break; done # Generating the install properties file cp settings/fedora-install.properties install.properties echo "fedora.home=$FEDORA_HOME" >> install.properties echo "tomcat.home=$TOMCAT_HOME" >> install.properties echo "fedora.serverHost=$FQDNS" >> install.properties echo "fedora.admin.password=$ADMIN_PASSWORD" >> install.properties echo "database=$DATABASE" >> install.properties echo "database.driver=$DATABASE_DRIVER_PATH" >> install.properties echo "$DATABASE_FEDORA_DRIVER_PATH_TYPE=$DATABASE_DRIVER_PATH" >> install.properties echo "database.jdbcDriverClass=$DATABASE_DRIVER_CLASS" >> install.properties echo "$DATABASE_FEDORA_DRIVER_CLASS_TYPE=$DATABASE_DRIVER_CLASS" >> install.properties echo "database.jdbcURL=$DATABASE_FEDORA_URL" >> install.properties echo "$DATABASE_FEDORA_URL_TYPE=$DATABASE_FEDORA_URL" >> install.properties echo "database.username=$DATABASE_USERNAME" >> install.properties echo "database.password=$DATABASE_PASSWORD" >> install.properties if [[ -a $FEDORA_HOME ]] then echo "$FEDORA_HOME already exists." echo "Do you want to remove it? [Y, n]" echo "*** Warning: If Y, this will remove everything under ${FEDORA_HOME} ***" read REMOVE_FEDORA if [[ -z $REMOVE_FEDORA ]] || [[ $REMOVE_FEDORA == "Y" ]] \ || [[ $REMOVE_FEDORA == "y" ]] then rm -rf $FEDORA_HOME else echo "Please rerun this installer and choose a different path for FEDORA_HOME" exit 1; fi fi java -jar fedora-2.2.3-installer.jar install.properties if [[ $? != 0 ]] then printf "\n" printf "\n" echo "Failed to install Fedora" echo "Please check the log file for errors. Exiting ..." exit 1 fi cp fedora-users.xml $FEDORA_HOME/server/config/. #Enable ResourceIndex, GsearchDOManager for Fedora and making sure the database #username and password is correct sed -e "s///" -e "s/\"dbUsername\" value=\"fedoraAdmin\"/\"dbUsername\" value=\"$DATABASE_USERNAME\"/" -e "s/\"dbPassword\" value=\"fedoraAdmin\"/\"dbPassword\" value=\"$DATABASE_PASSWORD\"/" \ -e "s/fedora.server.storage.DefaultDOManager\">/au.edu.mq.melcoe.fedora.SolrDOManager\">\n/" $FEDORA_HOME/server/config/fedora.fcfg > fedora.fcfg if [[ $RI_DATABASE == "postgresql" ]] then cp fedora.fcfg fedora.fcfg-new sed -e "s///" -e "s,jdbc:postgresql://localhost/riTriples,${DATABASE_RI_URL}," -e "s/name=\"password\" value=\"fedoraAdmin\"/name=\"password\" value=\"${DATABASE_PASSWORD}\"/" -e "s/name=\"username\" value=\"fedoraAdmin\"/name=\"username\" value=\"${DATABASE_USERNAME}\"/" fedora.fcfg-new > fedora.fcfg fi # mv $FEDORA_HOME/server/config/fedora.fcfg $FEDORA_HOME/server/config/fedora.fcfg.bak cp fedora.fcfg $FEDORA_HOME/server/config/. rm fedora.fcfg-new fedora.fcfg mkdir $TOMCAT_HOME/webapps/fedora cd $TOMCAT_HOME/webapps/fedora jar -xf ../fedora.war cd $INSTALLER_DIR #Installing MELCOE-PEP printf "\n" printf "\n" echo "================================================================" echo "Installing melcoe-pep" cd melcoe-pep sed -e "s,TOMCAT_HOME,${TOMCAT_HOME}," \ ${INSTALLER_DIR}/settings/melcoe-pep.log4j.properties > base/properties/melcoe-pep.log4j.properties ant install -Dwebapp.location=$TOMCAT_HOME/webapps/fedora #Change the cd $INSTALLER_DIR #Setting up the LDAP connection printf "\n" printf "\n" echo "================================================================" echo "Setting up the LDAP authentication source" echo "Note: This installer only handles simple ldap authentication settings" echo "For more advanced ldap configurations, please edit" echo "$TOMCAT_HOME/fedora/WEB-INF/web.xml" echo "at the conclusion of this installation" echo "Instructions on possible settings for ldap is available here:" echo "http://fedora.info/wiki/index.php/Authenticating_Fedora_2.2_against_LDAP" echo "================================================================" printf "\n" printf "\n" echo -n "Please hit to continue" read printf "\n" printf "\n" while true do echo -n "Please enter you LDAP protocol: [ldap, ldaps] " read LDAP_PROTOCOL if [[ -z $LDAP_PROTOCOL ]] then LDAP_PROTOCOL="ldap" fi if [[ $LDAP_PROTOCOL != "ldap" ]] && [[ $LDAP_PROTOCOL != "ldaps" ]] then echo "Invalid LDAP protocol" continue; fi echo -n "Please enter your LDAP host: [localhost] " read LDAP_HOST if [[ -z $LDAP_HOST ]] then LDAP_HOST=localhost fi echo -n "PLease enter your LDP server port: [389] " read LDAP_PORT if [[ -z $LDAP_PORT ]] then LDAP_PORT=389 fi echo "Please enter the LDAP DN for your user base: eg \"ou=people,dc=localhost,dc=localdomain\"" read LDAP_USER_BASE if [[ -z $LDAP_USER_BASE ]] then echo "Invalid DN for user base" continue fi echo "Please enter the LDAP attribute for your user role: eg eduPersonEntitlement" read LDAP_ROLE_ATTRIBUTE if [[ -z $LDAP_ROLE_ATTRIBUTE ]] then echo "Invalid LDAP attribute" continue fi break; done sed -e "s,FEDORA_HOME,${FEDORA_HOME}," -e "s/LDAP_PROTOCOL/${LDAP_PROTOCOL}/" \ -e "s/LDAP_HOST/${LDAP_HOST}/" \ -e "s/LDAP_PORT/${LDAP_PORT}/" -e "s/LDAP_USER_BASE/${LDAP_USER_BASE}/" \ -e "s/LDAP_ROLE_ATTRIBUTE/${LDAP_ROLE_ATTRIBUTE}/" settings/web.xml > $TOMCAT_HOME/webapps/fedora/WEB-INF/web.xml # Installing Solr printf "\n" printf "\n" echo "================================================================" echo "Installing Apache Solr" cd $INSTALLER_DIR while true do echo "Please enter the directory for Solr installation" read SOLR_HOME if [[ -a $SOLR_HOME ]] then echo "Do you want to overwrite $SOLR_HOME [Y,n]" echo "*** Warning: If Y, this will remove everything in ${SOLR_HOME} ***" read OVERWRITE_SOLR if [[ -z $OVERWRITE_SOLR ]] || [[ $OVERWRITE_SOLR == "Y" ]] || [[ $OVERWRITE_SOLR == "y" ]] then echo "Removing old Solr installation" rm -rf $SOLR_HOME else continue fi fi cp -r solr ${SOLR_HOME} cd ${SOLR_HOME} ant dist cp dist/apache-solr-1.3-dev.war example/webapps/solr.war #Modify the solrconfig.xml so that it points to the correct Fedora URL and use the right admin password sed -e "s/ADMIN_PASSWORD/${ADMIN_PASSWORD}/" -e "s,SOLR_HOME,${SOLR_HOME}," ${INSTALLER_DIR}/settings/solrconfig.xml > ${SOLR_HOME}/example/solr/conf/solrconfig.xml mkdir ${TOMCAT_HOME}/conf/Catalina mkdir ${TOMCAT_HOME}/conf/Catalina/localhost sed -e "s,SOLR_HOME,${SOLR_HOME}," ${INSTALLER_DIR}/settings/solr.xml > $TOMCAT_HOME/conf/Catalina/localhost/solr.xml break; done # Installing SolrDOManager printf "\n" printf "\n" echo "================================================================" echo "Installing SolrDOManager for Fedora" cd $INSTALLER_DIR/SolrDOManager ant dist-jar cp dist/solr-dom.jar $TOMCAT_HOME/webapps/fedora/WEB-INF/lib/ #Installing Muradora cd $INSTALLER_DIR printf "\n" printf "\n" echo "================================================================" echo "Installing Muradora" sed -e "s/PUBLIC_PASSWORD/${PUBLIC_PASSWORD}/" -e "s/ADMIN_PASSWORD/${ADMIN_PASSWORD}/" \ -e "s,DATABASE_MURADORALOG_URL,${DATABASE_MURADORALOG_URL}," \ -e "s/DATABASE_USERNAME/${DATABASE_USERNAME}/" \ -e "s/DATABASE_PASSWORD/${DATABASE_PASSWORD}/" \ -e "s,FEDORA_HOME,${FEDORA_HOME}," \ -e "s,TOMCAT_HOME,${TOMCAT_HOME}," \ -e "s/FQDNS/${FQDNS}/" \ -e "s/LDAP_HOST/${LDAP_HOST}/" \ -e "s/LDAP_PORT/${LDAP_PORT}/"\ -e "s/LDAP_PROTOCOL/${LDAP_PROTOCOL}/" \ -e "s/LDAP_USER_BASE/${LDAP_USER_BASE}/" \ settings/muradora.properties > muradora/src/muradora.properties sed -e "s/FQDNS/${FQDNS}/" settings/dar_config.xml > muradora/src/dar_config.xml cd muradora ant clean ant package-web if [[ $? != 0 ]] then printf "\n" printf "\n" echo "Failed to compile Muradora" echo "Please check the log file for errors. Exiting ..." exit 1 fi cp dist/webapps/muradora.war $TOMCAT_HOME/webapps/. #Patching Fedora Demos cd $INSTALLER_DIR/converter-demo-objects echo "================================================================" echo "Patching Fedora demo objects" printf "\n" printf "\n" ant run #Building muradoralog cd $INSTALLER_DIR/muradoralog echo "================================================================" echo "Building Muradoralog " printf "\n" printf "\n" sed -e "s,TOMCAT_HOME,${TOMCAT_HOME}," \ -e "s,DATABASE_MURADORALOG_URL,${DATABASE_MURADORALOG_URL},"\ -e "s/DATABASE_USERNAME/${DATABASE_USERNAME}/"\ -e "s/DATABASE_PASSWORD/${DATABASE_PASSWORD}/" \ $INSTALLER_DIR/settings/muradoralog.properties > src/muradoralog.properties ant clean ant echo "================================================================ Installation complete Please ensure you set the following environments before starting Tomcat export FEDORA_HOME=$FEDORA_HOME export TOMCAT_HOME=$TOMCAT_HOME export CATALINA_HOME=$TOMCAT_HOME export JAVA_HOME=$JAVA_HOME export MELCOEPDP_HOME=$MELCOEPDP_HOME export PATH=${DBXML_HOME}/bin:\$PATH export LD_LIBRARY_PATH=${DBXML_HOME}/lib:\$LD_LIBRARY_PATH (NOTE: if you are using MacOSX then instead of LD_LIBRARY_PATH, you need to use DYLD_LIBRARY_PATH) Please also ensure you allocate sufficient memory to Tomcat. For example, you might want to use the following settings for JAVA_OPTS prior to starting TOMCAT export JAVA_OPTS='-Xms512m -Xmx1024m -XX:PermSize=512m' To enable statistics information, please set up a regular cron job by executing (after starting TOMCAT): java -jar $INSTALLER_DIR/muradoralog/muradoralog.jar If you want to ingest Fedora demos, please use the ingest demo script located under $FEDORA_HOME/client/bin/fedora-ingest-demos.sh Your administrator username is \"fedoraAdmin\" You anonymous/public username is \"public\" Their corresponding passwords are found in $FEDORA_HOME/server/conf/fedora-users.xml Other info: Muradora URL is located at http://${FQDNS}:8080/muradora Solr URL is located at http://${FQDNS}:8080/solr/admin ================================================================" exit 0