Search This Blog

Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

Friday, October 1, 2010

Ubuntu / Kubuntu 10.04 (LTS ) Arrived in the Mail...snail mail that is!

Yeehaa I Got Mail...Its Not Spam....its....its...real...woooo...SNAIL MAIL!


Walked out to the letter box on the way to catching the bus to work this morning and found a padded envelope inside. My heart skipped a beat and surged with excitement..... Whatever could this be....had to be some cool free stuff...either more free cat food for my new kitten (I dont have a new kitten but taking advantage of the cat food tho for Bullets my 4 year old kitty) or perhaps another tube of free toothpaste (freestuff.net.au does actually pull through and provide some actual 'free' things as their name suggests they should do...even tho 3/4 of their offers are actually competitions, surveys or other non-free stuff).

No....turns out this padded envelope from the mysterious corners of the world (I forget right now where it was from but it was far ....other hemisphere far even....) was actually my long awaited version of 3 DVD's with Lucid Lynx, 10.04 (LTS) Ubuntu/Kubuntu/Ubuntu - server/64bit - version. Its finally arrived!!! W00t!!!

Just in time for me to go to the Ubuntu website and read all about the 10.10 beta release that's about to come out (or just has :-) ) . Well I suppose that's what I get for not just downloading it and wanting it snail mail delivered in today's times....but you gotta admit....there's something just so exciting at getting 'real' mail in a padded envelope no less. Whats that....no you say....not excited you say....pah..."bah Humbug" I say to you!!!! I enjoyed it!!! So there!!!

Well now all I have to do is get around to actually installing it (or at the very least running of the CD/DVD and trying it out). Dual boot would be nice, VMWare images with each of Ubuntu 8.xx, 9.yy, 10.zz versions installed inside my Windows 7 would be great and vice-versa with Windows 7 installed inside a VMWare image in my dual boot setup of Ubuntu 10.04. (It is LTS - Long Term Support-ed after all ... that was sarcasm by the way ... hard to tell on these blog things :-) )

Links to Ubuntu Downloads/Releases/Feature Info/Reviews.


    Tuesday, August 3, 2010

    New Software Releases (Ubuntu-10.04, Firefox-4.0Beta2/3 & Netbeans6.9.1)!!!

    Just a short/quick post to note that it seems to be a good time for software releases at the moment:
    • The latest version of Ubuntu, 10.04 (Lucid Lynx), is an LTS(Long Term Support) version, and was released on April 29, 2010. Woot!!! Woot!!! Woot!!! 
    • Firefox released the new Version 4 Beta a few weeks ago and now they've also released an update (i.e: Firefox 4.0 Beta 2....update....and Beta 3 came out on the 11th Aug), here's a link to the release notes and some interesting info: http://www.mozilla.com/en-US/firefox/4.0b2/releasenotes/
    • Netbeans has released the new 0.0.1 version release of Netbeans 6.9.1. The release notes are at: http://netbeans.org/community/news/show/1488.html.
    Personally when it comes to large releases from companies I trust (FF, etc) I'm happy to use Beta versions on my PC's and Laptop. So I have a tendency to upgrade to the next version of 'most' bits of software (FF, Linux, JSE/JDK, JEE, etc). Regardless of new versions or even the use of Beta's but I tend to find that I'm OK and don't hit bad bugs from upgrading to early. That's good. So here's my opinions based on actual use of these tools and the new Betas/versions (well FF anyways....bit lazier so far on Ubuntu upgrades.... :-) )

    Netbeans 6.9.1 Release

    - Release Notes Overview: http://netbeans.org/community/news/show/1488.html

    - Further Release Notes 6.9 Overview: http://netbeans.org/community/releases/69/

    - List of Bug Fixes For The 6.9.1 Version: http://wiki.netbeans.org/NetBeans6.9PatchesInfo. This contains a list of the bugs fixed in the point release.

    - And some EVEN better release notes for 6.9.1 August 4th 2010 Release: http://netbeans.org/community/releases/69/relnotes.html. These release notes kick ass in their detail. I reference these below for the list of some of the changes.


    What's New in 6.9.1 - A more detailed list from above.

    • Availability of the latest IDE bundled with JavaFX SDK 1.3.1
    • Improvements to the JavaFX debugger
    • Important usability issues fixed in the JavaFX Composer and Editor
    • Critical bug fixes made to other modules since the 6.9 final release

    The following updates to the 6.8 release included in version 6.9 also apply to 6.9.1:
    • JavaFX Composer to simplify and visualize JavaFX development
    • Support for Equinox and Felix OSGi frameworks in NetBeans Platform
    • Spring Framework 3.0 library support
    • Java CardTM 3 Connected
    • Rails 3.0 Beta support
    • PHP Zend Framework support
    • Support for JSR-299, Contexts and Dependency Injection (CDI)
    • Additional Enhancements are listed on the NetBeans IDE 6.9 New and Noteworthy page.
    Note: The Java TM SE Development Kit (JDK) 5.0 is not supported on any platform for this release. You must have JDK 6.0 on your system to install and run NetBeans IDE 6.9.1.

    Ubuntu Downloads and Free Install CD's


    Firefox4.0-Beta2-Updates/New Functionality

    - The following link shows the updates and the changes to the functionality from Beta 1 to 2. http://www.mozilla.com/en-US/firefox/beta/features/#feature-switch

    - Furthermore I'm always interested in performance improvements. FF4Beta2 works on improving JavaScript, which given the state of the Web in our 'Web 2.0' fancy-shmancy world we live in is now an important feature to improve the speed of: http://blog.mozilla.com/dmandelin/2010/07/19/jagermonkey-update-getting-faster/. And so how does it get this extra performance. Well in a bunch of ways, bug fixes, perf., improvements, etc., etc., etc., but it also points out in dmandelin's blog that they used Ropes for improving the performance of Strings in JavaScript. The primary improvements going to occur when you do a lot of adds, removes from inside the middle of a string, and where in the normal case since a String is immutable you's need to make a new copy of inserts etc. Which gives you at least O(n) performance but Ropes convert a String to a tree structure so an insert in the middle of a string simply points a node to a new location of the new bit of the string we are adding. performance at O(1)!!! Beat that!!! Before you get to excited keep in mind you need to understand WHEN these are to be used or else you'll cost yourself performance but in the right case Speed improvements here we come. Something to keep in mind for the future if I ever need to perf., tune some code manipulating Strings heavily.



    Check out http://en.wikipedia.org/wiki/Rope_%28computer_science%29 for an overview discussion of Strings vs. Ropes.

    Monday, April 20, 2009

    Installing Tomcat5.5 On Ubuntu 8.10 (Intrepid Ibex)

    So whats next in my intrepid (he he he ... get it ..intrepid...Intrepid Ibex, ubuntu 8.10....ahhh never mind :-) ) adventures in trying to get a *nix development environment going. Well. I got Java happening in my last post. A web server would be good now. So tomcat here we come.

    I want to install Tomcat 5.5 as our SOE at work is still Java 5 and Tomcat 5.5 so I went to the following URL at the tomcat website and downloaded three packages as tar.gz files:

    http://tomcat.apache.org/download-55.cgi

    which where called:

    mkopka@random:~$ ls -l martys_stuff/
    total 9892
    -rw-r--r-- 1 mkopka mkopka 2401560 2009-04-20 15:33 apache-tomcat-5.5.27-admin.tar.gz
    -rw-r--r-- 1 mkopka mkopka 855053 2009-04-20 15:32 apache-tomcat-5.5.27-deployer.tar.gz
    -rw-r--r-- 1 mkopka mkopka 6478912 2009-04-20 15:32 apache-tomcat-5.5.27.tar.gz

    Next i setup some directories where I wanted my setup to go. Im used to the following so this is what I used but your not limited to this:

    /home/mkopka/tools/apache/tomcat-5.5.27

    Then i unzip and extracted the contents of each of the tar.gz files into the aforementioned directory. Now I thought, hooray Im done. I went to the bin directory and tried to run:

    ./catalina.sh -version

    ...and rather than a happy version number proving all is good, I was rewarded with the following:

    mkopka@random:~/tools/apache/tomcat-5.5.27/bin$ ./catalina.sh version
    Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
    At least one of these environment variable is needed to run this program

    Well, heres me thinking Java was all happy after my last post, but obviously somethings not quite right so I did the following:

    mkopka@random:~/tools/apache/tomcat-5.5.27/bin$ echo $JAVA_HOME

    mkopka@random:~/tools/apache/tomcat-5.5.27/bin$ 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)
    mkopka@random:~/tools/apache/tomcat-5.5.27/bin$ which java
    /usr/bin/java
    mkopka@random:~/tools/apache/tomcat-5.5.27/bin$ ls -l /usr/bin/java
    lrwxrwxrwx 1 root root 22 2009-04-02 13:42 /usr/bin/java -> /etc/alternatives/java
    mkopka@random:~/tools/apache/tomcat-5.5.27/bin$ ls -l /usr/bin/java
    lrwxrwxrwx 1 root root 22 2009-04-02 13:42 /usr/bin/java -> /etc/alternatives/java
    mkopka@random:~/tools/apache/tomcat-5.5.27/bin$ ls -la /etc/alternatives/java
    lrwxrwxrwx 1 root root 40 2009-04-14 18:23 /etc/alternatives/java -> /usr/lib/jvm/java-1.5.0-sun/jre/bin/java
    mkopka@random:~/tools/apache/tomcat-5.5.27/bin$ ls -la /usr/lib/jvm/java-1.5.0-sun/jre/bin/java
    -rwxr-xr-x 1 root root 65116 2008-05-28 18:30 /usr/lib/jvm/java-1.5.0-sun/jre/bin/java

    So as you can see above, yep, no JAVA_HOME setup. And by doing some ls,-eing I was able to find where my java was installed. So time to set a JAVA_HOME and JRE_HOME:

    /usr/lib/jvm/java-1.5.0-sun/ <--- thats the location of my Java 5

    export JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun/
    export JRE_HOME=
    /usr/lib/jvm/java-1.5.0-sun/jre

    I added these to my ~/.bashrc so that I would have these everytime i started a shell. Now running the same ./catalina.sh version command i get:

    mkopka@random:~/tools/apache/tomcat-5.5.27/bin$ ./catalina.sh version
    Using CATALINA_BASE: /home/mkopka/tools/apache/tomcat-5.5.27
    Using CATALINA_HOME: /home/mkopka/tools/apache/tomcat-5.5.27
    Using CATALINA_TMPDIR: /home/mkopka/tools/apache/tomcat-5.5.27/temp
    Using JRE_HOME: /usr/lib/jvm/java-1.5.0-sun/jre
    Server version: Apache Tomcat/5.5.27
    Server built: Aug 28 2008 10:08:26
    Server number: 5.5.27.0
    OS Name: Linux
    OS Version: 2.6.27-11-generic
    Architecture: i386
    JVM Version: 1.5.0_16-b02
    JVM Vendor: Sun Microsystems Inc.

    Woohoo!!!! It works I have the version number which is always a good start. So next, its time to cross fingers and try to start up the sever.

    ./catalina.sh run

    and I was happy to see a line saying:

    INFO: Server startup in 1651ms

    ...and most importantly going to : http://localhost:8080/ shows me the tomcat startup page! We have lift off!!!

    Okay, okay, okay, lets not get too excited yet. time to kill the server and setup some security stuff.

    Setup Security
    In order to use the tomcat manager and admin components you need to setup a username and password. There is a tomcat-users.xml file that can be used for this purpose:

    $CATALINA_HOME/conf/tomcat-users.xml

    is where the file is located in my install. Within it you'll find a number of users. You need to create a new admin user entry:

    <user username="admin" password="admin" roles="admin,manager">

    this is the user name and password to use for the admin and manager console and along with this you need the roles created as well so that the tomcat-users.xml file now looks like:


    <tomcat-users>
    <role rolename="tomcat"/>
    <role rolename="role1"/>
    <role rolename="admin"/>
    <role rolename="manager"/>
    <user username="tomcat" password="tomcat" roles="tomcat"/>
    <user username="both" password="tomcat" roles="tomcat,role1"/>
    <user username="role1" password="tomcat" roles="role1"/>
    <user username="admin" password="admin" roles="admin,manager"/>
    </tomcat-users/>



    Library Driver Setup
    Tomcat needs to have the DB drivers added to it for Oracle and PostgreSQL. If you don't add them you will get the error messages as shown here:

    Cannot load JDBC driver class 'oracle.jdbc.driver.OracleDriver'
    Put the Oracle JDBC jar into Tomcats lib directory: $CATALINA_HOME/lib (not into the applications libs directory!).
    Note: if you use Tomcat 5.5.x: use $CATALINA_HOME/common/lib (and not $CATALINA_HOME/server/lib)!

    Cannot load JDBC driver class 'org.postgis.DriverWrapper'
    The full message is:

    org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot load JDBC driver class 'org.postgis.DriverWrapper'


    Same as above, requires the Postgis class added to the tomcat libs directory.

    So you need to add the driver libraries. The libraries are added to:

    $CATALINA_HOME/common/endorsed (or common/lib directory - not sure which one, try one then other if fails still)

    and the libraries that need to be added are:

    ojdbc14.jar
    postgis_1.1.0.jar
    postgresql-8.1-407.jdbc.jar


    Testing of Port Setup
    At this stage you should have a Tomcat install of the web server, the admin and the manager consoles. First check:

    $CATALINA_HOME/conf/server.xml

    and confirm that the port number you are using is 8080. This is done by checking that the following block is available within the server.xml:

    <service name="Catalina">
    <connector port="8080" redirectport="8443" minsparethreads="25" connectiontimeout="20000" maxsparethreads="75" maxthreads="150">
    <connector port="8009" redirectport="8443" protocol="AJP/1.3">
    <engine defaulthost="localhost" name="Catalina">
    <realm classname="org.apache.catalina.realm.UserDatabaseRealm">
    <host appbase="webapps" name="localhost"></host>
    </realm>
    </engine>
    </connector>
    </connector>
    </service>


    Startup Of Server
    Then you should be able to start the server by going to the bin/ directory and running

    ./catalina.sh run | tee ../logs/standard_out.log

    which runs Tomcat in the same window and also feeds the logs to the log file listed.

    Testing of Server
    You should now be able to go to :

    http://localhost:8080/

    which should bring up the tomcat start page. On the left side should be the options to go to the Tomcat manager and Administration. Test that you can go to both of these. The user name and password that were used in tomcat-users.xml is what is required to log in to both.

    Deployment of Web Applications
    Using the Tomcat Manager you can deploy a war file by selecting it with the browse button and then deploying it through the Tomcat Manager Deploy Tool. This should cause it to eventually appear in the Tomcat Manager list of applications. Then you should be able to either click on the application or type in:

    http://localhost:8080/

    (ie: /directory, /opengis-xls, etc etc, depending on the web app you deployed.)


    Friday, April 10, 2009

    Setting up Dual Boot Ubuntu / Windows OS-

    Setting up Dual Boot
    Im setting up a dual boot OS at work. This is a mixture of Windows XP and Ubuntu .... or to be more precise Xubuntu as its Ubuntu with an XFCE4.4 Windows Manger. What follows is some of the stuff that Ive learnt as Ive gone along.

    Partitioning / Mounting / Un-mounting
    After installing everythign one of the things I needed to do was set up some mounts for the partitions. I ended up with the following partitions on a 300Gig Hard Drive:

    1. 50 GB Windows NTFS Partition - Windows XP OS installed on this. Having 50GB meant that not only could I put the OS there but Id have a good 45GB left over to install various apps there (ie: development tools for my job)
    2. 48 GB Linux / XUbuntu ext3 Partition - this was the XUbunut OS install partiton which was done with the same ideas in mind as the Windows one above. ie: enough to instal lthe OS and then have another 45GB of free space left over to put all my bits and bobs in.
    3. 2GB Linus Swap Partition - The reasons I used the odd 48GB above and not 50GB was so tyhat I could assing 2GB to swap space (this was on the advice of my works MIS department so who am I to argue with people who do this for a living :-) )
    4. 200GB NTFS Partition - So what was left was 200GB of space which I formatted as NTFS filesystem and am going to use this as my data storage area. ie: an area that will be accessible by both Windows and Linux and will be where I store data in. Applications will be run from the OS partition but storage will occur here and hence the largish 200GB partition.
    So I now had to set this up. The actual partitions where set up during the installation of Ubuntu but as I logged in I noticed that all I could see was the 48GB Linux partition. Hmmm....I used a tool called GParted:

    sudo apt-get install gparted

    which is able to provide a graphical view of the partition and allow you to mount/unmount etc. On start up this tool complained that it couldn't mount two partitions called 50GB Volume and new Volume respectively.

    So first I had a look at the /etc/fstab and /etc/mtab files. These show the volumes to auto mount on startup and the volumes currently mounted an in these cases neither one had my missing partitions.

    Next I attempted to mount the storage data partition figuring that since it was empty I was less likely to cause any damage if I did something wrong. I wanted to see what my partitions were called and any other info about them so had a look at :

    ls -la /dev/disk/by-uuid/
    ls -la /dev/disk/by-id/
    ls -la /dev/disk/by-label/
    ls -la /dev/disk/by-path/


    which allows me to see what the partitions are named that are available. Well it turns out my partitions are at:

    /dev/sda1
    /dev/sda2
    /dev/sda3
    /dev/sda4


    with the sda1 and 2 being my windows and data partitions. Okay. So next i attempted to do:

    mkdir /mnt/windows
    mount /dev/sda1 /mnt/windows

    to show myself that yes, I can actually mount the directory. At this stage I was ready to update the /etc/fstab file so that in the future my partitions where auto-mounted. My addition to the fstab file was as follows (the following is a cat /etc/fstab with the last few lines being the new ones):


    # /etc/fstab: static file system information.
    #
    #
    proc /proc proc defaults 0 0
    # /dev/sda4
    UUID=fffe5c7d-2046-4254-a5b5-5433508d4732 / ext3 relatime,errors=remount-ro 0 1
    # /dev/sda3
    UUID=725ec9c9-88a9-45f3-a7b9-01a96db36c64 none swap sw 0 0
    /dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
    #
    # /dev/sda1 and /dev/sda2 are both ntfs FS's with them being windows boot partition and 200Gig data store respectively
    # - could also use LABEL=DATA cos ive set the LABEL to DATA for /dev/sda2 using ntfslabel, ie: ntfslabel LABEL DATA
    # - blksize=4096 is added to the end by default when mount -a is run
    # - sda1 uses type ntfs and ro so that the windows partiton can be read but not written to (for safety there should be no reason to write to it)
    # - sda2 uses type ntfs-3g and rw so that the data partition can be written to and it also becomes fuseblk on mount -a (which is default and normal)
    # - Note: the idea is windows and linux partitions can write to the /mnt/data partition BUT not to each other, hence ro and rw options
    # - not sure about relatime use (perhaps atime with its performance hit would be better)
    #
    /dev/sda1 /mnt/windows ntfs auto,nodev,exec,suid,ro,user,uid=mkopka,gid=mkopka,allow_other,utf8 0 0
    /dev/sda2 /mnt/data ntfs-3g auto,nodev,exec,suid,rw,user,uid=mkopka,gid=mkopka,allow_other,relatime,utf8 0 0
    #


    with the last two lines being the important ones that perform the mount. The comments provide info on what the options mean and why I selected them/

    And there you go, I have now got auto mounted partitions. By running:


    sudo mount -a


    I was able to now mount the two new partitions.