This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

CentOS java support and Apache modules

 
K. Tsang
Bartender
Posts: 3348
12
Android Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all, I have recently done installing CentOS with LAMP and FTP.

For Apache, there are some modules like php and perl under the /etc/httpd/conf.d directory. Do I need to configure these configuration files in order to say run php on my Apache server? Or do I just use the defaults (don't change anything)?

Also where get I get packages for installing JBoss and GlassFish so that I can run java stuff? And do anyone heard of the xsp package for Apache? According to my reading, the xsp package allow Apache to run ASP stuff, anyone try it?

Thanks
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Personally, for installing Java-related things, I download the zip or tar.gz files manually and unpack them into a desired directory. For example, I have /opt/java/ant-1.7.1 and /opt/jboss/jboss-5.1.0.GA. (I changed to owner of /opt to my account.) You can also query the package manager for what Java-related items are available that way, but like I said, I prefer to know where all of my Java stuff is located, especially when I need to locate JAR files for classpaths.

For PHP and Perl, does the default http.conf file include LoadModule entries for those modules? For example, in mine I have these items for PHP:

PHPIniDir "D:/apps/php-5.2.9-2"
LoadModule php5_module "d:/apps/php-5.2.9-2/php5apache2_2.dll"
AddType application/x-httpd-php .php

(Yes, I know that is for Windows, but I am too lazy to boot one of my Linux VMs just to answer this question.)
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18014
47
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The defaults are generally good enough for PHP. The RPM installer will tweak the Apache and PHP config files a bit based on what other packages you install. I never hurts to do a quick scan just to be sure you like how things were set, though.

I'm with Peter. I think that there's a JBoss RPM for RHEL 5 and maybe even an Ant RPM - though I doubt there's one for GlassFish. But I prefer the stock ZIP/tar installs for Java stuff. Unlike binary packages, most Java installs don't splatter stuff all over the landscape, so their primary benefit is that the product shows up in the RPM inventory list.

Well, not entirely true - I've seen Tomcat installs that do interesting things with softlinks so that Tomcat's conf, work and logs directories go to /etc, /var/lib, and /var/log in accordance with LSB standards. But up-to-date RPMS on the Java stuff are a problem. Since they contain non-GPL code, they're not freely available for all RPM-managed platforms, they may not be as up-to-date as the primary distro versions, and the Red Hat RPM management of Java components is a little too fine-grained for my taste.
 
K. Tsang
Bartender
Posts: 3348
12
Android Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Tim and Peter for your comments. I downloaded the java sdk and glassfish and jboss zip files to my linux server. Installed java sdk with no problem. Now when I try to install glassfish (a bin) file - I got an error stating "error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory".

Then when I check if I have that libstdc++ package installed, my version is 4.1.2-44 so does it mean it needs v5.xx in order to run??

As for jboss, I don't seem to find any rpm files for v5.x only for v4.x so I got the zip file. Now if I just use the unzip command to extract the files, where should I extract it to? Should I extract it to /etc where all the other "apps" go or /var where tomcat would go if I install it? The java sdk auto install to /usr/java.

Also which jboss config file do I look at in order to change the default port from say 8080 to 80?
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds like the glassfish package might contain an embedded JVM. Either that or glassfish has native code. Yuck.

I unzip JBoss AS to /opt. Wait a minute, I already wrote that. So why are you asking where to place JBoss AS?

For changing the JBoss AS ports, are you using 5.x or 4.x? Because it is different for each. In 5.1.0.GA there is a file server/xxx/conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml which contains port assignments. (The file is different in 5.0.x, and there is a different mechanism in 4.2.x and 4.0.x).
Also for changing to port 80 see http://www.jboss.org/community/wiki/JBossOnPort80
 
K. Tsang
Bartender
Posts: 3348
12
Android Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Peter. I must have missed the /opt path. So I guess I will look into JBoss more and get it working

For glassfish I found this site https://glassfish.dev.java.net/downloads/v2.1-b60e.html
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic