brent 5 Posted June 18, 2018 This document shows how to install Alfresco 4.2 on an Ubuntu 12.04 system. I am creating a virtual server for this that has 3.75 GiB of Memory Installing Java 7 Here are the commands to install Java 7 from Ubuntu 12.04 server. > sudo apt-get purge openjdk* > sudo apt-get install python-software-properties > sudo add-apt-repository ppa:webupd8team/java > sudo apt-get update > sudo apt-get install oracle-java7-installer > java -version Install Tomcat 7 ( a lot of this was derived from http://jensontaylor....-on-ubuntu.html ) · Download tomcat 7 to the local directory (this address could change see http://tomcat.apache...download-70.cgi [2]) > wget http://apache.osuosl.org/tomcat/tomcat-7/v7.0.50/bin/apache-tomcat-7.0.50.tar.gz Extract the file > tar xvzf apache-tomcat-7.0.50.tar.gz Move the tomcat over > sudo mv apache-tomcat-7.0.50 /opt/tomcat Now set up the tomcat users. > sudo nano /opt/tomcat/conf/tomcat-users.xml Add the following lines within the <tomcat-users> element (of course change the password to your own password) <role rolename="manager-gui"/> <role rolename="admin-gui"/> <user name="admin" password="password" roles="admin-gui, manager-gui, manager-script, admin-script" /> Fix the connector, > sudo nano +70 /opt/tomcat/conf/server.xml And add this to the connector URIEncoding="UTF-8" Set up start up script > sudo nano /etc/init.d/tomcat Then place the following in it. (adjust the jvm to the directory you have it in) # Tomcat auto-start # # description: Auto-starts tomcat # processname: tomcat # pidfile: /var/run/tomcat.pid export JAVA_HOME=/usr/lib/jvm/java-7-oracle case $1 in start) sh /opt/tomcat/bin/startup.sh ;; stop) sh /opt/tomcat/bin/shutdown.sh ;; restart) sh /opt/tomcat/bin/shutdown.sh sh /opt/tomcat/bin/startup.sh ;; esac exit 0 Make it executable > sudo chmod 755 /etc/init.d/tomcat Add it to autostart > sudo update-rc.d tomcat defaults Reboot to test auto start of tomcat > sudo reboot now Now open up a web browser (of course use your IP address, domain name) Change memory settings for tomcat > sudo nano /opt/tomcat/bin/catalina.sh Add the following line This gives it 2GiB to use, you may need to change it to your system JAVA_OPTS="-XX:MaxPermSize=160m -XX:NewSize=256m -Xms512m " JAVA_OPTS="$JAVA_OPTS -Xmx1024m -Xss512K " Restart tomcat > sudo /etc/init.d/tomcat restart Open up http://192.168.2.110.../manager/status to check the memory settings Here you can see here that it does have 2GiB of max memory (roughly) Install/Setup MySQL Install mysql on this server > sudo apt-get install mysql-server Log into mysql > mysql -u root -p -h localhost Run this command in mysql to create alfresco user and to give it alfresco access > CREATE USER 'alfresco'@'localhost' IDENTIFIED BY 'passalfresco'; > CREATE USER 'alfresco'@'%' IDENTIFIED BY 'passalfresco'; > grant all on alfresco.* to 'alfresco'@'%' identified by 'passalfresco' with grant option; > create database alfresco default character set utf8 collate utf8_bin; > exit Restart mysql > sudo /etc/init.d/mysql restart Create Alfresco Folder Make a alfresco folder > sudo mkdir /opt/alfresco Download Install Alfresco Some of the notes I used for this are at http://wiki.alfresco...fresco_in_Linux [3] Download the installer (this address will change over time) but you can probably be safe going to http://wiki.alfresco...nstall_Alfresco [4] or http://wiki.alfresco...file_list_4.2.c > cd > mkdir alfresco > cd alfresco > sudo sudo http://dl.alfresco.com/release/community/build-4848/alfresco-community-4.2.e.zip If you do not have unzip install it. > sudo apt-get install unzip unzip file > unzip alfresco-community-4.2.e.zip Install alfresco.war and share.war on tomcat Open up the tomcat web page http://192.168.0.231:8080/manager/html Then enter Context Path /alfresco War Directory /opt/alfresco/web-server/webapps/alfresco.war Click Deploy It will deploy but fail to start (which is fine) Now do the same for share.war Then enter Context Path /share War Directory /opt/alfresco/web-server/webapps/share.war Click Deploy Download and install mysql connector, it can be found at http://dev.mysql.com...ds/connector/j/ [5] > cd > wget http://cdn.mysql.com/Downloads/Connector-J/mysql-connector-java-5.1.28.zip > unzip mysql-connector-java-5.1.28.zip > cd mysql-connector-java-5.1.28/ > cp mysql-connector-java-5.1.28-bin.jar /opt/tomcat/lib/ setup the shared directory > cd > cd /opt/alfresco/web-server > sudo cp -r shared /opt/tomcat/ Set Global Properties Alfresco requires some additional installs to work. Alfresco out of the box uses a few other tools like OpenOffice and ImageMagick. Some of this was gleamed from http://www.howtoforg...0.04-lucid-lynx [6] First update your repository information > sudo apt-add-repository ppa:guilhem-fr/swftools > sudo add-apt-repository ppa:upubuntu-com/office > sudo apt-get update Install these via apt-get > sudo apt-get install imagemagick swftools libjodconverter-java ffmpeg ttf-mscorefonts-installer Copy these sample files to .xml files (it will allow the creation of thumbnails for videos) > cd /opt/tomcat/shared/classes/alfresco/extension/ > sudo cp video-thumbnail-context.xml.sample video-thumbnail-context.xml > sudo cp video-transformation-context.xml.sample video-transformation-context.xml Edit the /opt/tomcat/conf/catalina.properties file > sudo nano +74 /opt/tomcat/conf/catalina.properties Updated shared.loader to the following shared.loader=${catalina.base}/shared/classes,${catalina.base}/shared/lib/*.jar In the /opt/tomcat/shared/classes directory there is an alfresco-global.properties.sample folder. Rename it > cd /opt/tomcat/shared/classes > sudo cp alfresco-global.properties.sample alfresco-global.properties Now edit this file > sudo nano alfresco-global.properties Here is the file I made, Make sure to edit the mail.* portion to an email account you have. (new in ubuntu 12.04 open office is now libreoffice) ############################### ## Common Alfresco Properties # ############################### # # Sample custom content and index data location # dir.root=/opt/alfresco/alf_data #dir.keystore=${dir.root}/keystore # # Sample database connection properties # db.username=alfresco db.password=Sp23rty4 #Disabled the guest login alfresco.authentication.allowGuestLogin=false # # External locations #------------- ooo.exe=/usr/bin/libreoffice ooo.enabled=true ooo.port=8100 jodconverter.officeHome=/usr/lib/libreoffice/program/soffice jodconverter.portNumbers=8100 jodconverter.enabled=true img.root=/usr img.dyn=${img.root}/lib img.exe=${img.root}/bin/convert swf.exe=/usr/bin/pdf2swf ffmpeg.exe=/usr/bin/ffmpeg # # Property to control whether schema updates are performed automatically. # Updates must be enabled during upgrades as, apart from the static upgrade scripts, # there are also auto-generated update scripts that will need to be executed. After # upgrading to a new version, this can be disabled. # #db.schema.update=true # # MySQL connection # db.driver=org.gjt.mm.mysql.Driver db.name=alfresco db.url=jdbc:mysql://localhost/alfresco?useUnicode=yes&characterEncoding=UTF-8 # # Oracle connection # #db.driver=oracle.jdbc.OracleDriver #db.url=jdbc:oracle:thin:@localhost:1521:alfresco # # PostgreSQL connection (requires postgresql-8.2-504.jdbc3.jar or equivalent) # #db.driver=org.postgresql.Driver #db.url=jdbc:postgresql://localhost:5432/alfresco # # DB2 connection # #db.driver=com.ibm.db2.jcc.DB2Driver #db.url=jdbc:db2://localhost:50000/alfresco:retrieveMessagesFromServerOnGetMessage=true; # # Index Recovery Mode #------------- #index.recovery.mode=AUTO # # Outbound Email Configuration #------------- mail.host=smtp.gmail.com mail.port=465 mail.protocol=smtps mail.username=yourname@example.com mail.password=yourpassword mail.smtp.timeout=30000 # New Properties mail.smtps.starttls.enable=true mail.smtps.auth=true # # Alfresco Email Service and Email Server #------------- # Enable/Disable the inbound email service. The service could be used by processes other than # the Email Server (e.g. direct RMI access) so this flag is independent of the Email Service. #------------- #email.inbound.enabled=true # Email Server properties #------------- #email.server.enabled=true #email.server.port=25 #email.server.domain=alfresco.com #email.inbound.unknownUser=anonymous # A comma separated list of email REGEX patterns of allowed senders. # If there are any values in the list then all sender email addresses # must match. For example: # .*\@alfresco\.com, .*\@alfresco\.org # Allow anyone: #------------- #email.server.allowed.senders=.* # # The default authentication chain # To configure external authentication subsystems see: # http://wiki.alfresco.com/wiki/Alfresco_Authentication_Subsystems #------------- #authentication.chain=alfrescoNtlm1:alfrescoNtlm # # URL Generation Parameters (The ${localname} token is replaced by the local server name) #------------- #alfresco.context=alfresco #alfresco.host=${localname} #alfresco.port=8080 #alfresco.protocol=http # #share.context=share #share.host=${localname} #share.port=8080 #share.protocol=http #imap.server.enabled=true #imap.server.port=143 #imap.server.host=localhost # Default value of alfresco.rmi.services.host is 0.0.0.0 which means 'listen on all adapters'. # This allows connections to JMX both remotely and locally. # alfresco.rmi.services.host=0.0.0.0 # # RMI service ports for the individual services. # These seven services are available remotely. # # Assign individual ports for each service for best performance # or run several services on the same port. You can even run everything on 50500 if needed. # # Select 0 to use a random unused port. # #avm.rmi.service.port=50501 #avmsync.rmi.service.port=50502 #attribute.rmi.service.port=50503 #authentication.rmi.service.port=50504 #repo.rmi.service.port=50505 #action.rmi.service.port=50506 #wcm-deployment-receiver.rmi.service.port=50507 #monitor.rmi.service.port=50508 Reboot the server >sudo reboot now It may take a while for alfresco to come up and set up the database the first time. What I do is log back into the system them tail the tomcat log to see if alfresco is starting correctly, and for when it is done (in my case it took 2 ½ minutes) > sudo tail -f /opt/tomcat/logs/catalina.out See the server startup message. Share this post Link to post Share on other sites