views:

60

answers:

7

I'm a .NET developer looking do some research on my own time to better familiarize myself with Linux and Java (e.g JSP and Servlets).

My plan is to install Linux on an old PC. Then, install and configure a web server capable of hosting JavaServer Pages and Servlets. I would like to create a small web site with dynamic content being pulled from a database. Again, this site is only intended to be used by me for research and testing.

I have very little experience with Linux and Java. Did a couple projects back in college, but that was over 8 years ago.

Below are the questions I have about configuring a test environment I can use for research and testing.

1) What version of Linux should I install on my old PC?

2) What web server should I install on my Linux machine that can be used to host JavaServer Pages and Servlets?

3) What database should I install on the Linux machine? Since I'm doing this for research, it would be nice to test with a DBMS that is commonly used in the real world.

Thanks, Chris.

A: 
  1. I would install the latest Ubuntu. The most user friendly and should work on your old PC.
  2. I would install Glassfish or JBoss. Glassfish comes with Oracle's JEE and is the easiest to install. JBoss is more widely used in commercial settings. Better yet, install both and try it on both!
  3. MySQL is easy to install on Linux machines. In fact it's usually installed by default by the distribution.

Good luck! Linux is a great learning experience and a lot of fun!

Starkey
Glassfish or JBoss is kind an overkill when you only need to do servlets and JSP.
Colin Hebert
+2  A: 

You can use Debian, Tomcat and MySQL.

  • Debian is a fairly common linux distribution and will work on almost every PC.
  • Tomcat is a simple servlet container. It's the best choice if the only thing you want to do is servlets and JSP.
  • MySQL is, well MySQL :)

If you do mind using Linux, you can use Ubuntu which is more user-friendly but not really recommended as a server (at least for the default version).


These applications/distributions are from the most used and with the most active communities.


Resources :

Colin Hebert
A: 

I'm not a specialist in linux distributions, but as webserver the apache tomcat would be the best choice, I think version 6. The database may be a mysql, but for professional usage with more functionality postgresql will be the best choice.

Arne Burmeister
+1  A: 
  1. Whichever you want :-) At work, for example, our Linux servers run Red Hat Enterprise Linux, which is loosely based on Fedora, so that might be a good distribution to use that might be similar to what you would experience in the 'real world'.

  2. Tomcat or JBoss Application Server would be good app servers to start with. Tomcat is just a servlet container, whereas JBoss supports more of the Java EE technologies. That said, many organisations find that a 'lightweight' app server like Tomcat is perfectly adequate.

  3. MySQL and PostgreSQL are both widely-used open source database servers.

Richard Fearn
A: 

1) As you want, but I suggest you a Red-Hat (CentOs for example) or Debian (Ubuntu for example) based distribution. With respectively Yum/RPMs and Aptitude/Synaptic, it will be easier to install Java (even if it is not difficult on other distributions).

2) To serve JSP pages and execute servlets, I suggest you Tomcat. It is much easier to install/configure it than other webservers (JBoss, Websphere, Weblogic, etc.), and you won't need them in a first time (EJB, etc.)

3) As a database, you can use MySQL (very easy to install), or PostgreSQL, or Oracle Express Edition (not Open Source but Free... And Oracle is very often used on big projects). From a Java point of view, it will be very similar (JDBC/Hibernate access to database "hide" the specificity of DB)

Benoit Courtine
A: 
  1. Slackware. You will get lots of different answers on what distribution to use, and a lot of it is personal preference. I always prefer Slackware for server installations, and install all my software from source. I think of Ubuntu and Redhat more as client/desktop installations. I don't like to rely on packages to keep my servers up-to-date.

  2. Tomcat. You don't need J2EE. Tomcat will do the job nicely.

  3. MySQL. It's quite standard and works well.

Erick Robertson
A: 

I think you are starting in the wrong place.

1. If you want to try out linux try out linux. You don't need to install it - just download a "live CD". I believe the latest Ubuntu installer comes on a live cd.

2. If you want to try out java web development you don't need to set up a server just install eclipse for java ee and create a dynamic web project. Then just start developing. Try to find some tutorials, etc. Eclipse can even download a development tomcat from within the ide.

3. For databases - why not just use the same database you use with .net? I am sure there will be a jdbc driver and the code you write shouldn't be that different from any other database.

Adam Butler
Good points. However, I'm not only doing this to better my development skills. I also want to broaden my server administration skills.
ChrisNel52