Versioner sammenlignet

Nøgle

  • Linjen blev tilføjet.
  • Denne linje blev fjernet.
  • Formatering blev ændret.

Indholdsfortegnelse

Requirements

Liferay

 

OS and Hardware Settings

Virtual: Why not - the benefist benefits are huge

Preferred OS: Ubuntu LTS 64-bit

Hardware: At least 2 CPU's and at least 4 GB Ram

Libs

Different Libs for image support (ImageMagick), SWFTools (Flash), etc

Kodeblok
sudo apt-get install mysql-server ImageMagick GhostScript smbclient libjpeg62 libgif4 
sudo add-apt-repository ppa:jon-severinsson/ffmpeg
sudo apt-get update
sudo apt-get install ffmpeg
 
sudo apt-get install libart-2.0-2
wget http://archive.canonical.com/ubuntu/pool/partner/s/swftools/swftools_0.9.0-0ubuntu2_amd64.deb
chmod a+x swftools_0.9.0-0ubuntu2_amd64.deb
sudo dpkg -i swftools_0.9.0-0ubuntu2_amd64.deb
sudo rm swftools_0.9.0-0ubuntu2_amd64.deb

LibreOffice

Kodeblok
sudo apt-get install libreoffice
sudo apt-get install ttf-mscorefonts-installer fonts-droid

Mail

SMTP Access for sending mail

IMAP Access for picking up mail

 3 GB Ram

Installation

Prepare database

Create the Database

Kodeblok
mysql>mysql>mysql> create database liferay  CHARACTER SET utf8 COLLATE utf8_bin;
Query OK, 1 row affected (0.00 sec)
mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER,INDEX on liferay.* to liferay@localhost identified by '*****';
Query OK, 0 rows affected (0.00 sec)

...

JAVA is not integrated, and must be installed seperately

MySQL Driver is at http://dev.mysql.com/downloads/connector/j/

Upzip Unzip the download, the goal is to have the install 

Kodeblok
cd /opt
unzip liferay-portal-tomcat-6.2-ce-ga2-20140319114139101.zip
mv liferay-portal-tomcat-6.2-ce-ga2-20140319114139101 liferay
 

If You use MySQL, we need to copy in the driver (get it here) first to to /opt/alfrescoliferay/tomcat-7.0.42/lib:

Kodeblok
sudo cp mysql-connector-java-5.1.34-bin.jar /opt/liferay/tomcat-7.0.42/lib

...

Kodeblok
cd /opt/liferay/tomcat-7.0.42/bin
./startup.sh

Using CATALINA_BASE:   /opt/alfrescoliferay/tomcat-7.0.42
Using CATALINA_HOME:   /opt/alfrescoliferay/tomcat-7.0.42
Using CATALINA_TMPDIR: /opt/alfrescoliferay/tomcat-7.0.42/temp
Using JRE_HOME:        /opt/alfresco/javajre
Using CLASSPATH:       //opt/alfrescoliferay/tomcat-7.0.42/bin/bootstrap.jar:/opt/alfresco/tomcat/bin/tomcat-juli.jar
Using CATALINA_PID:    /opt/alfrescoliferay/tomcat-7.0.42/temp/catalina.pid
Tomcat started.
/opt/alfresco/tomcat/scripts/ctl.sh : tomcat started
root@myserver:~#

See everything is ok:

Kodeblok
root@myserver:~# tail -f /opt/alfrescoliferay/tomcat-7.0.42/logs/catalina.out

...

Tip

A Common problem is:

Kodeblok
themeFadeToGrey
Caused by: java.lang.RuntimeException: Database connection failed: Cannot create JDBC driver of class 'com.mysql.jdbc.Driver' for connect URL 'jdbc:mysql:localhost/alfresco'

Restart install

Easiest way to restart setup is to kill the java process and remove the install dir:

Kodeblok
killall -9 java
rm -rf /opt/alfresco

 

Postinstall

Also review http://docs.alfresco.com/community/concepts/prereq-opt-install.html

Move data

You can move the data dir /opt/alfresco/alf_data to another location (Renaming is not recommeded, the "alf_data" name is in several config files allover)

Kodeblok
unzip 
/etc/init.d/alfresco stop
cd /opt/alfresco/
mv alf_data /data/
ln -s /data/alf_data .
/etc/init.d/alfresco start

Correct Paths

Edit the /opt/alfresco/shared/classes/alfresco-global.properties and check paths

Enable CIFS

Edit the /opt/alfresco/shared/classes/alfresco-global.properties

Kodeblok
## CIFS ##
cifs.disableNativeCode=false
cifs.enabled=true
cifs.serverName=alfresco.myserver.dk
cifs.domain=MYSERVER
cifs.hostannounce=true
cifs.sessionTimeout=500
cifs.ipv6.enabled=false
cifs.tcpipSMB.port=445
cifs.netBIOSSMB.namePort=137
cifs.netBIOSSMB.datagramPort=138
cifs.netBIOSSMB.sessionPort=139
cifs.WINS.autoDetectEnabled=true

Test CIFS

With the SMB Clinet You can test and browse:

Kodeblok
root@myserver: smbclient -U admin \\\\127.0.0.1\\alfresco
Enter admin's password: 
Domain=[MOS-EISLEY] OS=[Java] Server=[Alfresco CIFS Server 6.0.0]
smb: \> ls
  .                                   D        0  Tue Feb 26 18:39:48 2013
  ..                                  D        0  Tue Feb 26 18:39:48 2013
  __ShowDetails.exe                       393216  Tue Feb 26 18:00:58 2013
  __CheckInOut.exe                        393216  Tue Feb 26 18:00:58 2013
  __Alfresco.url                             131  Tue Feb 26 18:00:58 2013
  Data Dictionary                     D        0  Tue Feb 26 08:10:23 2013
  Guest Home                          D        0  Tue Feb 26 08:10:10 2013
  User Homes                          D        0  Tue Feb 26 13:28:42 2013
  Imap Attachments                    D        0  Tue Feb 26 08:10:44 2013
  Sites                               D        0  Tue Feb 26 18:40:03 2013
		65535 blocks of size 33553920. 32767 blocks available
smb: \> 



 

Enable FTP

Edit the /opt/alfresco/tomcat/shared/classes/alfresco-global.properties (see http://docs.alfresco.com/4.1/concepts/fileserv-ftp-props.html)

Kodeblok
### FTP Server Configuration ###
ftp.enabled=true
ftp.port=21
ftp.ipv6.enabled=false

 

Other

Proxy passing

There are good reasons for using an Apache or Traffic Manager in front of the Alfresco Installation, some are:

  • No port changing (non-root users can assign to ports below 1024)
  • Use of URL Rewrite
  • Use of URL Blocking
  • Use of Allow/Denial 
  • SSL offloading/handling outside the Confluence

Se my example in Apache2 Proxy Passing

Trashcan tweaking

Instead of having Alfreso putting deleted files into the contentstore.deleted directory, which has to be cleaned manually, read http://blyx.com/2014/08/18/understanding-alfresco-content-deletion/ and add the amp https://code.google.com/p/alfresco-trashcan-cleaner/ into /op/alfresco/amps/

Edit the /opt/alfresco/tomcat/shared/classes/alfresco-global.properties

Kodeblok
system.content.eagerOrphanCleanup=true
trashcan.cron=0 30 * * * ?
trashcan.daysToKeep=1
trashcan.deleteBatchCount=1000

 

Batch upload

 

Batch upload to Alfresco sites via CIFS

Logfiles

Logrotate

Set up logrotate to avoid ever growing catalina.out log file. Here JIRA_Home is /opt/jira, logs are rotated daily and kept for 7 days:

...

title/etc/logrotate.d/confluence

...

09:52:53,735 INFO  [localhost-startStop-1][DialectDetector:136] Found dialect org.hibernate.dialect.MySQLDialect
09:52:58,382 ERROR [localhost-startStop-1][Cache:120] Unable to set localhost. This prevents creation of a GUID. Cause was: lrserver: lrserver
java.net.UnknownHostException: lrserver: lrserver
	at java.net.InetAddress.getLocalHost(Unknown Source)
	at net.sf.ehcache.Cache.<clinit>(Cache.java:214)

This can be fixed by editing /etc/hosts, so "lrserver" is 127.0.0.1


After Restart, You can go to http://localhost:8080 (or a fitting URL):

First thing is the Basic Configuration

Image Added

Then, the install:

Image Added

After the Install, a notice of the status and where to find the config:

Image Added

Finally, the Portal is up:

Image Added