Archive

Posts Tagged ‘Java’

Monitoring Tomcat with Munin on Debian GNU/Linux

June 20, 2013 Leave a comment

To monitor Tomcat with Munin 2.0 on Debian GNU/Linux (tested on Debian Squeeze with Tomcat6 and Debian Backports), you need the following steps.

First, you need to install package tomcat6-admin which enables the Tomcat Manager app we will be using.

# apt-get install tomcat6-admin

Next, create a user with a manager role in Tomcat, editing /etc/tomcat6/tomcat-users.xml and adding the following two lines in the appropriate list.

<role rolename=”manager”/>
<user username=”munin” password=”Munin” roles=”manager”/>

Restart Tomcat to reread its configuration and enable the newly-installed Tomcat Manager app.

# service tomcat6 restart

Configure the Munin tomcat_* plugins adding a file /etc/munin/plugin-conf.d/tomcat with the following content:

[tomcat_*]
  env.host 127.0.0.1
  env.port 8080
  env.user munin
  env.password Munin

Enable the tomcat_* plugins:

# cd /etc/munin/plugins/; ln -s /usr/share/munin/plugins/tomcat_* .

Restart Munin node:

# service munin-node restart

Enjoy!

HOWTO Install Sun’s JAVA on Ubuntu Lucid Lynx (10.04)

April 23, 2010 17 comments

After Ubuntu’s decision to default to OpenJDK for 10.04 (which is a good decision, IMHO), Sun’s (but is it still Sun, or Oracle?) JAVA somewhat “disappeared” from Ubuntu (multiverse).

That being said, some people may still need features only available in Sun’s JRE/JDK, which might not yet have been Freed.

Actually, Ubuntu is still shipping it, but in its “partner” section. To add that section to your Sources and install Sun’s JDK (as an example), just:

sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo apt-get update
sudo apt-get install sun-java6-jdk

You might need to accept the license (press “tab”, “enter”, “tab” on “Yes” then “enter”).

You might also just want to install sun-java6-jre or sun-java6-plugin if you just want the (Mozilla) web browser plugin.

As a side note, remember to remove OpenJDK if you do not need it, or be prepared to encounter hard to diagnose problems sometime.

sudo apt-get remove openjdk-6-jdk openjdk-6-jre openjdk-6-jre-headless openjdk-6-jre-lib

Ubuntu 11.10: same operation. Just replace “lucid” por “oneiric”

Categories: English, GNU/Linux, ubuntu Tags: , ,

Sakai tricky to install from normal Linux distribution

October 27, 2009 Leave a comment

We have a student working for us on comparisons between various LMSes here, and we recently moved on to Sakai. We’ve been looking a bit at installing it on an Ubuntu 9.04 and boy… is this a challenge.

While there seems to be a few sources of documentation around the web (including on the Sakai website itself) on how to install it, they’re all giving a 20 pages-long guide on how to install a specific version of Java (from sources), a specific version of Tomcat (from sources) and a specific version of Sakai (from sources as well). It seems like you need to be an active Java developer, used to the Tomcat stuff to actually get a chance to install it.

Now that makes me recall our numerous users who complained about the fact that installing the videoconference in Dokeos 1.8.5 was impossible. Well, let me say that you require at least double the skills to install Sakai.

The website mentions there are packages for Windows, Mac and Linux, yet the link to the corresponding page is broken (why’s that, I wonder).

An article from a Java developer gives you the impression it is a breeze to install, yes we are talking about a previous, outdated, version of Sakai.

A big negative point for Sakai (yes, you can try it online, but obviously you might want to try out scaling and building your own site on a local server).

Si no arranca eclipse

June 11, 2009 3 comments

Espero que les sirva este post para los que usan eclipse.
Si no arranca su eclipse por que hicieron alguna actualizacion u otro, podrian probar siguiendo estos pasos de NUESTRO AMIGO (slack).

lunes 13 de abril de 2009
Error al arrancar Eclipse
Hola, en algunos casos el sistema operativo se marea con la jvm que ocupa, esto generalmente ocurre cuando hacemos alguna actualización de algún paquete con el gestor o comando alternatives.
Y cuando queremos arrancar eclipse desde el lanzador del escritorio, simplemente no lo abre. y comenzamos con cuestionamientos… jajajaj…, en este caso lo logico es que queramos abrirlo por consola con el comando

slack@zion:programas/eclipse$ ./eclipse
LOG: [0xb7eb66b0] exception thrown while VM is initializing:
LOG: [0xb7eb66b0] NULL: java.lang.Object
LOG: [0xb7eb66b0] Aborting…
Aborted

desplegando el mensaje de error que se ve, lo bueno de esto es que existe una rapida solución.

En la misma consola ejecutamos el siguiente comando para comprobar las jvm disponibles para usar en el sistema,

slack@zion:~/programas/eclipse$ sudo update-alternatives –config java
[sudo] password for slack:

Hay 2 alternativas que proveen `java’.

Selección Alternativa
———————————————–
1 /usr/lib/jvm/java-1.5.0-sun/jre/bin/java
*+ 2 /usr/lib/jvm/java-6-cacao/jre/bin/java

Pulse para mantener el valor por omisión [*] o pulse un número de selección: 1
Se utiliza `/usr/lib/jvm/java-1.5.0-sun/jre/bin/java’ para proporcionar `java’.

Luego comprobamos que la opcion seleccinada sea la que tome el sistema como version de uso para java.

slack@zion:~/programas/eclipse$ java -version
java version “1.5.0_16”
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b02)
Java HotSpot(TM) Server VM (build 1.5.0_16-b02, mixed mode)

Con esto debieramos tener solucionado el tema de incompatibilidad de jvm con eclipse, al menos.

Saludos y Suerte !!

HOWTO Install a JRE on Sun Solaris

September 16, 2004 Leave a comment
This article was first written in September 2004 for the BeezNest technical
website (http://glasnost.beeznest.org/articles/174).

It may seem natural that Java should be available on Solaris. Actually, it is, but Solaris 8 for example features an obsolete JRE (Java Runtime Environment), JRE 1.2.

Let us see how to install a r(d)ecent JRE on Solaris.

Download the JRE for Solaris, and for your architecture. You’ll get a file like this: j2re-1_4_2_05-solaris-sparc.sh.

Go to /usr as root.

Execute the following command, given the name hereup:

# sh j2re-1_4_2_05-solaris-sparc.sh

Replace the link /usr/java (which currently points to ./java1.2) with a link to the newly-created directory.

# ln -s ./j2re1.4.2_05 java

You’re done!

To test you are using the new version, just issue a:

# java -version

You should now see something like this:

java version "1.4.2_05"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04)
Java HotSpot(TM) Client VM (build 1.4.2_05-b04, mixed mode)
Categories: English, Tech Crunch Tags: , ,