- 浏览: 141691 次
- 性别:
- 来自: 大连
文章分类
- 全部博客 (135)
- Liferay (12)
- Alfresco (12)
- SIP (1)
- MFTV (7)
- Server (1)
- JVM (1)
- AR (1)
- Agile (1)
- DirectX (2)
- OTP (1)
- Windows (7)
- Electronic (1)
- Wowza (1)
- Documentum (1)
- CMIS (1)
- MCUMediaServer (2)
- Linux (1)
- LBS (1)
- Product Lifecycle Management (1)
- Robot (1)
- XBMC (4)
- Andriod (2)
- Boxee (2)
- Graphic (1)
- GPU (1)
- Openmeeting (2)
- Conference (2)
- GitHub (1)
- iOS (1)
- 越狱 (1)
- OpenELEC (2)
- WIFI (1)
- Big Blue Button (3)
- Sakai (1)
- Redmine (1)
- 联盟营销 (1)
- OpenSplash (1)
- MONO (1)
- HTML5 (1)
- AirPlay (1)
- PHPMotion (1)
- Java (1)
- Maven (1)
- Proxy (1)
- JDK (1)
- Mac (1)
- REST (1)
- JSON (1)
- IT互联网 (1)
最新评论
转自 http://tpeelen.wordpress.com/2012/01/04/installing-alfresco-3-x-4-x-on-32bit-ubuntu/
Installing Alfresco (3.x, 4.x) on (32bit) Ubuntu
Published January 4, 2012 Alfresco , Linux , Ubuntu 21 Comments
Tags: Alfresco, install, linux, Ubuntu
Recently I got into a twitter discussion about installing Alfresco Community on 32bit Ubuntu. Alfresco only provides 64bit installers these days (all-in-one), and the Tomcat distribution is no more. Since Alfresco is a Java app, the app doesn’t matter. It is Java and the helper applications needed, that need to be 32/64bit.
This blog will show you step by step how to install Alfresco and the helper apps on 32bit Ubuntu 11.10 (server). It will use OpenJDK (since it is the default in Ubuntu 11.10), LibreOffice (default in Ubuntu repositories) and MySQL (because I am more familiar with than Postgress). On the way we will install ImageMagick, Pdf2swf and FFmpeg.
First be sure we are on the latest version of everything:
sudo apt-get update
sudo apt-get upgrade
If you run Ubuntu on a VM, and your host is Windows, you might want to use Putty (an ssh client for Windows), and then you need an ssh server on your VMWare box:
sudo apt-get install ssh openssh-blacklist openssh-blacklist-extra
Now you can access your VM from a Windows app, more easy if you need to copy a name or content into a file you are editing. I assume you download packages you need from the internet, and in the end this step-by-step guide expects them to exist in your home folder. You can either download these packages from within Ubuntu, or copy them into your home folder using WinSCP . We are going to install Alfresco in /opt/alfresco40c (4 zero c, the version number). Let’s create this folder right now:
sudo mkdir /opt/alfresco40c
And assign yourself permissions to write in that folder: (assuming your username is ‘uname’)
sudo chown -R uname /opt/alfresco40c
Validate your results by
ls -la /opt
You should note that your username shows in the line displaying folder alfresco40c
Java
Lets install OpenJDK first. (SUN-Java, oh, sorry, Oracle is fine too, but requires more fuzzing with adding other repositories to Ubuntu.) (I happened to install this particular version because the person in question used this version of OpenJDK)
sudo apt-get install openjdk-6-jdk
There most likely is an issue with OpenJDK and Rhino. There are some workarounds too. If you can run the statement below in a terminal window, you’re fine:
java org.mozilla.javascript.tools.shell.JSConsole
Assuming you don’t need Rhino for anything other than Alfresco, you’re save to remove the rhino.jar library all together. See the Alfresco wiki for details and workarounds. I just renamed the rhino.jar provided by OpenJDK:
sudo mv /usr/lib/jvm/java-6-openjdk/jre/lib/rhino.jar /usr/lib/jvm/java-6-openjdk/jre/lib/rhino.jar.not
Let’s check if we got Java installed right:
java -version
responds with something like:
java version "1.6.0_23"
OpenJDK Runtime Environment (IcedTea6 1.11pre) (6b23~pre11-0ubuntu1.11.10)
OpenJDK Client VM (build 20.0-b11, mixed mode)
MySQL
Then we need MySQL
sudo apt-get install mysql-server mysql-client
Remind: Remember the root password you set when you install the server. You will need it later on!
Validate:
mysql -u root -p
It will display:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 45
Server version: 5.1.58-1ubuntu1 (Ubuntu)
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
You type:
show databases;
MySQL responds with:
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
+--------------------+
2 rows in set (0.05 sec)
Done!
ImageMagick, SWFTools, FFMpeg and OpenOffice
Since you install without the all-in-one installer, you also need ImageMagic, FFMpeg and OpenOffice:
sudo apt-get install imagemagick ffmpeg libreoffice
ImageMagick is used to convert and scale images. FFMpeg is needed if you store video in your repository and want to use the audio/video player plugin of Alfresco Share (assuming this will still work in version 4.0). The OpenOffice.org project is actually forked into the independent LibreOffice. Ubuntu has chosen to provide LibreOffice in their repositories over OpenOffice.
Validate:
whereis convert
whereis ffmpeg
whereis soffice.bin
SWFTools is used to create flash from pdf documents, to allow previews of documents in Share. This tool does not exist in the 32bit repositories of Ubuntu 11.10. A workaround is to download a slightly older (32bit) version of this tool from https://launchpad.net/ubuntu/lucid/i386/swftools/0.9.0-0ubuntu1. The download link is just below “Downloadable files” on the right-bottom of your page. Lets install this deb package:
sudo dpkg -i swftools_0.9.0-0ubuntu1_i386.deb
Validate:
whereis pdf2swf
Tomcat
Download the latest Tomcat 6 from Apache: http://tomcat.apache.org/download-60.cgi (my current version is 6.0.35). Unpack Tomcat (in your home folder):
tar -xvf apache-tomcat-6.0.35.tar.gz
Rename Tomcat to tomcat, and move it to where it should:
mv apache-tomcat-6.0.35 /opt/alfresco40c/tomcat
Lets’s validate if Tomcat is installed right, let’s start Tomcat:
cd /opt/alfresco40c/tomcat/bin
./startup.sh
Using CATALINA_BASE: /opt/alfresco40c/tomcat
Using CATALINA_HOME:/opt/alfresco40c/tomcat
Using CATALINA_TMPDIR:/opt/alfresco40c/tomcat/temp
Using JRE_HOME: /usr
Using CLASSPATH:/opt/alfresco40c/tomcat/bin/bootstrap.jar
And check (if there is a process running that contains ‘java’ in its signature):
ps -ef |grep java
tpeelen 22460 1 8 15:35 pts/0 00:00:01 /usr/bin/java -Djava.util.logging.config.file=/opt/alfresco40c/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/opt/alfresco40c/tomcat/endorsed -classpath /opt/alfresco40c/tomcat/bin/bootstrap.jar -Dcatalina.base=/opt/alfresco40c/tomcat -Dcatalina.home=/opt/alfresco40c/tomcat -Djava.io.tmpdir=/opt/alfresco40c/tomcat/temp org.apache.catalina.startup.Bootstrap start
tpeelen 22482 15472 0 15:35 pts/0 00:00:00 grep --color=auto java
Rock! That works. Now, shutdown Tomcat:
./shutdown.sh
Using CATALINA_BASE: /opt/alfresco40c/tomcat
Using CATALINA_HOME:/opt/alfresco40c/tomcat
Using CATALINA_TMPDIR:/opt/alfresco40c/tomcat/temp
Using JRE_HOME: /usr
Using CLASSPATH:/opt/alfresco40c/tomcat/bin/bootstrap.jar
Validate:
ps -ef |grep java
tpeelen 22516 15472 0 15:38 pts/0 00:00:00 grep --color=auto java
There is no process running that contains ‘java’… Nice. That works.
Add additional folders for use with Alfresco:
mkdir /opt/alfresco40c/tomcat/shared
mkdir /opt/alfresco40c/tomcat/shared/classes
mkdir /opt/alfresco40c/tomcat/shared/lib
Edit Tomcat’s catalina.properties to tell Tomcat to actually use the added directories under ‘tomcat/shared’:
nano /opt/alfresco40c/tomcat/conf/catalina.properties
Change the value of the shared.loader= property to the following:
shared.loader=${catalina.base}/shared/classes,${catalina.base}/shared/lib/*.jar
Save the file by entering Ctrl-X, a ‘Y’ and an <Enter>.
By default, Tomcat uses ISO-8859-1 character encoding when decoding URLs that are received from a browser. This may cause problems when creating, uploading, and renaming files with international characters. Edit the server.xml file
nano /opt/alfresco40c/tomcat/conf/server.xml file.
Locate the Connector section, and then add the URIEncoding=”UTF-8″ property.
<Connector port="80" protocol="HTTP/1.1" URIEncoding="UTF-8"
connectionTimeout="20000" redirectPort="8443" />
Save the server.xml file (Ctrl-X, a ‘Y’ and an <Enter>).
Download the recent JDBC driver belonging to you MySQL instance (Ubuntu is shipped with MySQL 5.1 by default). Go to http://www.mysql.com/downloads/connector/j/ and download the recent version.
Extract the archive (in your home directory)
tar -xvf mysql-connector-java-5.1.18.tar.gz
And copy the driver to Tomcat:
cp mysql-connector-java-5.1.18/mysql-connector-java-5.1.18-bin.jar /opt/alfresco40c/tomcat/lib
Alfresco
We are getting there. Download the Alfresco-community-4.0.c.zip from: https://process.alfresco.com/ccdl/?file=release/community/build-3979/alfresco-community-4.0.c.zip (Any other version will do too, be sure to select, on the download page, the link ‘Custom Installs & Optional Modules’!)
Unzip the archive in your home folder. You probably don’t have ‘unzip’ as one of your tools. Get it now:
sudo apt-get install unzip
unzip alfresco-community-4.0.c.zip
This will get you 3 folders; licenses, bin and webapps. Distribute as follows:
mv bin /opt/alfresco40c/
mv licenses /opt/alfresco40c/
mv web-server/endorsed/* /opt/alfresco40c/tomcat/endorsed
mv web-server/shared/* /opt/alfresco40c/tomcat/shared
mv web-server/lib/* /opt/alfresco40c/tomcat/lib
mv web-server/webapps/* /opt/alfresco40c/tomcat/webapps/
For your convenience, create a folder to store some database scripts:
mkdir /opt/alfresco40c/extras
Create the sql-script to create a database:
nano /opt/alfresco40c/extras/db_setup.sql
This file has the contents:
create database alfresco default character set utf8 collate utf8_bin;
grant all on alfresco.* to 'alfresco'@'localhost' identified by 'alfresco' with grant option;
grant all on alfresco.* to 'alfresco'@'localhost.localdomain' identified by 'alfresco' with grant option;
Create the sql-script to drop the database:
nano /opt/alfresco40c/extras/db_remove.sql
This file has the contents:
drop database alfresco;
revoke all privileges, grant option from 'alfresco'@'localhost';
drop user 'alfresco'@'localhost';
Actually create an empty database + user:
mysql -u root -p </opt/alfresco40c/extras/db_setup.sql
Remind, you need your root password for this!
Create a file to start Alfresco:
nano /opt/alfresco40c/alfresco.sh
Fill it with:
#!/bin/sh
# Start or stop Alfresco server
# Set the following to where Tomcat is installed
ALF_HOME=/opt/alfresco40c
cd "$ALF_HOME"
APPSERVER="${ALF_HOME}/tomcat"
export CATALINA_HOME="$APPSERVER"
# Set any default JVM values
#export JAVA_OPTS='-Xms512m -Xmx1024m -Xss1024k -XX:MaxPermSize=256m -XX:NewSize=256m -server'
export JAVA_OPTS='-Xms512m -Xmx768m -Xss768k -XX:MaxPermSize=256m -XX:NewSize=256m -server'
export JAVA_OPTS="${JAVA_OPTS} -Dalfresco.home=${ALF_HOME} -Dcom.sun.management.jmxremote"
#
if [ "$1" = "start" ]; then
"${APPSERVER}/bin/startup.sh"
# if [ -r ./virtual_start.sh ]; then
# sh ./virtual_start.sh
# fi
# if [ -r ./start_oo.sh ]; then
# sh ./start_oo.sh
# fi
elif [ "$1" = "stop" ]; then
"${APPSERVER}/bin/shutdown.sh"
# if [ -r ./virtual_start.sh ]; then
# sh ./virtual_stop.sh
# fi
# if [ -r ./start_oo.sh ]; then
# killall soffice.bin
# fi
fi
Make sure you can actually execute the script:
sudo chmod ug+x /opt/alfresco40c/alfresco.sh
Provided you have valid alfresco-global.properties, you should be able to start and stop Alfresco by entering:
cd /opt/alfresco40c
./alfresco.sh start
or
./alfresco.sh stop
Check if your action was successful by validating if the process is running (or has stopped. Remind, stopping Alfresco might take a while)
ps -ef |grep java
Goto http://the-ip-address:8080/alfresco or http://the-ip-address:8080/share and see if your install was successful!
Have fun!
This tutorial does not fix you with an Alfresco that starts as your system starts, nor does it gently stop when your system stops. It can, see the Alfresco wiki.
Another thing is that Ubuntu does not allow you to use portnumbers below 1024 as a non-root account. Therefore you need some port-redirections as explained in Alfresco’s wiki.
Adding the Sharepoint integration AMP is something you need to do by hand. If there is enough demand, I might elaborate on that…
Alfresco-global.properties
Your alfresco-global.properties could look like (store in tomcat/shared/classes/alfresco-global.properties:
###############################
## Common Alfresco Properties #
###############################
#
# Sample custom content and index data location
#
dir.root=/opt/alfresco40/alf_data
#
# Sample database connection properties
#
db.name=alfresco
db.username=alfresco
db.password=alfresco
db.host=localhost
db.port=3306
#
# External locations
#-------------
ooo.exe=/usr/bin/soffice
ooo.enabled=true
jodconverter.officeHome=/usr/lib/libreoffice
jodconverter.portNumbers=8101
jodconverter.enabled=true
img.root=/usr
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.url=jdbc:mysql://${db.host}:${db.port}/${db.name}
#db.driver=org.gjt.mm.mysql.Driver
#db.url=jdbc:mysql://localhost/alfresco340?useUnicode=yes&characterEncoding=UTF-8
#
# Oracle connection
#
#db.driver=oracle.jdbc.OracleDriver
#db.url=jdbc:oracle:thin:@localhost:1521:alfresco
#
# SQLServer connection
# Requires jTDS driver version 1.2.5 and SNAPSHOT isolation mode
# Enable TCP protocol on fixed port 1433
# Prepare the database with:
# ALTER DATABASE alfresco SET ALLOW_SNAPSHOT_ISOLATION ON;
#
#db.driver=net.sourceforge.jtds.jdbc.Driver
#db.url=jdbc:jtds:sqlserver://localhost:1433/alfresco
#db.txn.isolation=4096
#
# PostgreSQL connection (requires postgresql-8.2-504.jdbc3.jar or equivalent)
#
#db.driver=org.postgresql.Driver
#db.url=jdbc:postgresql://localhost:5432/alfresco
#
# Index Recovery Mode
#-------------
index.recovery.mode=AUTO
#
# Outbound Email Configuration
#-------------
#mail.host=
#mail.port=25
#mail.username=anonymous
#mail.password=
#mail.encoding=UTF-8
#mail.from.default=alfresco@alfresco.org
#mail.smtp.auth=false
#
# 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
# The password for the default principal (only used for LDAP sync)
#ldap.synchronization.java.naming.security.credentials=secret
#
# 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
cifs.enabled=true
ftp.enabled=true
cifs.serverName=${localname}
cifs.hostannounce=true
imap.server.enabled=false
#imap.server.port=143
#imap.server.host=
# 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
[update 10 feb 2012: (thanks @CristinaMartinR)]
For Postgress as a database and a sample alfresco.properties file, take a look at http://www.xinotes.org/notes/note/1590/
Installing Alfresco (3.x, 4.x) on (32bit) Ubuntu
Published January 4, 2012 Alfresco , Linux , Ubuntu 21 Comments
Tags: Alfresco, install, linux, Ubuntu
Recently I got into a twitter discussion about installing Alfresco Community on 32bit Ubuntu. Alfresco only provides 64bit installers these days (all-in-one), and the Tomcat distribution is no more. Since Alfresco is a Java app, the app doesn’t matter. It is Java and the helper applications needed, that need to be 32/64bit.
This blog will show you step by step how to install Alfresco and the helper apps on 32bit Ubuntu 11.10 (server). It will use OpenJDK (since it is the default in Ubuntu 11.10), LibreOffice (default in Ubuntu repositories) and MySQL (because I am more familiar with than Postgress). On the way we will install ImageMagick, Pdf2swf and FFmpeg.
First be sure we are on the latest version of everything:
sudo apt-get update
sudo apt-get upgrade
If you run Ubuntu on a VM, and your host is Windows, you might want to use Putty (an ssh client for Windows), and then you need an ssh server on your VMWare box:
sudo apt-get install ssh openssh-blacklist openssh-blacklist-extra
Now you can access your VM from a Windows app, more easy if you need to copy a name or content into a file you are editing. I assume you download packages you need from the internet, and in the end this step-by-step guide expects them to exist in your home folder. You can either download these packages from within Ubuntu, or copy them into your home folder using WinSCP . We are going to install Alfresco in /opt/alfresco40c (4 zero c, the version number). Let’s create this folder right now:
sudo mkdir /opt/alfresco40c
And assign yourself permissions to write in that folder: (assuming your username is ‘uname’)
sudo chown -R uname /opt/alfresco40c
Validate your results by
ls -la /opt
You should note that your username shows in the line displaying folder alfresco40c
Java
Lets install OpenJDK first. (SUN-Java, oh, sorry, Oracle is fine too, but requires more fuzzing with adding other repositories to Ubuntu.) (I happened to install this particular version because the person in question used this version of OpenJDK)
sudo apt-get install openjdk-6-jdk
There most likely is an issue with OpenJDK and Rhino. There are some workarounds too. If you can run the statement below in a terminal window, you’re fine:
java org.mozilla.javascript.tools.shell.JSConsole
Assuming you don’t need Rhino for anything other than Alfresco, you’re save to remove the rhino.jar library all together. See the Alfresco wiki for details and workarounds. I just renamed the rhino.jar provided by OpenJDK:
sudo mv /usr/lib/jvm/java-6-openjdk/jre/lib/rhino.jar /usr/lib/jvm/java-6-openjdk/jre/lib/rhino.jar.not
Let’s check if we got Java installed right:
java -version
responds with something like:
java version "1.6.0_23"
OpenJDK Runtime Environment (IcedTea6 1.11pre) (6b23~pre11-0ubuntu1.11.10)
OpenJDK Client VM (build 20.0-b11, mixed mode)
MySQL
Then we need MySQL
sudo apt-get install mysql-server mysql-client
Remind: Remember the root password you set when you install the server. You will need it later on!
Validate:
mysql -u root -p
It will display:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 45
Server version: 5.1.58-1ubuntu1 (Ubuntu)
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
You type:
show databases;
MySQL responds with:
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
+--------------------+
2 rows in set (0.05 sec)
Done!
ImageMagick, SWFTools, FFMpeg and OpenOffice
Since you install without the all-in-one installer, you also need ImageMagic, FFMpeg and OpenOffice:
sudo apt-get install imagemagick ffmpeg libreoffice
ImageMagick is used to convert and scale images. FFMpeg is needed if you store video in your repository and want to use the audio/video player plugin of Alfresco Share (assuming this will still work in version 4.0). The OpenOffice.org project is actually forked into the independent LibreOffice. Ubuntu has chosen to provide LibreOffice in their repositories over OpenOffice.
Validate:
whereis convert
whereis ffmpeg
whereis soffice.bin
SWFTools is used to create flash from pdf documents, to allow previews of documents in Share. This tool does not exist in the 32bit repositories of Ubuntu 11.10. A workaround is to download a slightly older (32bit) version of this tool from https://launchpad.net/ubuntu/lucid/i386/swftools/0.9.0-0ubuntu1. The download link is just below “Downloadable files” on the right-bottom of your page. Lets install this deb package:
sudo dpkg -i swftools_0.9.0-0ubuntu1_i386.deb
Validate:
whereis pdf2swf
Tomcat
Download the latest Tomcat 6 from Apache: http://tomcat.apache.org/download-60.cgi (my current version is 6.0.35). Unpack Tomcat (in your home folder):
tar -xvf apache-tomcat-6.0.35.tar.gz
Rename Tomcat to tomcat, and move it to where it should:
mv apache-tomcat-6.0.35 /opt/alfresco40c/tomcat
Lets’s validate if Tomcat is installed right, let’s start Tomcat:
cd /opt/alfresco40c/tomcat/bin
./startup.sh
Using CATALINA_BASE: /opt/alfresco40c/tomcat
Using CATALINA_HOME:/opt/alfresco40c/tomcat
Using CATALINA_TMPDIR:/opt/alfresco40c/tomcat/temp
Using JRE_HOME: /usr
Using CLASSPATH:/opt/alfresco40c/tomcat/bin/bootstrap.jar
And check (if there is a process running that contains ‘java’ in its signature):
ps -ef |grep java
tpeelen 22460 1 8 15:35 pts/0 00:00:01 /usr/bin/java -Djava.util.logging.config.file=/opt/alfresco40c/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/opt/alfresco40c/tomcat/endorsed -classpath /opt/alfresco40c/tomcat/bin/bootstrap.jar -Dcatalina.base=/opt/alfresco40c/tomcat -Dcatalina.home=/opt/alfresco40c/tomcat -Djava.io.tmpdir=/opt/alfresco40c/tomcat/temp org.apache.catalina.startup.Bootstrap start
tpeelen 22482 15472 0 15:35 pts/0 00:00:00 grep --color=auto java
Rock! That works. Now, shutdown Tomcat:
./shutdown.sh
Using CATALINA_BASE: /opt/alfresco40c/tomcat
Using CATALINA_HOME:/opt/alfresco40c/tomcat
Using CATALINA_TMPDIR:/opt/alfresco40c/tomcat/temp
Using JRE_HOME: /usr
Using CLASSPATH:/opt/alfresco40c/tomcat/bin/bootstrap.jar
Validate:
ps -ef |grep java
tpeelen 22516 15472 0 15:38 pts/0 00:00:00 grep --color=auto java
There is no process running that contains ‘java’… Nice. That works.
Add additional folders for use with Alfresco:
mkdir /opt/alfresco40c/tomcat/shared
mkdir /opt/alfresco40c/tomcat/shared/classes
mkdir /opt/alfresco40c/tomcat/shared/lib
Edit Tomcat’s catalina.properties to tell Tomcat to actually use the added directories under ‘tomcat/shared’:
nano /opt/alfresco40c/tomcat/conf/catalina.properties
Change the value of the shared.loader= property to the following:
shared.loader=${catalina.base}/shared/classes,${catalina.base}/shared/lib/*.jar
Save the file by entering Ctrl-X, a ‘Y’ and an <Enter>.
By default, Tomcat uses ISO-8859-1 character encoding when decoding URLs that are received from a browser. This may cause problems when creating, uploading, and renaming files with international characters. Edit the server.xml file
nano /opt/alfresco40c/tomcat/conf/server.xml file.
Locate the Connector section, and then add the URIEncoding=”UTF-8″ property.
<Connector port="80" protocol="HTTP/1.1" URIEncoding="UTF-8"
connectionTimeout="20000" redirectPort="8443" />
Save the server.xml file (Ctrl-X, a ‘Y’ and an <Enter>).
Download the recent JDBC driver belonging to you MySQL instance (Ubuntu is shipped with MySQL 5.1 by default). Go to http://www.mysql.com/downloads/connector/j/ and download the recent version.
Extract the archive (in your home directory)
tar -xvf mysql-connector-java-5.1.18.tar.gz
And copy the driver to Tomcat:
cp mysql-connector-java-5.1.18/mysql-connector-java-5.1.18-bin.jar /opt/alfresco40c/tomcat/lib
Alfresco
We are getting there. Download the Alfresco-community-4.0.c.zip from: https://process.alfresco.com/ccdl/?file=release/community/build-3979/alfresco-community-4.0.c.zip (Any other version will do too, be sure to select, on the download page, the link ‘Custom Installs & Optional Modules’!)
Unzip the archive in your home folder. You probably don’t have ‘unzip’ as one of your tools. Get it now:
sudo apt-get install unzip
unzip alfresco-community-4.0.c.zip
This will get you 3 folders; licenses, bin and webapps. Distribute as follows:
mv bin /opt/alfresco40c/
mv licenses /opt/alfresco40c/
mv web-server/endorsed/* /opt/alfresco40c/tomcat/endorsed
mv web-server/shared/* /opt/alfresco40c/tomcat/shared
mv web-server/lib/* /opt/alfresco40c/tomcat/lib
mv web-server/webapps/* /opt/alfresco40c/tomcat/webapps/
For your convenience, create a folder to store some database scripts:
mkdir /opt/alfresco40c/extras
Create the sql-script to create a database:
nano /opt/alfresco40c/extras/db_setup.sql
This file has the contents:
create database alfresco default character set utf8 collate utf8_bin;
grant all on alfresco.* to 'alfresco'@'localhost' identified by 'alfresco' with grant option;
grant all on alfresco.* to 'alfresco'@'localhost.localdomain' identified by 'alfresco' with grant option;
Create the sql-script to drop the database:
nano /opt/alfresco40c/extras/db_remove.sql
This file has the contents:
drop database alfresco;
revoke all privileges, grant option from 'alfresco'@'localhost';
drop user 'alfresco'@'localhost';
Actually create an empty database + user:
mysql -u root -p </opt/alfresco40c/extras/db_setup.sql
Remind, you need your root password for this!
Create a file to start Alfresco:
nano /opt/alfresco40c/alfresco.sh
Fill it with:
#!/bin/sh
# Start or stop Alfresco server
# Set the following to where Tomcat is installed
ALF_HOME=/opt/alfresco40c
cd "$ALF_HOME"
APPSERVER="${ALF_HOME}/tomcat"
export CATALINA_HOME="$APPSERVER"
# Set any default JVM values
#export JAVA_OPTS='-Xms512m -Xmx1024m -Xss1024k -XX:MaxPermSize=256m -XX:NewSize=256m -server'
export JAVA_OPTS='-Xms512m -Xmx768m -Xss768k -XX:MaxPermSize=256m -XX:NewSize=256m -server'
export JAVA_OPTS="${JAVA_OPTS} -Dalfresco.home=${ALF_HOME} -Dcom.sun.management.jmxremote"
#
if [ "$1" = "start" ]; then
"${APPSERVER}/bin/startup.sh"
# if [ -r ./virtual_start.sh ]; then
# sh ./virtual_start.sh
# fi
# if [ -r ./start_oo.sh ]; then
# sh ./start_oo.sh
# fi
elif [ "$1" = "stop" ]; then
"${APPSERVER}/bin/shutdown.sh"
# if [ -r ./virtual_start.sh ]; then
# sh ./virtual_stop.sh
# fi
# if [ -r ./start_oo.sh ]; then
# killall soffice.bin
# fi
fi
Make sure you can actually execute the script:
sudo chmod ug+x /opt/alfresco40c/alfresco.sh
Provided you have valid alfresco-global.properties, you should be able to start and stop Alfresco by entering:
cd /opt/alfresco40c
./alfresco.sh start
or
./alfresco.sh stop
Check if your action was successful by validating if the process is running (or has stopped. Remind, stopping Alfresco might take a while)
ps -ef |grep java
Goto http://the-ip-address:8080/alfresco or http://the-ip-address:8080/share and see if your install was successful!
Have fun!
This tutorial does not fix you with an Alfresco that starts as your system starts, nor does it gently stop when your system stops. It can, see the Alfresco wiki.
Another thing is that Ubuntu does not allow you to use portnumbers below 1024 as a non-root account. Therefore you need some port-redirections as explained in Alfresco’s wiki.
Adding the Sharepoint integration AMP is something you need to do by hand. If there is enough demand, I might elaborate on that…
Alfresco-global.properties
Your alfresco-global.properties could look like (store in tomcat/shared/classes/alfresco-global.properties:
###############################
## Common Alfresco Properties #
###############################
#
# Sample custom content and index data location
#
dir.root=/opt/alfresco40/alf_data
#
# Sample database connection properties
#
db.name=alfresco
db.username=alfresco
db.password=alfresco
db.host=localhost
db.port=3306
#
# External locations
#-------------
ooo.exe=/usr/bin/soffice
ooo.enabled=true
jodconverter.officeHome=/usr/lib/libreoffice
jodconverter.portNumbers=8101
jodconverter.enabled=true
img.root=/usr
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.url=jdbc:mysql://${db.host}:${db.port}/${db.name}
#db.driver=org.gjt.mm.mysql.Driver
#db.url=jdbc:mysql://localhost/alfresco340?useUnicode=yes&characterEncoding=UTF-8
#
# Oracle connection
#
#db.driver=oracle.jdbc.OracleDriver
#db.url=jdbc:oracle:thin:@localhost:1521:alfresco
#
# SQLServer connection
# Requires jTDS driver version 1.2.5 and SNAPSHOT isolation mode
# Enable TCP protocol on fixed port 1433
# Prepare the database with:
# ALTER DATABASE alfresco SET ALLOW_SNAPSHOT_ISOLATION ON;
#
#db.driver=net.sourceforge.jtds.jdbc.Driver
#db.url=jdbc:jtds:sqlserver://localhost:1433/alfresco
#db.txn.isolation=4096
#
# PostgreSQL connection (requires postgresql-8.2-504.jdbc3.jar or equivalent)
#
#db.driver=org.postgresql.Driver
#db.url=jdbc:postgresql://localhost:5432/alfresco
#
# Index Recovery Mode
#-------------
index.recovery.mode=AUTO
#
# Outbound Email Configuration
#-------------
#mail.host=
#mail.port=25
#mail.username=anonymous
#mail.password=
#mail.encoding=UTF-8
#mail.from.default=alfresco@alfresco.org
#mail.smtp.auth=false
#
# 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
# The password for the default principal (only used for LDAP sync)
#ldap.synchronization.java.naming.security.credentials=secret
#
# 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
cifs.enabled=true
ftp.enabled=true
cifs.serverName=${localname}
cifs.hostannounce=true
imap.server.enabled=false
#imap.server.port=143
#imap.server.host=
# 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
[update 10 feb 2012: (thanks @CristinaMartinR)]
For Postgress as a database and a sample alfresco.properties file, take a look at http://www.xinotes.org/notes/note/1590/
发表评论
-
Alfresco CAS
2012-07-12 15:58 1150http://www.ixxus.com/blog/201 ... -
Alfresco wcmqs 作为 ROOT
2012-06-16 10:55 719用ALfresco建站 WCMQS as Root Site ... -
Alfresco JVM Tuning
2012-06-16 05:13 864http://wiki.alfresco.com/wiki/J ... -
Alfresco WCM Deployerment 新版如何用?
2012-06-06 07:36 674http://wiki.alfresco.com/wiki/W ... -
Alfresco Custom UI - DoCASU
2012-06-03 08:24 690DoCASU is a custom User Interfa ... -
你在用Alfresco的Web Quick Start建站吗?
2012-05-31 10:34 932http://www.contentreich.de/alfr ... -
Liferay Alfresco 老方法和新途径
2012-05-16 21:58 743老方法 http://www.alfresco.com/pro ... -
Alfresco CE 如何用 MS SQL DB
2012-05-15 23:05 737总体思想比较龌蹉: 1. 安装EE版,安装后提取MSSQL关D ... -
Alfresco的几个扩展fme-alfresco-extensions alfresco-business-reporting
2012-05-09 13:13 762http://code.google.com/p/fme-al ... -
Alfresco实现供外部可直接下载的文档地址
2012-05-01 15:17 687Direct Publicly Accessible Docu ... -
Alfresco Ubuntu 配置 MS AD
2011-12-26 20:55 2000Alfresco Ubuntu 配置 MS AD 1. ja ...
相关推荐
安装步骤 1. 双击 Alfresco 安装程序(alfresco-community-4.2.e-installer-win-x64.exe),选择简体中文语言。 2. 进入欢迎页面,点击【前进】按钮。 3. 选择安装类型,需要高级安装,然后再点击前进。 4. 选择...
在 Linux 系统中安装 Alfresco Community 需要遵循一定的步骤,以下是详细的安装步骤和知识点: 1. 下载 Alfresco 社区版本:首先需要下载 Alfresco 社区版本的安装包,可以从官方网站 ...
10. **实施与维护**:《Alfresco 3 Business Solutions》这本书将详细介绍如何规划、实施和维护Alfresco系统,提供实战案例和最佳实践,帮助企业成功地部署和运行Alfresco ECM平台。 总之,《Alfresco 3 Business ...
在安装Alfresco内容管理系统后,启动过程中遇到异常情况是很常见的。这些异常可能涉及到各种问题,包括数据库连接、配置错误、环境兼容性等。本文将深入解析Alfresco启动异常处理的一些关键点。 首先,一个常见的...
《Alfresco.3.Business.Solutions》是一本深入探讨Alfresco企业级解决方案的专业书籍,其测试代码提供了实践环节,帮助读者理解并掌握Alfresco的相关功能和应用场景。Alfresco是一个开源的企业内容管理(ECM)平台,...
安装步骤如下: 1. 解压缩Alfresco-Community-4.0.e.zip。 2. 将bin目录下的所有内容复制到Tomcat的bin目录中。 3. 将shared目录及其内部文件复制到Tomcat根目录下,与bin、webapps等目录平级。 4. 将webapps目录下...
三、Alfresco MMT与Alfresco的关系 Alfresco是一个开源的企业级内容管理系统,提供文档管理、协作、记录管理和企业搜索等功能。MMT作为其开发工具之一,极大地简化了对Alfresco的扩展和维护。通过MMT,开发者可以更...
Wrox.Professional.Alfresco.May.2010.rar
在Alfresco 5.0版本中,我们可以通过以下步骤实现自定义元数据(metadata): 1. **理解Alfresco的元数据结构**: Alfresco的元数据主要分为系统元数据和用户定义元数据。系统元数据由Alfresco预定义,包括创建...
根据给定的文件信息,我们可以深入探讨Alfresco 3 Web Services的相关知识点,这包括了构建Alfresco应用程序时如何利用Web Services、Web Scripts以及CMIS(Content Management Interoperability Services)。...
4. **lxcommunity-ecm**:这可能是Alfresco在Ubuntu的社区软件仓库中的名称,意味着你可以通过Ubuntu的包管理器如`apt`来安装Alfresco的社区版本。 5. **loftux**:Loftux是一家专注于Alfresco咨询和支持的公司,...
本文档将详细介绍如何安装Alfresco 5.1版本,并提供相关的图文说明,帮助用户顺利完成安装过程。 #### 二、下载准备工作 1. **访问Alfresco官方网站**: - 访问地址:...
《Alfresco社区版在Windows 2008上与Oracle 11g数据库的详细部署指南》 Alfresco是一款强大的开源企业内容管理系统,它提供了文档管理、协作工具以及工作流程等功能。然而,Alfresco社区版并不支持Oracle数据库的...
以下就是如何使Alfresco能够检索中文的详细步骤: 1. **添加中文解析类**: 在`repository`应用的`org.alfresco.repo.search.impl.lucene.analysis`包中,你需要添加针对中文处理的类。这些类包括`ChineseAnalyzer...
本书详细介绍了Alfresco CMS的安装流程,包括系统要求、数据库设置、Web服务器配置等关键步骤。通过这些指导,读者可以了解如何在不同的操作系统和环境下成功部署Alfresco CMS,并进行必要的定制和优化,以满足特定...
Alfresco的Version设定文件
ReallyUsefulEbooks.com_1904811116_Packt.Publishing.Alfresco.Enterprise.Content.Management.Implementation.Dec.2006<br>唯一介绍alfresco企业内容管理系统的书,alfresco是目前最牛的开源企业内容管理系统。
《Alfresco工作流指南》深入解读:创建与定制工作流 在当今数字化转型的时代,企业对于高效、灵活的工作流程管理需求日益增长。Alfresco,作为一款领先的内容管理系统(CMS),不仅提供强大的文档管理和协作功能,...
Alfresco支持工具该插件被设计为仅在使用JDK7和Tomcat7的Alfresco Enterprise 4.2.x或更高版本中工作。 这为Alfresco管理员提供了一组工具,可帮助解决性能问题(也在Alfresco Enterprise 5.0.x版本上进行过测试,未...