cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple environment in a single server

glaksmono
Champ in-the-making
Champ in-the-making
Hello,

Does Alfresco capable to support multiple environment in a single server? If yes, do we have to redeploy the application for every new environment?
Thanks.
6 REPLIES 6

kevinr
Star Contributor
Star Contributor
If you setup JBoss/Tomcat to use different ports it is possible to have more than one Alfresco environment on a single box yes - obviously you must be very careful with port usage and make sure they point to different DB instances and also make sure they use different dir.root locations (see "config/alfresco/repository.properties")

The second Alfresco server instance will also need different ports for it's FTP access and will need configuring to change the shared drive setup to stop conflicts between the instances (see   "config/alfresco/file-servers.xml)

Google for info on running more than one tomcat/jboss instance, I seen documents for doing this and i've had 2 jboss instances running on a machine I've setup myself a couple of years back so i know it can be done.

Thanks,

Kevin

nigu
Champ in-the-making
Champ in-the-making
Hi,

I am currently evaluating a range of CMS products for a bunch of small sites hosted on a single box. I don't have enough resources to run several instances of jboss/tomcat on the same box, so I would like to host 3-4 *little* "portals" on the same server.

Is it possible to "tinker" with Alfresco to enable this? How much effort would it be required (rough estimate) to implement this feature, should I decide to carry on the task?

Thanks,

Ciao,
Nigu

kevinr
Star Contributor
Star Contributor
Hello,

Yes in theory you can in TomCat:

You can rename the WAR file to say "alfresco2.war" and deploy it again. You would then need to edit the  file:
tomcat\webapps\alfresco2\WEB-INF\classes\alfresco\repository.properties

and change the dir.root and db.name settings to make sure the new Alfresco instance saved it's data to new file and database locations such as:
dir.root=./alf_data2
and
db.name=alfresco2

Then you would need to create a new database schema for your new instance by editing and running the SQL scripts again (for say "alfresco2" as above).

Finally start and stop the server sould do the trick so those settings get picked up.

In Jboss, certain configuration files are shared which mean you could do this but you would have identical configuration settings for each deployment which probably wouldn't be very useful.

Hope this helps,

Kevin

trac
Champ in-the-making
Champ in-the-making
Hi,

I guess I'm a bit confused as how to do multiple instances of Alfresco/jboss on Linux using MySql.
as I see it as of now you create another directory where your second instance is in the jboss folder
seen as

/jboss/default - main company instance
/jboss/company2 - secondary company

Do you need everything that is in the default directory copied to the company2 directory?
You would have two mysql databases default and company2 and
which files would need to be edited to create the second instance for the different ports and
for startup of the two instances?

Thanks in advance for any help that can be given as I seem to be a bit confused as to what needs to be changed.

Trac

rdanner
Champ in-the-making
Champ in-the-making
Tac,

It sounds like you want to run a different server for each company.  In Jboss you have a bunch of options. 

= You can install the whole server many times: you would only do this if you had to support different versions or the "customer" had different product / upgrade cycles.  If you put them in one server they all get updated on the same day.  Thats the plus side.  The down side is they all get updated on the same day - and you have to coordinate it.

= You can install them in the same server in different (configurations) This is the same as default and minimal in the jboss distribution.  It sounds like this is you choice.  In this case you still have to make sure each instance of the server operates on different ports.

= the other option is to run them on the same container instace as differnt contexts. THis seems like the least optimal setup unless you are just selling alfresco instances. In this case you just install a bunch of apps and put virtual hosting infront of it to map different domain names to differnt contexts.


Just depends on what you want to do.

trac
Champ in-the-making
Champ in-the-making
Tac,

= You can install them in the same server in different (configurations)
This is the same as default and minimal in the jboss distribution. 
It sounds like this is you choice. 
In this case you still have to make sure each instance of the server operates on different ports.

Thanks for the heads up on the different types of configs.
I think the one server with different configurations seems like the way that I'd like to go
except from what I've read I am a bit confused as to which files need to be changed for to set
this up.
from what I have read
   /jboss/server/default/deploy/jbossweb-tomcat55.sar/server.xml - to change the ports
   /jboss/server/default/conf/jboss-service.xml - to add jboss port properties for multiple instances somehow
   /jboss/bin/run.sh - to launch each instance (what needs to be added? copy and modify for each instance?)
   /jboss/server/default/deploy/alfresco.war - need to change for each instance? e.g. (alfresco.war alfresco2.war .. etc)
am I missing anything else? or am I a bit off track?

Thanks
Trac