cancel
Showing results for 
Search instead for 
Did you mean: 

Installing Alfresco 4.2 with a separate MySQL server

atef1984
Champ in-the-making
Champ in-the-making
Hi,

I want to install Alfresco community and use a separate machine which contains MySql server.

Is there documentation that describe this step by step?

I have downloaded the MySql connector but i'm not sure where and how to install it.

And should I install Alfresco on my machine using (easy mode)? then change configuration files?

Thanks in advance for you help.

_________________

Best regards.
8 REPLIES 8

jpotts
World-Class Innovator
World-Class Innovator
You need the connector even if you are running MySQL on the same machine. It is typically a JAR file. Mine is in my $TOMCAT_HOME/lib directory.

With that in place you need to tell Alfresco how to connect to the db. Those settings live in your $TOMCAT_HOME/shared/classes/alfresco-global.properties file. If you go look at that, you'll see db.username and db.password settings. Make sure those are set to what you need. Now look for db.url (it is down further in the file). You'll see that "localhost" is set in the db.url. Change that to your MySQL server host. If your database name is something other than "alfresco" change that here to. I actually prefer to set db.name up by my db.username and db.password and then replace "alfresco" with ${db.name}.

This is covered quite nicely in the documentation:
http://docs.alfresco.com/3.4/topic/com.alfresco.Enterprise_3_4_0.doc/tasks/sqlserver-config.html
http://docs.alfresco.com/4.0/topic/com.alfresco.enterprise.doc/tasks/sqlserver-config.html
http://docs.alfresco.com/4.1/topic/com.alfresco.enterprise.doc/tasks/sqlserver-config.html
http://docs.alfresco.com/4.2/topic/com.alfresco.enterprise.doc/concepts/db-config-properties.html

Jeff

atef1984
Champ in-the-making
Champ in-the-making
First, thank you for your reply.

Changing alfresco-global.properties is clear, there is only one thing that i'm not sure when doing that; it is how to install alfresco, because when i do a simple install (or an advanced) it install PostgreSql stuff so then if i change only the connection properties will this work with MySQL? and is there another way to install alfresco to work with MySQL for first time? (I've seen something like that with version 3.3, it ask if you want Alfresco to work with PostgeSql or MySQL)

And I wanna be sure how to "install" the connector Jar because on MySQL server I don't have TOMCAT folder.. I have only put the connector Jar under "/lib" but that seems not working.

One last thing; where is alfresco log? i've found under /opt/alfresco4.2.C/alfresco.log but i haven't found much informations about connection or errors Smiley Sad

Thank you and sorry for some beginner questions

ATEF.

jpotts
World-Class Innovator
World-Class Innovator
Changing alfresco-global.properties is clear, there is only one thing that i'm not sure when doing that; it is how to install alfresco, because when i do a simple install (or an advanced) it install PostgreSql stuff so then if i change only the connection properties will this work with MySQL?
Yes, that is correct. The binary installer, by default, installs PostgreSQL. But Alfresco can run with several databases. If you don't want to run with the PostgreSQL that was installed, change the database properties as I described. But if you've already started your server, Alfresco has already created files in your data directory and it will expect those to match up with what's in your database. If you do not need to keep what is in your PostgreSQL database, you can simply delete the contents of your data directory (for you it is probably /opt/alfresco4.2.C/alf_data), change your db config to point to MySQL, and start the app server.

is there another way to install alfresco to work with MySQL for first time? (I've seen something like that with version 3.3, it ask if you want Alfresco to work with PostgeSql or MySQL)
I don't recall whether there is a "use existing database server" in the installer or not. I always just download the WAR and deploy it myself which means I have to configure the alfresco-global.properties file manually and set up the database and other dependencies (pdf2swf, ImageMagick, LibreOffice, etc.) myself.

I wanna be sure how to "install" the connector Jar because on MySQL server I don't have TOMCAT folder.. I have only put the connector Jar under "/lib" but that seems not working.
If you are using the installation created by the binary installer, you should have a tomcat/lib directory. In your case the tomcat directory lives in /opt/alfresco4.2.C.

One last thing; where is alfresco log? i've found under /opt/alfresco4.2.C/alfresco.log but i haven't found much informations about connection or errors Smiley Sad
Look under /opt/alfresco4.2.C/tomcat/logs for catalina.out.

Jeff

harshaxnim
Champ in-the-making
Champ in-the-making
Hi Jeff,
I'm trying to install each of the components (alfresco, solr4, share and postgresql) on different machines. I've tried for over 10 hours and have not been successful at all. Mostly because I'm a student and this is the first time I'm working with Web Applications and Tomcat Apache or any of this. I've tried installing alfresco.war based on the steps on http://docs.alfresco.com/community/tasks/alf-tomcat-install.html. The default apache welcome page loads all fine. But the moment I remove existing files/folders in webapps folder and put the .war in the folder, (and restart apache server) the page loads no more. When I revert back to the original state of files/folders in webapps folder, the default page loads fine.
I know I'm missing something stupid, but I've been overwhelmed with so much information in such a short time that I'm not so surprised that I must've missed something obvious. Was there something that I had to update after the adding of war file?

atef1984
Champ in-the-making
Champ in-the-making
Hello and thank you, I just want to mention one thing; 

   wanna be sure how to "install" the connector Jar because on MySQL server I don't have TOMCAT folder.. I have only put the connector Jar under "/lib" but that seems not working.


"If you are using the installation created by the binary installer, you should have a tomcat/lib directory. In your case the tomcat directory lives in /opt/alfresco4.2.C."



In my case ALFRESCO and MYSQL are SEPARATED so each one is on a separate machine that's why on MySQL server I don't have "tomcat/lib" that's why i'm not sure where to place the connector.

PS. the connector should be in Alfresco machine or in MySQL machine (they are separated in my case)??

bisana
Champ on-the-rise
Champ on-the-rise
connector (ie MySQL java driver) should be in Alfresco directory
"..tomcat/lib" to be precise

jpotts
World-Class Innovator
World-Class Innovator
Atef,

It doesn't matter where your MySQL machine is located. The MySQL Connector is a database driver used by applications to make the connection to the database, wherever it resides. In this case the application making the connection is Alfresco, which is a Tomcat web application, which is why the connector JAR goes in Tomcat's lib folder. When you install using the Alfresco binary installer, it creates a Tomcat installation for you which resides under the Alfresco root folder. That's why I am telling you that the connector JAR goes in /Your_Alfresco_Root_Folder/tomcat/lib.

Jeff

atef1984
Champ in-the-making
Champ in-the-making
VERY CLEAR guys!

That works.

Thank you Jeff, John.

ATEF.