As a Java developer sometimes I need a version of Java Development Kit (JDK) that is not the one installed on my PC. Oracle Java installer on Windows does too many things that I cannot control (like changing the JVM used by browsers to run applets). As of this writing Java 8 is not yet available for general consumption but you can get an early access release here.
Open the downloaded file with 7-zip and then open the tools.zip you find inside. Extract everything to a convenient path like C:\jdk-1.8-ea.
Now it is shell time so open a DOS console (Start->Run…->cmd) and type:
Create a portable JDK 1.8
12
> cd C:\jdk-1.8-ea
> for /r %x in (*.pack)do C:\jdk-1.8-ea\bin\unpack200 "%x""%x.jar"
Now you are almost done but you need to rename some files:
As a Java developer sometimes I need a version of Java Development Kit (JDK) that is not the one installed on my PC. Oracle Java installer on Windows does too many things that I cannot control (like changing the JVM used by browsers to run applets). As of this writing Java 7 is at version u45 and you can download it from here.
Open the downloaded file with 7-zip (in my case was jdk-7u45-windows-i586.exe) and then open the tools.zip you find inside. Extract everything to a convenient path like C:\jdk-1.7u45.
Now it is shell time so open a DOS console (Start->Run…->cmd) and type:
Create a portable JDK 1.7
12
> cd C:\jdk-1.7u45
> for /r %x in (*.pack)do C:\jdk-1.7u45\bin\unpack200 "%x""%x.jar"
Now you are almost done but you need to rename some files:
As you may already know
when you buy a Raspberry Pi you get only the board without any case: now it is time to dress my RPi with a new case. You can use
the RPi without a case but after few days you will realise this is not good: our RPi feels so thin in our hands that a new case
is a good buy to let it live as long as possible.
The search for the right case
The Raspberry Pi set new limits on what you can get for 25$: one of these limits is how much accessories have to cost.
It does not make any sense buy a 50$ case for a 25$ computer and actually is quite hard to find a good looking case that
is cost compatible with the RPi. Looking on the net you can find from template to print your own cardboard case
(cheap but not so nice) to aluminum cases (very nice look but so much expensive). After few days I found what I think is a good
compromise between cost and appearance.
RPi-Technicase
The case I found and suddenly bought is the RPi-Technicase. On the left
you can see all the pieces you will find in the package they will send to you: click on the image to see a bigger picture.
You will also find clear instructions to follow that are not included in the picture. All components are made from good materials: top cover
and base are made in acrylic and screws, spacers, nuts and washers are metal. Mounting the whole case took about 20 minutes and
it was very easy: instructions are clear and it is hard to make mistakes.
Here on the right you can see the result once the Raspberry Pi is encapsulated in its new case. As always you can click
on the image to see a bigger picture.
Final considerations
I am quite satisfied about this case: it is a good looking product with the right price.
PROs
Good looking
Good instructions
Solid
CONs
The Raspberry Pi can move a bit inside the case: this is the only minor minor minor defect I can see.
Today I want to make my
Cisco Linksys WUSB100 Wireless N USB Adapter work on Raspberry Pi. In
ELinux RPi Verified Peripherals page this USB Wi-Fi dongle is
listed as problematic and making it to work is quite a challenge. My own USB key is exactly the one listed there with
idVendor=”1737” e idProduct=”0078” identified as Linksys (Cisco) WUSB100 ver.2.
Software installation
As I noted in my previous post I’m using Raspbian, the Linux
distribution recommended in the Raspberry Pi official download page.
For using the Wi-Fi USB key we need at least the software for managing Wi-Fi networks and the firmware for the USB Wi-Fi key:
specifically the WUSB100 ver.2 is based on the RT-3070 Ralink chipset. This USB key is supported by the rt2800usb driver actually
present in the official Raspberry Pi linux kernel once you provide the firmware binary blob.
All the following commands must be run as root.
Now we have all the needed software but still the Wi-Fi USB will not appear as device wlan0
we need to make it working: it is time of some udev voodoo and finally things should work.
First we need to edit file /etc/udev/rules.d/network_drivers.rules
If you write your password in /etc/network/interfaces please keep it permission tight:
1
$ chmod 0600 /etc/network/interfaces
Reboot and final checks
Now reboot and everything should be fine: finally you will see the wlan0 device
appearing if you run ifconfig:
1
$ ifconfig -a
With all these steps my Cisco Linksys WUSB100 Wireless N USB Adapter is working and stable during
last 8 hours with moderate network traffic: I did not stress test it yet… if I will found something
unusual I will let you know.
Is this setup working for you? Do you have any problem? Use comments below to leave a feedback
and I will try to help you!
Unless you live under a rock you should know about the existence of the Raspberry Pi, the ARM GNU/Linux box
that costs only $25! It is a technological and economical marvel smaller than a packet of cigarettes.
I just received my sample and from now on I will write about my experience with this nice gadget.
First things first
The first thing to do is
to start the Raspberry Pi: for 25$ you get only the barebone board you can see in the picture on the right.
For a somewhat complete list of supported peripherals you can take a look at
Elinux site.
For my raspberry I then used:
Samsung 8GB Class 10 SDHC - Model code: MB-SP8GA/EU
Microsoft Wireless Optical Desktop 700 (mouse and keyboard)
Linksys by Cisco WUSB100 Wireless N USB Adapter (for wi-fi network)
For the operating system I opted for Raspbian minimal image you can find
here.
Install it on the SD following the instructions reported there… I had no problems, everything was
clear and it worked fine.
The only problem found so far is the wireless usb key that is not working as expected… this is going
to be material for the next installment.
Writing a singleton is not that hard but writing it the right way may not be all that trivial. I wrote hundreds
singletons in my developer life and yesterday I found, thanks to a
Wikipedia post,
what I think is the perfect solution. The solution is not mine but I report it here for future reference:
Singleton.java
12345678910111213141516171819
publicclassSingleton{// Private constructor prevents instantiation from other classesprivateSingleton(){}/** * SingletonHolder is loaded on the first execution of Singleton.getInstance() * or the first access to SingletonHolder.INSTANCE, not before. */privatefinalstaticclassSingletonHolder{privatefinalstaticSingletoninstance=newSingleton();}publicstaticSingletongetInstance(){returnSingletonHolder.instance;}}
In this implementation the singleton instance is thread safe and unique as this is warranted by using final and static keywords.
Moreover the singleton instantiation is as lazy as possible: the singleton instance will be created if and only
if you call the getInstance() method and not whenever you simply reference the Singleton class (like accessing a constant).
With the release of VMware Player 4.0.1 (as noted here) VMware has also released new VMware Tools version 8.8.1. If, for some reasons, you need to get them directly (and not from VMware Player) you can grab them from here: http://softwareupdate.vmware.com/cds/vmw-desktop/player/4.0.1/528992/
VMware has just announced the release of the updated VMware Player. VMware Player is the free product from VMware to perform virtualization on desktop PC. The release 4.0.1 follows the version 4.0.0 released at the beginning of October.
You can find release notes for VMware Player 4.0.1 here.
As you can read on GOsa website: “GOsa² provides a powerful GPL’ed framework for managing accounts and systems in LDAP databases. Using GOsa² allows system administrators to easily manage users and groups…”. The installation on Red Hat Enterprise Linux/CentOS is a bit tricky and here you will find how to install it.
First you need to set SELinux in permissive mode (if you have enabled it) and configure the firewall to let other systems to connect to port 80/443 (HTTP and HTTPs) and 389 (LDAP server port) using the commandline tool
Setting firewall
1
$ system-config-securitylevel-tui
Now we need to get some more RPM repos to work:
Adding more rpms repos
1234567891011121314
//First the CentOS testing repo
$ cd /etc/yum.repos.d/
$ wget http://dev.centos.org/centos/5/CentOS-Testing.repo
//Then the RPMForge repo
$ rpm -Uhv \ http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
//And last the GOsa RPM repo
$ cat >> GOsa.repo << EOF[GOsa-Repository]name=GOsa Repositorybaseurl=ftp://oss.gonicus.de/pub/gosa/redhatenabled=0gpgcheck=0EOF
As we want the system as stable as possible without many packages from externarl repositories please verify that the files CentOS-Testing.repo and rpmforge.repo both contain the line ’enabled=0’. Now let’s check the new repositories for new packages to install and install them:
Now we need to be sure that Apache HTTPD and LDAP servers start at boot:
Starting services
1234
$ chkconfig httpd on
$ chkconfig ldap on
$ service httpd start
$ service ldap start
At this point, before configuring GOsa, you need to add specific GOsa schemas to your ldap using as reference a part of the beginning of my own /etc/openldap/slapd.conf
LDAP configuration
1234567891011121314
include /etc/openldap/schema/core.schema
include /etc/openldap/schema/cosine.schema
include /etc/openldap/schema/inetorgperson.schema
include /etc/openldap/schema/gosa/rfc2307bis.schema
include /etc/openldap/schema/gosa/gofax.schema
include /etc/openldap/schema/gosa/gofon.schema
include /etc/openldap/schema/gosa/samba.schema
include /etc/openldap/schema/gosa/gosystem.schema
include /etc/openldap/schema/gosa/goto.schema
include /etc/openldap/schema/gosa/samba3.schema
include /etc/openldap/schema/gosa/gosa-samba3.schema
include /etc/openldap/schema/gosa/goserver.schema
include /etc/openldap/schema/gosa/goto-mime.schema
include /etc/openldap/schema/gosa/trust.schema
Restart your openldap and finally we can connect to GOsa web interface and configure it pointing your browser at:
1
http://<hostname>/gosa/
Now you should have a fully functional GOsa install on your CentOS5: please let me know if you found error in this tutorial or even if you found it useful.
In Linux world port forwarding is a common feature: if you need to forward traffic from port XX to port YY you simply use the integrated Linux firewall called iptables. In Microsoft Windows the integrated firewall is not so sophisticated as the Linux one and I needed to found a solution. A friend of mine was asked about this question and answered: “You cannot find anything working… if you find something let me know!”.
The smartest solution I found was to use stunnel: maybe an overkill software for this simple task but it is
1. well known and opensource;
2. stable;
3. works as a windows service.
My own problem was to forward SMTP traffic from port 65025 to the well known port 25: this way if I telnet to port 65025 I can speak directly with the SMTP server listening on port 25.
Now all the magic is to write the appropriate stunnel.conf file that, in my case, was something like this:
stunnel configuration file
12345678910111213141516
; Certificate/key is needed in server mode and optional in client mode
; The default certificate is provided only for testing and should not
; be used in a production environment
cert = stunnel.pem
; Some performance tunings
socket = l:TCP_NODELAY=1
socket = r:TCP_NODELAY=1
[in65025smtp]
accept = 10.145.2.88:65025
connect = 10.145.2.88:65024
protocol = smtp
client = yes
[out25smtp]
accept = 10.145.2.88:65024
connect = 10.145.2.88:25
protocol = smtp
Looking at the stunnel.conf file provided you can see the trick: stunnel accept SMTP connections on port 65025 and encrypts them forwarding the traffic to port 65024; then it gets encrypted SMTP traffic from port 65024 and forwards it decrypted to port 25.
Last but not least is to register stunnel as service: in Windows this is as easy as 1, 2, 3
Please remember also to start the service ;)
I hope this is clear… if you find something wrong here please let me know and I will correct it!