cancel
Showing results for 
Search instead for 
Did you mean: 

Problem installing on Ubuntu 7.10

a_weed096
Champ in-the-making
Champ in-the-making
I am having some trouble installing 2.1.0 on my Ubuntu 7.10 system. I would like to start off by saying that I am new to both Alfresco and Linux. I am in Highschool and I am trying to get this to run for a school project.

I found the guide on wiki.alfresco.com for installing Alfresco the "linux way", and I did my best to follow it. I got all the applications downloaded and installed, added the java line, created the alfresco user and group, i ran tar -xzf alfresco-community-tomcat-2.1.0.tar.gz in the opt folder, ran the commands in the mysql command line, created the directories and changed the owners, and I created and changed the files in the extension folder. I followed everything to the letter up until this point. After this, I had trouble with the directions however.

I could not find where in files-servers-custom.xml to configure what I was told to configure. I was able to remove the /opt/alfresco/tomcat/logs and linked the other two files. After this however I was unable to find the file to configure the Alfresco logging. I then wrote and got the init file in place. When I tried to run the init file, the terminal gave me a lot of negative feedback and I was not able to browse to http://localhost:8080/alfresco.

I am not sure whether or not the steps I missed would effect the program dramatically enough to keep it from running. Any insight on how to get the program running would be appreciated.

I would like to add that I found a different guide on wiki.alfresco that told me an easier way to install. I had to use Alfresco 1.3 to get this method to work. I did get 1.3 to boot the first time, but after that the program would no longer run. I don't know if that helps or not, but I thought I would throw it out there.
18 REPLIES 18

benswitzer
Champ in-the-making
Champ in-the-making
Hi

Well, we'd hope we can get you up and running without having to take a trip to the local bookshop!

It's not clear to me exactly what's going wrong with the startup script, other than the iptables redirection commands being very unhappy! I suspect it might be a copy/paste problem from either our wiki or a document perhaps, as some of those apostrophes look suspect in the output.

Could you post what you've done so far please (i.e. if there's anything you've manually edited). Perhaps posting the alfresco script would also help, as would the contents of the Alfresco.log file, if one is created.

Thanks,
Mike

Could it be the encoding of the script file?  If the file was create on Windows and then transfered to the server, Ubuntu will scream loudly if you don't change the carriage-returns.

Best,
Ben

a_weed096
Champ in-the-making
Champ in-the-making
So far I have basically just been following the guide on Wiki.alfresco.com on the Installing on Linux page. I clicked the link called Installing Alfresco on Ubuntu 7.10 because that is what I am using.

I ran the following commands (although some were redundant because I installed the LAMP server when installing Ubuntu):

sudo apt-get install mysql-server
sudo apt-get install xvfb
sudo apt-get install openoffice.org
sudo apt-get install iptables
sudo apt-get install sun-java6-jre
sudo apt-get install imagemagick
sudo apt-get install portmap
sudo apt-get install nfs-common

From there I edded the following line into the /etc/profile:
export JAVA_HOME="/usr/lib/jvm/java-6-sun-1.6.0.00"

Then I was told to create the alfresco user and group with:
sudo useradd -m alfresco

It then told me to install Alfresco by using
cd /opt
tar -xzf alfresco-community-tomcat-2.1.0.tar.gz

It looked like it just unpacked it, so I don't get why it told me it was installing something in the guide, but I figured that it was a new program on a new OS and I would roll with it.

Next I created the database in MySQL:
create database alfresco;
grant all privileges on alfresco.* to alfresco@localhost identified by 'alfresco';

I then had to make directories for variable data and change the owner to the alfresco user:
mkdir -p /var/lib/alfresco/alf_data
mkdir /var/lib/alfresco/tmp
chown -R alfresco:alfresco /var/lib/alfresco
mkdir -p /var/log/alfresco/tomcat/logs
chown -R alfresco:alfresco /var/log/alfresco

I then created the custom-repository-context.xml and put it in the extension directory:
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
   <bean id="repository-properties" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
       <property name="ignoreUnresolvablePlaceholders">
           <value>true</value>
       </property>
       <property name="locations">
           <list>
               <value>classpath:alfresco/repository.properties</value>
               <value>classpath:alfresco/version.properties</value>
               <value>classpath:alfresco/domain/transaction.properties</value>

               <value>classpath:alfresco/extension/custom-repository.properties</value>
           </list>
       </property>
   </bean>
   <bean id="hibernateConfigProperties" class="org.springframework.beans.factory.config.PropertiesFactoryBean">
       <property name="locations">
           <list>
               <value>classpath:alfresco/domain/hibernate-cfg.properties</value>

               <value>classpath:alfresco/extension/custom-hibernate-dialect.properties</value>
           </list>
       </property>
   </bean>
</beans>

I then was told to change the the repository configuration in extension/custom-repository.properties:
dir.root=/var/lib/alfresco/alf_data
db.username=alfresco
db.password=alfresco
db.pool.initial=10
db.pool.max=100
db.driver=org.gjt.mm.mysql.Driver
db.url=jdbc:mysql://localhost/alfresco

Then I was told to change the hibernate configuration in custom-hibernate-dialect.properties:
hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect

I then came to a step where I was not sure how to actually execute it, so I skipped it. The step was:
To configure the CIFS server to use non-privileged ports use the following in the file-servers.xml or file-servers-custom.xml configuration files :-

     <tcpipSMB port="1445" platforms="linux,solaris,macosx"/>
     <netBIOSSMB sessionPort="1139" namePort="1137" datagramPort="1138" platforms="linux,solaris,macosx"/>

I then had to configure the logging with:
rm -r /opt/alfresco/tomcat/logs
ln -s /var/log/alfresco/tomcat/logs /opt/alfresco/tomcat/logs

This was another step I was not sure how to accomplish:
Configure Alfresco logging: In tomcat/webapps/alfresco/WEB-INF/classes/log4j.properties:

log4j.appender.File.File=/var/log/alfresco/alfresco.log

It then told me to write the following Init script and store it in /etc/init.d/alfresco

#
# Alfresco init script for Ubuntu
# 2 nov 2007 Joost Horward
#

export ALFRESCO_HOME=/opt/alfresco
export CATALINA_BASE=/opt/alfresco/tomcat
export CATALINA_HOME=/opt/alfresco/tomcat
export PIDFILE=/var/run/alfresco
export LOGFILE=/var/log/alfresco/alfresco.log

# Set any default JVM values
export JAVA_OPTS='-Xms128m -Xmx512m -server -Djava.io.tmpdir=/var/lib/alfresco/tmp'


cd "$ALFRESCO_HOME"

#
# redirect FROM TO PROTOCOL
# setup port redirect using iptables
redirect() {
   echo "Redirecting port $1 to $2 ($3)"
   iptables -t nat -A OUTPUT -d localhost -p $3 –dport $1 -j REDIRECT –to-ports $2
   iptables -t nat -A PREROUTING -d $HOSTNAME -p $3 –dport $1 -j REDIRECT –to-ports $2
   iptables -t nat -A OUTPUT -d $HOSTNAME -p $3 –dport $1 -j REDIRECT –to-ports $2
}

#
# setup_iptables
# setup iptables for redirection of CIFS and FTP
setup_iptables () {

   echo "1" >/proc/sys/net/ipv4/ip_forward
   # Clear NATing tables
   iptables -t nat -F
   # FTP NATing
   redirect 21 2021 tcp

   # CIFS NATing
   redirect 445 1445 tcp
   redirect 139 1139 tcp
   redirect 137 1137 udp
   redirect 138 1138 udp
}

#
# start_openoffice
#
start_openoffice(){
   sudo -H -u alfresco xvfb-run /usr/lib/openoffice/program/soffice "-accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager" -nologo -headless -nofirststartwizard &
}

case $1 in
start)
   if [ -f $PIDFILE ] ; then
      echo "Alfresco is already running!"
      exit 1
   fi
   touch $PIDFILE
   echo "Starting OpenOffice service …"
   start_openoffice

   echo "Setting up iptables …"
   setup_iptables   

   echo "Starting Alfresco …"
   echo  -e "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nStarting Alfresco …" >>$LOGFILE


   sudo -H -u alfresco sh $CATALINA_HOME/bin/startup.sh
        ;;
stop) 
   sudo -H -u alfresco sh $CATALINA_HOME/bin/shutdown.sh
   killall -w -u alfresco
   rm $PIDFILE
        ;;
restart)
   rm $PIDFILE
   sudo -H -u alfresco sh $CATALINA_HOME/bin/shutdown.sh
   killall -w -u alfresco
   echo  -e "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nStarting Alfresco …" >>$LOGFILE
   sudo -H -u alfresco sh $CATALINA_HOME/bin/startup.sh
   touch $PIDFILE
        ;;
zap)
   echo "Zapping $PIDFILE …"
   rm $PIDFILE
   ;;
*)
   echo "Usage: alfresco [start|stop|restart|zap] [tail]"
   exit 1
   ;;

esac  

case $2 in
tail)
   tail -f $LOGFILE
   ;;
esac


exit 0

I then tried to start the program with:
/etc/init.d/alfresco start

The only thing I get anymore is an Http 404 status error. http://localhost:8080 works fine though.

Ummm.. that is what I have done so far. My Alfresco Script was posted earlier. The last thing I guess is my alfresco.log

When I went to look at the alfresco.log at it said was
Starting Alfresco …
-e

maybe eight times with multiple returns inbetween.

I have to say that this whole experience has me pretty confused. I am use to WIndows where I have an .exe to install. What I find to be the wierdest part of the installing guide is that no where during it does it fell like I actualy installed the Alfresco program. I unpacked it into the /opt folder but I never ran the ".exe" so to speak. Is unpacking the .tar.gz in the /opt folder installing it as the guide would have me believe or is there some ".exe" I needed to run along the way? Thanks for you time and help.

claudio_martins
Champ in-the-making
Champ in-the-making
The .exe installer is just for Windows environment and AFAIK is only available for the Enterprise edition.

I don't believe Alfresco has an automated installer for Linux envs. Maybe I'm wrong, but I've never seen before.

Linux installation is just like that, untar, configure and run.

a_weed096
Champ in-the-making
Champ in-the-making
Yea I am stilling getting the Status 404 error. I saw some people fixed it by rerunning the db_remove and db_setup, but this didn't fix mine. Just thought I would give this a bump in hopes of a fix. Thanks for your time.

neil_kerr
Champ in-the-making
Champ in-the-making
Except I running ubuntu server 7.4

It appears there is a bad character on the wiki site:

export JAVA_HOME="/usr/lib/jvm/java-6-sun-1.6.0.00"

posted in gedit as a different character.

Now thereÅ› some problem starting Coyote, sheesh!

mikeh
Star Contributor
Star Contributor
To be honest, I'm no Ubuntu expert, so a lot of this is going to be guesswork…

It looks like the iptables command is different than the one supplied in the Wiki. No idea why, but it's not necessary if you're not using CIFS or FTP straight away, so we can skip that. We can also skip Open Office for now - one step at a time!

So, if you create and run a script containing the following:
export ALFRESCO_HOME=/opt/alfresco 
export CATALINA_BASE=/opt/alfresco/tomcat
export CATALINA_HOME=/opt/alfresco/tomcat
export PIDFILE=/var/run/alfresco
export LOGFILE=/var/log/alfresco/alfresco.log

# Set any default JVM values
export JAVA_OPTS='-Xms128m -Xmx512m -server -Djava.io.tmpdir=/var/lib/alfresco/tmp'

cd "$ALFRESCO_HOME"

sudo -H -u alfresco sh $CATALINA_HOME/bin/startup.sh
…what do you get?

thanks,
Mike

mefellows
Champ in-the-making
Champ in-the-making
Hi there,

I just wanted to mention that I have very similar problems installing Alfresco in my dev environment Ubuntu Feisty Fawn (7.04). I have successfully installed Alfresco on Windows (Easy), but Linux seems to be a pain.

I have tried both the installer as well as the manual install (as described in the Ubuntu install wiki). When I installed using the automatic installer, I had to modify the startup scripts because the installer didn't replace @@ALFRESCO_HOME@@ with the appropriate directory. After I replace it with the correct value, I get the exact same problems as the manual install.

This is the start of an 8 mile log dump:
INFO: Deploying web application archive alfresco.war
14:03:58,458 ERROR [web.context.ContextLoader] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'luceneFullTextSearchIndexer' defined in class path resource [alfresco/co
re-services-context.xml]……..

Which kills lots of things but the root cause is this:
Caused by: java.net.UnknownHostException: laptop: laptop

Changing my hostname to localhost seems to resolve these issues:
sudo hostname localhost

But now I get a java.rmi.AlreadyBoundException:
15:12:22,498 ERROR [web.context.ContextLoader] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serverConnector' defined in class path resource [alfresco/core-services-context.xml]: Invocation of init method failed; nested exception is java.io.IOException: Cannot bind to URL [rmi://localhost:50500/alfresco/jmxrmi]: javax.naming.NameAlreadyBoundException: alfresco/jmxrmi [Root exception is java.rmi.AlreadyBoundException: alfresco/jmxrmi]
Caused by:
java.io.IOException: Cannot bind to URL [rmi://localhost:50500/alfresco/jmxrmi]: javax.naming.NameAlreadyBoundException: alfresco/jmxrmi [Root exception is java.rmi.AlreadyBoundException: alfresco/jmxrmi]

Hopefully some of this may help anyone having similar issues. I will post back when I can fix these problems.

Cheers,
Matt

mefellows
Champ in-the-making
Champ in-the-making
Adding to that last post, I found that I had to manually find and kill any of the alfresco processes. Restarting alfresco after this I found it works. What a rookie error Smiley Surprisedops: .

Now to get open office and ftp/smb working!

Cheers,

Matt

mfuggle
Champ in-the-making
Champ in-the-making
I have a successful installation of Alfresco Community 2.1 on a Centos4.5 server which I want to decommission for a new server using Ubuntu 7.10.  I have tried to instal Alfresco on Ubuntu 7.10 for the past few days without success.  The final symptoms are a 404 error in the browser and I can provide details of the log.

However before I do does anyone have a successful installation of Alfresco Community 2.1 on Ubuntu 7.10?  If so can they point to the install instructions used?

Any help would be appreciated…

Regards
Martin Fuggle
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.