LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-09-2011, 07:11 AM   #1
erat123
Member
 
Registered: Oct 2006
Distribution: Ubuntu
Posts: 69

Rep: Reputation: 16
Multiple Instances of Apache/Tomcat/MySQL


Greetings!

I'd like to create multiple instances of apache, tomcat and mysql on a Linux server. I'm really not sure if it's possible to do so, but here's my use case before I got further:

I teach a programming course and I'm configuring a server that jails each student. I would really like it if each student could administer his own copy of apache, tomcat and mysql without conflicting with other students.

To make things more difficult, I only have a single IP address and I can't open additional ports.

Let's say I have a student named Tom Smith. I would like Tom to be able to access his apache files at mydomain.com/tsmith

Like I said, not sure if this is even possible to do, but any help would be appreciated!
 
Old 08-09-2011, 07:39 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
It's all possible in a certain way. What sorts of separations do you actually *NEED*? Why do you need separate database servers for a programming course? why not just different database instances on a single system? Why separate apaches? Why not just different virtualhosts on the same machine? Indeed, your example doesn't even seem to suggest that, just bog standard userdirs - http://httpd.apache.org/docs/2.0/mod/mod_userdir.html
 
Old 08-09-2011, 05:09 PM   #3
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,649
Blog Entries: 4

Rep: Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934
Theoretically, each one of these programs can be run at an "ordinary user" level, e.g. in a chroot jail (so you don't have to monkey around with non-standard configuration file setups). The only thing that the processes cannot do in that case is to open TCP/IP port-numbers less than 1024. (But they don't have to use TCP/IP for communication.)

This is, I think, a very good exercise, because it really does match what developers routinely want to do when they are setting up individual development environments.

One thing you might want to do, though, is to build some scripts that basically "spoon feed" most of the right answers, setting up the environments for the students "somewhat automagically." Then, lead them through an understanding of what has been done and lead them through some very specific changes. My thought here is, "if they've never yet been there, then they haven't a cucking floo why they can't manage to get there, and the frustration level is intense. (Heck, we've all felt that way, eh?!) "Here it is. The engine's running. Tah, daah... Now, let's turn the engine off and take the thing apart and see what makes it tick ..."
 
Old 08-11-2011, 04:52 AM   #4
Felipe
Member
 
Registered: Oct 2006
Posts: 302

Rep: Reputation: 32
Thumbs up

For me, two possibilities:
A)
A possible way could be to create virtual machines with VirtulBox, VmWare,... with each installation: Tomcat, Apache, MySql.
For each user, a Virtual Machine.

The virtual machine can be run on user computer or in server computer.
If virtual machine is run in server, each Virtual machine can run in a different IP (create your own net): Ej: 192.168.1.101, 192.168.1.102, ....

Using Apache on main server, you can redirect each http request to each virtual server (http://server.domain/server1 --> 192.168.1.101).
Also, you can access each machine console with vnc: http://server.domain/vnc1--> 192.168.1.101.

B)
Create installations for each user in the sever: Then you create first installation (ej: for user1) an copy it to user2, user3, ... reconfiguring ports:

Ej:
/opt/user1/
apache/... Port: 1080
tomcat/... Port: 1081
mysql/... Port: 1082

/opt/user2/
apache/... Port: 2080
tomcat/... Port: 2081
mysql/... Port: 2082
...

Also, you can use a main apache,
ex: /opt/apache
which rewrites url to each apache user:
Ex: http://server.domain/user1 --> send request to Apache or tomcat of user1.

Not sure if that can help you.

Regards
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Can probe monitor multiple instances of tomcat? Felipe Programming 2 02-01-2011 07:25 AM
Multiple Instances of MySQL neoform Linux - Server 8 04-12-2009 10:43 AM
RHEL5 Install Multiple Instances of Tomcat using only RPMs BinkyBong Red Hat 6 10-24-2008 07:02 AM
Multiple Apache Instances piforever Red Hat 4 10-05-2008 08:18 AM
Multiple Apache instances on Debian solferino Debian 2 08-23-2005 08:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration