Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

Friday, September 14, 2007

Installing Alfresco 2.1.0 WCM + Ubuntu Linux + Oracle 10 Express Edition

Once have successfully installed and configured Oracle (to know how to install Oracle 10 Express look here) you can install a fresh copy of Alfresco version 2.1.0 (AlfrescoEnterprisePlusWCM-2.1.0-Linux-x86-Install.zip), the zip file provide two different installer:

AlfrescoEnterprise-2.1.0-Linux-x86-Install.bin

AlfrescoWCMEnterprise-2.1.0-Linux-x86-Install.bin

I started with AlfrescoEnterprise-2.1.0-Linux-x86-Install.bin.

The installation process it is quite easy to complete, accept the license agreement, choose the destination folder and resolve a question: do you want use the jdk and openoffice already locally installed or do you want download these necessaries components? we don't need anything. We can install both JDK and OpenOffice via apt-get and anyway, we'll see later, the only thing we need is to know where JDK and OpenOffice are. The path to setup properly the startup scripts.

After the install wizard choose to start the configuration wizard and you will be asked for:
  • Database Type - choose Oracle;
  • Content Store Location - the directory where Alfresco will store files and other stuff, leave the default if you don't have particular needs;
  • Index Location - another directory for the indexes, leave the default if you don't have particular needs;
  • OpenOffice Installation Directory - /usr/lib/openoffice (if you have openoffice installed through apt-get) anyway this parameters will never be used because the configuration wizard have some bugs.

Now I had to setup the database connection to Oracle. I didn't find any documentation in the setup to configure an Oracle connection but adjust the instruction write for MySql (README_mysql.txt), I hope, it will be quite easy, you have to create an account called alfresco using the Oracle 10 apex console (http://localhost:8090/apex/)

To setup the Oracle connection, you need to look 2 files from the $ALFRESCO_HOME/tomcat/shared/classes/alfresco/extension directory. Those files are custom-repository.properties and custom-hibernate-dialect.properties:
  1. custom-repository.properties
    • uncomment the account info and adjust as appropriate:
      #
      # Sample database connection properties
      #
      db.username=alfresco
      db.password=alfresco
      db.pool.initial=10
      db.pool.max=100

    • uncomment the Oracle connection lines and adjust as appropriate (pay particular attention to the SID, in our case is XE)
      #
      # Oracle connection (requires ojdbc14_g.jar or equivalent jar in shared libraries location)
      #
      db.driver=oracle.jdbc.OracleDriver
      db.url=jdbc:oracle:thin:@localhost:1521:XE

    • comment out any other connection lines using #

  2. custom-hibernate-dialect.properties -
    • comment out any other dialect line using #
      #
      # Oracle dialect
      #
      hibernate.dialect=org.hibernate.dialect.Oracle9Dialect

copy the ojdbc14_g.jar in the tomcat common lib:

cp $ORACLE_HOME/jdbc/lib/ojdbc14_g.jar alfresco/tomcat/common/lib/

If you have an oracle client you could check the oracle connection with the following command:

$ sqlplus alfresco/alfresco@XE

SQL*Plus: Release 10.2.0.1.0 - Production on Mon Sep 17 22:47:32 2007

Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
SQL> quit

Disconnected from Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production

Looking at the startup script I see the Alfresco 2.1.0 configuration wizard have a bug, the @@ALFRESCO_DIR@@ should be replaced in the admin scripts with the correct path. Anyway this did not happened, so I had to patch all the scripts present in the installation directory (Be sure to be in the correct directory before submit this!):

$ perl -i -p -e 's/\@\@ALFRESCO_DIR\@\@/\/home\/freedev\/apps\/servers\/alfresco-2.1.0/g' *.sh

So I hoped to have resolved all installation problems, but JDK and OpenOffice although were downloaded successfully, during the package decompression many binary files necessaries to the execution did not have the execution permission, so the installation... well, I think you understand. Fortunately install a new package (i.e. JDK) under Ubuntu it is really easy:

sudo apt-get install sun-java6-jdk

and remove everything related the gcj:

sudo apt-get remove gcj-4.1-base

Finally to fix the startup scripts we need to create two link one to configure the JAVA_HOME in the startup scripts and another to allow the script to find OpenOffice:

ln -s /usr/lib/jvm/java-6-sun-1.6.0.00/ alfresco/java

ln -s /usr/lib/openoffice/ openoffice.org2.1

now we can finally try to start Alfresco.

$ ./alfresco.sh start

Thursday, July 19, 2007

Zimbra 4.5.6 + Ubuntu 7.04

How to Install Zimbra (4.5.6) on Ubuntu Feisty


Zimbra Collaboration Suite (ZCS) is a groupware product created by Zimbra Inc, located in California, USA. It consists of both client and server components. There are two versions of Zimbra available: an open-source version, which is supported by the community, and a commercially supported version with closed-source components. In this article, I'll try to explain how to install the free (open-source) version of ZCS on an Ubuntu system Festy although Ubuntu Feisty is not supported at this time.

So what's ZCS more exactly? ZCS is a full-featured collaboration suite, which supports email and group calendars using an Ajax web interface that enables tool tips, draggable items and right click menus in the user interface. There are also some advanced searching capabilities included, as well as date relations, online document authoring and a full administration interface. The ZCS server works well with many open source projects such as Postfix, MySQL, OpenLDAP and it also acts as an IMAP and POP3 server.

That's why if you want install Zimbra you have to stop Postfix, MySQL, OpenLDAP, Apache 2, Tomcat and any other server application that could conflict with it.
You could also have some problem if there is a firewall installed, better disable it too. So first stop:

SHELL

sudo /etc/init.d/postifix stop
sudo /etc/init.d/mysql stop
sudo /etc/init.d/apache2 stop
sudo /etc/init.d/openldap stop

These and the other related services (like Tomcat or Spamassassin).

SHELL

sudo update-rc.d -f mysql remove
sudo update-rc.d -f apache2 remove
sudo update-rc.d -f postfix remove
sudo update-rc.d -f openldap remove

Following the Zimbra Installation Manual finally i could install the Collaboration Suite:

SHELL

tar xzvf zcs-4.5.6_GA_1044.UBUNTU6.tgz
cd zcd
sudo apt-get install curl fetchmail libpcre3 libgmp3c2 libexpat1 libxml2 libtie-ixhash-perl
sudo ./install.sh

You could experience some problem with dependencies:

OUTPUT

Checking for prerequisites...

NPTL...FOUND

sudo...MISSING
libidn...MISSING

curl...MISSING

fetchmail...MISSING

gmp...MISSING
/usr/lib/libstdc++.so.5...FOUND

###ERROR###
One or more prerequisite packages are missing.
Please install them before running this installer.
Installation cancelled.

You can go crazy searching the dependencies, but you hava the problem is not specific to dependencies.
The dependencies check can not be execute correctly, because the Zimbra Get Platform Tag script in the installation procedure.
The trick is modify the /etc/lsb-release:

SHELL

$ sudo vi /etc/lsb-release


inside you'll find something like this:

/etc/lsb-release

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=7.04

DISTRIB_CODENAME=feisty
DISTRIB_DESCRIPTION="Ubuntu 7.04"

and correct this:

DISTRIB_RELEASE=7.04


in this:

DISTRIB_RELEASE=6.04


now you can continue with the installation and the prerequisites check will return success:

OUTPUT
Checking for prerequisites...
NPTL...FOUND
sudo...FOUND sudo-1.6.8p12-4ubuntu5
libidn11...FOUND libidn11-0.6.5-1build1
curl...FOUND curl-7.15.5-1ubuntu2.1
fetchmail...FOUND fetchmail-6.3.6-1ubuntu2
libpcre3...FOUND libpcre3-6.7-1ubuntu2
libgmp3c2...FOUND libgmp3c2-2:4.2.1+dfsg-4build1
libexpat1...FOUND libexpat1-1.95.8-3.4build1
libxml2...FOUND libxml2-2.6.27.dfsg-1ubuntu3
libstdc++6...FOUND libstdc++6-4.1.2-0ubuntu4
libstdc++5...FOUND libstdc++5-1:3.3.6-15ubuntu1
openssl...FOUND openssl-0.9.8c-4build1


Anyway the installation problems I found wasn't terminated.
Starting the installation process, the manual show how to modify the hosts file.
ZCS Single Server Quick Start, Network Edition 4.5: "Make sure that FQDN entry in /etc/hosts appear before the hostnames. If this is missing, the creation of the Zimbra certificate fails. The FQDN entry should look like this example."

/etc/hosts
127.0.0.1 localhost.localdomain localhost
your.ip.address FQDN yourhostname


This is an important moment of installation. If you specify there the public ip address of your FQDN but the mail server don't bind directly this ip address, because it is behind a firewall, you could have a big problem after, when the openldap server starts and try to bind the 389 port on that address. In other words, the installation won't continue, because openldap can't start. And there isn't any damn error message that help you to understand that!
So I specified in the hosts file the Ip address of network interface on internet.
But another choice is to change the ip address used by openldap, and you have to do that using the zimbra user:

SHELL

zmlocalconfig -e ldap_url=ldap://0.0.0.0:389



Looking at installation log I found this error:

/opt/zimbra/bin/zmfixperms.sh: No such file or directory


This works:

sudo /opt/zimbra/libexec/zmfixperms

When everything seems up and running, finally you could try to connect at the administration panel. Well, I don't understood why, but the admin password won't work.
To specify a new password you have to submit this command as zimbra user:

SHELL

zmprov sp admin@domain.name password


I hope this can help to enjoy this wonderful suite.