Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am about to order a VPS (virtual private server) from a provider, and I guess I have to install some Servlet Container right?

I am about to use SOLR and my website is PHP MYSQL JAVASCRIPT based.

How does an installation of a servlet container work? .exe file?

I am VERY new to servlet containers, so please explain in detail...

Also, how do I know which servlet container I should use?

The VPS OS I will be using is Linux.

Thanks

PS: don't know if this belongs on ServerFault

share|improve this question

migrated from stackoverflow.com Jan 25 '10 at 18:56

This question came from our site for professional and enthusiast programmers.

4 Answers 4

up vote 13 down vote accepted

A servlet container is basically an concrete implementation of the abstract Servlet API. They are available from several makes: Oracle Glassfish, Apache Tomcat, Eclipse Jetty, JBoss AS, etcetera.

A servlet container is normally already programmed in pure java. Thus, basically all you need to do is to have a JRE (sometimes JDK is required instead) already installed. As for any Java software you can basically just download a ZIP from it, it'll contain the servlet container and several startup/shutdown scripts. Or if you're tied to Windows and/or want to install it as a service, some are also available as an EXE. Check the Downloads section of the beforelinked server makes in question.

Which one to choose depends on the functional requirement, but I think Apache Tomcat is more than sufficient for your particular purposes. Both Sun Glassfish and JBoss AS are as being full fledged Java EE API implementations much more than "just" a servlet container.

Tomcat has a quite good "Getting started" documentation: http://tomcat.apache.org/tomcat-7.0-doc/index.html

Hope this helps.

share|improve this answer
    
Very good answer, thanks! –  Camran Jan 25 '10 at 15:59
1  
If you REALLY want to run Solr in Tomcat, they have instructions on their wiki page: wiki.apache.org/solr/SolrTomcat. But if you are new to Solr I recommend just going with Jetty - see my answer for details. –  danben Jan 25 '10 at 16:02

Solr is distributed with Jetty. No installation is required unless you specifically want to run a different container.

You can start Solr within Jetty by cding to $SOLR_HOME/example (where $SOLR_HOME is the root of your Solr install) and running java -jar start.jar. This will bring up Solr on port 8983.

You can then test by viewing http://your.machine.name:8983/solr (use localhost if the browser is running on the same machine).

share|improve this answer

I guess I have to install some Servlet Container right? I am about to use SOLR

Since SOLR requires one, yes, if you don't have one installed already.

How does an installation of a servlet container work? .exe file?

On Windows, that is one way. I believe msi files are preferred for that sort of thing.

The VPS OS I will be using is Linux.

Than an exe isn't going to do you much good, since it is the MS DOS / MS Windows executable format. Wikipedia has a list of servlet containers. You need to find one compatible with your OS and read its instructions.

Better yet, since your current knowledge of the subject seems quite low, hire a system administrator with some experience of the platform to help you get started.

share|improve this answer
1  
"Since SOLR requires one, yes." - Solr requires a servlet container, but it does not require that you install your own. –  danben Jan 25 '10 at 15:57
    
Do you pay for the systems-administrator? Thanks for pointing out but learning it myself is better :) –  Camran Jan 25 '10 at 16:01
    
If I was at the stage where I was paying for a VPS (rather than an internal development system) then I'd want someone who knew what they were doing on the team rather then depending on my learning as I went along. –  Quentin Jan 25 '10 at 16:09
    
A VPS costs around 30$ a month, hiring a systems-administrator would cost 50 times that a month. I can go on for 50 months and learn it myself (even though it doesn't take that long) and save the money! –  Camran Jan 25 '10 at 16:12
    
Yes, but if you are at the VPS stage, then presumably you are at the "if it breaks we have real problems" stage. –  Quentin Jan 25 '10 at 18:22

You can use apache tomcat. It is easy-to-use and reliable. It's one of the mostly used ones. You can get it from here. It has a very well documentation.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.