Installing rJava in RHEL

Installing rJava on Ubuntu is a piece of cake. All you have to do the code below, and boom!!! You got rJava working in R.

 sudo apt-get install openjdk-7-jdk
 sudo apt-get install r-cran-rjava
 export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-i386
 export LD_LIBRARY_PATH=$JAVA_HOME/jre/lib/i386:$JAVA_HOME/jre/lib/i386/client

Now, the challenge was trying to get rJava working on RHEL. I could not find any proper documentation that worked. Instead, I ran into a bunch of posts and pointing to things that worked in their environment, but not on mine (so, this might not work on yours as well, but I hope it does). I usually like to give credit to the sources, but this time, they were so many over a long time span, that I could not remember what came from where anymore. So, I apologize for that. Below are the things that I did to get rJava working.

packages need

$ sudo yum install gcc-c++ gcc-gfortran R R-core R-core-devel R-devel R-java R-java-devel java-1.7.0-openjdk-devel
$ sudo yum list install gcc*

Once, you have installed the necessary packages; then it is time to

configure your environment

$ sudo /usr/sbin/alternatives --config java #select openjdk
$ sudo /usr/sbin/alternatives --config javac #select openjdk
$ export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.91.x86_64/jre
$ export PATH=$PATH:$JAVA_HOME/bin
$ sudo /usr/bin/R CMD javareconf
$ R
> install.packages("rJava") #install rJava on R console

And that is it! If you got the install.packages(“rJava”) to work on R, that means that now you can call Java from within R console.

Installing Moodle 3.0 on 1&1 shared host

I finally was able to find a guide that was able to allow me to setup Moodle on 1&1 Shared hosting environment.  To me, the only thing that I followed was deactivating “slash arguments” from “http://yourserver/admin/settings.php?section=http” section.  Once I did that, then my web HTML 1.0 site, got converted into a web HTML 3.0 (at least).

Thanks for the share!

Source: Installing moodle 2.6 on 1&1 Host » Gistlabs.net

Sophos UTM 9 blocking continuity between iPhone, iPad, Mac

I just recently migrated from Untangle 11.2 to Sophos UTM to give it a ride and noticed that a lot of things are blocked (which is a good thing if you know what you are doing and need to unblock it).  Just recently I noticed that I couldn’t make any more calls by using my iPad or Mac through my iPhone.  So, continuity was not working like it was before.

I went to the Apple site (see sources), but couldn’t figure out what port or services were the one that needed to be allowed by the firewall.  So, after analyzing dropped packages by the firewall, I noticed a pattern and created the following firewall rule.  Since the creation of this firewall rule, I haven’t had any more issues with continuity nor downloading content from games in Game Center.

Overall network mapping: Internal network -> Allow ports 6384:16472 -> Any

  1. Go to “Network Protection”
  2. “Firewall”
  3. Click “New rule…”
  4. Under “Sources:” add “Internal (Network)”
  5. Under “Services” (you probably haven’t created this, so we are going to do it the long way), click on the “+” to add a new service
  6. Give it a name.  Probably “Apple Continuity”
  7. On “Destination port:” allow ports from “16384:16472”
  8.  Under “Comment” add these ports are “Real-Time Transport Protocol (RTP), Real-Time Control Protocol (RTCP)” for “iChat AV (Audio RTP, RTCP; Video RTP, RTCP), FaceTime, and Game Center”
  9. Click “Save”
  10. Under “Destinations:” add “Any”
  11. (Optional) Add comment
  12. Click “Save”

Now you should be able to use Apple continuity by handing over calls over your iPad and/or Mac from your phone under the same network.

Hopefully Sophos UTM could include this as default with their future releases.

Source: TCP and UDP ports used by Apple software products – Apple Support

How to install a new version of python in RHEL 6

So, if you have RHEL 6, you might be stuck with Python 2.6.  But, not really.  Even though you might not be able to install a new version of python using yum, you can still download a new version of python and install it in your environment.  Now, you can install it and replace the current version or you can install another version and have two python in your system.

  1. Install GCC by typing
    sudo yum install gcc
  2. Go to
    cd /usr/src/
  3. Now, let’s download a release from python.org. In this example we will be using Python 3.5.0.

    sudo wget https://www.python.org/ftp/python/3.5.0/Python-3.5.0.tar.xz sudo tar xf Python-3.5.0.tar.xz sudo cd Python-3.5.0
  4. Let’s compile
    sudo ./configure
  5. Let’s build the package
    sudo make
  6. Now, to install it you have two options.  You can either overwrite the python executable or you can install as concurrent instance.
    1. If you want to overwrite the OS python executable
       sudo make install
    2. If you want to install concurrent (not overwritting the OS executable)
       sudo make altinstall
  7. Now let’s link it so others could use it
     sudo ln -s /usr/local/bin/python3.5 /usr/bin/python3.5
  8. Now test it by invoking the following command
    python3.5 -V

    You should have the following result

    "Python 3.5.0"
  9. If you get that result let’s continue, otherwise look back and see what step you missed.
  10. Now that you have python 3.5 install along with 2.7, you might want to install pip to handle package installations.
  11. In order to do that, let’s first download pip.
    cd ~/Downloads
    wget https://bootstrap.pypa.io/get-pip.py
  12. Now, let’s install it
     sudo python3.5 get-pip.py

    If setuptools is not installed, get-pip.py will automatically install setuptools.

  13. To check pip if installed successfully
     pip3.5 -V

    You should have the following result

     "pip 7.1.2 from /usr/local/lib/python3.5/site-packages (python 3.5)"
  14. If you want others to use pip with sudo command, you probably want to do this
  15. sudo ln -s /usr/local/bin/pip3.5 /usr/bin/pip3.5
  16. And there you go!  Now you have two python versions and two pip versions running concurrently on your OS.

Sources

https://www.python.org/

https://pip.pypa.io/en/stable/installing/

http://stackoverflow.com/questions/8087184/installing-python3-on-rhel

http://stackoverflow.com/questions/6587507/how-to-install-pip-with-python-3

IBM SPSS Modeler Streams with Excel export nodes fail with Insufficient memory for JVM – United States

From time to time you might run into some issues with SPSS Modeler of running out of memory on Java Virtual Memory.  The way you fix it is by expanding the allocated JVM.

So, in order to do this we mustdo the following…

  1. Close SPSS Modeler if you have it open
  2. Open C:\Program Files\IBM\SPSS\Modeler\\config\jvm.cfg as Administrator
  3. Find the line with the following
    options, "-Xmx256m"
  4. Now change "-Xmx256m" to a new value where 256m = RAM.  So if you would like to lets say allocate 1G of RAM, then you will change it to options, "-Xmx1024m".

Source: IBM Streams with Excel export nodes fail with Insufficient memory for JVM – United States

Configure full VPN tunnel in Sophos UTM – Technicus

Finally I was able to find some documentation on how to configure Sophos VPN UTM.

For years now I have had a successful split tunnel VPN with my Sophos UTM. Recently I’ve wanted to have a full tunnel option for greater security in remote areas (hotel wi-fi, etc.) Unfortunately setting up such a thing in Sophos is NOT straightforward. The biggest problem I had was that no websites would work … Continue reading Configure full VPN tunnel in Sophos UTM →

Source: Configure full VPN tunnel in Sophos UTM – Technicus

Upgrade to Windows 10 with ISO to by pass VMware issue with SVGA drivers

Just recently with the announcement of Win 10 made available for free, I wanted to upgrade, but got an error message that I can not upgrade due to SVGA drivers compatibility.  Between VMware and Microsoft, they are both pointing fingers to one another and nobody wants to take responsibility.  So, the easiest way to do it, would be to download the ISO and perform the upgrade yourself.

Here is the direct link -> https://www.microsoft.com/en-us/software-download/windows10ISO.

Source:

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1011709

https://communities.vmware.com/message/2523524

http://www.imore.com/how-avoid-windows-10-upgrade-problems-vmware-fusion

Windows 10 ISO

Get HBO Go to work in Ubuntu 14.04 LTS – … and other streaming services like Amazon Prime, 4oD that are DRM-Protected Flash 

So, I tested this in Ubuntu 14.04 LTS and Firefox 38.  This tool did not worked in Chrome 43.

You will need to add the PPA to your Ubuntu box and then install the program.

  1. open “Terminal”
  2. type “sudo add-apt-repository ppa:mjblenner/ppa-hal”.  Then go through the prompts
  3. then, type “sudo apt-get update && sudo apt-get install hal”
  4. Open up Firefox and give it a ride!

Getting Amazon Prome, 4OD, Demand 5, or Google Play Movies to work on Ubuntu 13.10 requires a little bit of effort, but it can be done.

Source: Get Amazon Prime, 4oD and Other DRM-Protected Flash Working in Ubuntu 13.10 – OMG! Ubuntu!

How to make Thunderbird portable

The title to this post might be deceiving, since I am not going to walk you through on how to make Thunderbird portable, but rather how to make Thunderbird portable cross different devices by using a file sharing tool (ie. Dropbox).

Let’s say that you have two Linux, Mac, or Windows machines and would like to have your Thunderbird mailboxes and configurations to be the same.  So, whenever you make a change on one machine, it will synchronize on the other.  Key that you want to consider is how much space your Thunderbird profile is taking and if you will have enough space in Dropbox.

The following was tested in two different Ubuntu Linux machines (I also did it on Windows machines, but the steps below are for Linux).  Here is what you will need to do.

  1. Make sure that you have Thunderbird configure the way you want it/like it on PC#1
  2. Then close out Thunderbird to make the following changes
  3. Go to folder /home/pc1_user/.thunderbird/
    where pc1_user will be change to your actual user profile
  4. You will see couple of files and folders in there.  The ones that you will be interested are “profiles.ini” and “randomfoldername.default”
    where “randomfoldername.default” will be something like this “z85gg4eg.default”
  5. Move “randomfoldername.default” to your Dropbox account.  In my case I created a folder for Thunderbird where this new folder will be under.
    Here is how it looks… /home/pc1_user/Dropbox/Thunderbird/randomfoldername.default
  6. Now, let’s update “profiles.ini”.  Your configurations might look like something like this
    [General]
    StartWithLastProfile=1
    [Profile0]
    Name=default
    IsRelative=1
    Path=randomfoldername.default

    What you are going to do is to make some modifications to this file by changing “IsRelative” and “Path” to look this this

    [General]
    StartWithLastProfile=1
    
    [Profile0]
    Name=default
    IsRelative=0
    Path=/home/pc1_user/Dropbox/Thunderbird/randomfoldername.default
  7. Now you should be able to open Thunderbird on the computer with no problem :).  Just note that by doing this doesn’t fix your problem on having Thunderbird synchronized in two computer.
  8. You will need to do something similar on PC#2.
    1. Make sure that you have Thunderbird installed
    2. Make sure that you have Dropbox installed
  9. Go to folder /home/pc2_user/.thunderbird/
    where pc2_user will be change to your actual user profile
  10. You will see couple of files and folders in there.  The one that you will be interested are this time is only the “profiles.ini”.
  11. Now, let’s update “profiles.ini”.  Your configurations might look like something like this
    [General]
    StartWithLastProfile=1
    [Profile0]
    Name=default
    IsRelative=1
    Path=randomfoldername.default

    What you are going to do is to make some modifications to this file by changing “IsRelative” and “Path” sections to look this this

    [General]
    StartWithLastProfile=1
    
    [Profile0]
    Name=default
    IsRelative=0
    Path=/home/pc2_user/Dropbox/Thunderbird/randomfoldername.default
  12. There you have it!!! Now you can enjoy Thunderbird in two (or many more) machines with the same settings, mailboxes, and configurations.

Sources:
http://kb.mozillazine.org/Running_from_a_USB_drive_(Thunderbird)
http://www.makeuseof.com/tag/access-your-personalised-thunderbird-client-on-any-computer-worldwide/

How To Sync Your Desktop Email Client Across Multiple Computers