Installing Razuna Standalone on Debian Lenny

Basically I had to install Razuna for the Monash Pharmaceutical  crew to test it out as a Digital Assets Manager for their Pharmville project.

I am doing this on my Debian server and I don’t want to play around with Debian’s Tomcat 5.5  install as I am not a Java head and never have much luck with it 🙁 I will just install Java and the stuff needed to run the Stand Alone Version of Razuna from the download page on the Razuna website.

These software packages are required to get Razuna up and running so a bit of apt-get action is needed..

1. Java 1.6 Runtime Env
2. Install ImageMagick
3. Install FFMpeg
4. Install Exiftool
5. Install Ghostscript

On Debian or Ubuntu its just a matter of doing this as root or with sudo..

#apt-get install imagemagick ffmpeg libimage-exiftool-perl ghostscript sun-java6-jre

So yeah now set your JAVA_HOME which on Debian and Ubuntu I usually modify the /etc/profile file to include the following somewhere after the export PATH. I do this so JAVA_HOME is available globally. I mean unless your being very strict on your permissions why not?

JAVA_HOME=”/usr/lib/jvm/java-6-sun/”
export JAVA_HOME

Anyway best to make that live with the source command…

# source /etc/profile

Now I unpacked the zipped up file from the Razuna website and changed directory to the tomcat/bin directory. When I unzipped mine I had to chmod the .sh files in tomcat/bin so I could start up the Tomcat server with the startup.sh script.

# ./startup.sh

And that was pretty much it to get Razuna going. I did hit one last little Gotcha which on Debian Lenny required me to update the server.xml file in the tomcat/config directory.

I had to locate the following line and make sure that the docBase=”/razuna/assets/”  value had the full path to the Razuna assets  directory that I had unzipped.

<Context path=”/assets” docBase=”/razuna/assets/” crossContext=”false” debug=”0″ reloadable=”true” />

Razuna looks really good too for those with lots of Digital Assets to manage. I am going to run some benchmarks on it. I will blog about that at some point.

Cannot delete or update a parent row: a foreign key constraint fails

Problem deleting data with FOREIGN KEY constraints in MySQL….

Ah yes. Your working on that system that uses the MySQL FOREIGN KEY constraint on some tables.

You want to truncate a table but get an error message because you have already truncated the data in the related table.

“Cannot delete or update a parent row: a foreign key constraint fails”

Fear not you can disable the constraints in the mysql shell…

mysql> SET foreign_key_checks = 0;
mysql> TRUNCATE some_table;
mysql> SET foreign_key_checks = 1;

Think Before You SymLink

I was recently working on moving some PHP software from one server to another for a client of mine and ran into a spot of trouble.

The previous developer that was maintaining the software and the “production” environment is a mate of mine so I won’t bag him too much in public, although he knows who he is and the pain he caused me .. lol ^_^

Anyway suffice to say the move did not go 100% according to plan. Even with many years of experience deploying websites and running Linux servers, I was not really ready for what I was about to face.

You see I originally installed this Debian server many moons ago (back in the day when Q-mail Rocks was the set up to have) and in good Virgo fashion I left it in a very nice and ordered state in the hands of my mate. The server subsequently had a couple more guru Linux cooks brew a few concoctions up on it.

Anyway the point of all this drivel is that my mate and the other cooks in their infinite wisdom had decided that the humble symbolic link was the weapon of choice to ensure proper and extensive (and I mean extensive) “code reuse”.

Let me tell you it was like moving a house of cards from one table to another.  In there were symlinks that linked to other symlinks which in turn were symlinks to development files. WTF???

There were image directories that had symlinks to other image directories which in turn had symlinks back to the original image directory. You should have seen the size of the tar files it was trying to create! Anyway lets just say an accurate description would be a bowl of spaghetti crossed with a spider web made by mr crack spider.

I am still finding missing symlinks but have since found this cool bit of code that re-curses through the directory tree and finds all the broken symlinks.. yay!!

for i in `find ./ -type l`; do [ -e $i ] || echo $i is broken; done

Anyway there are plenty of better ways to re-use code kids. Symbolic linking is not really the most maintainable option!

Think before you symlink!

pushLMS

pushLMS as bold as the name suggests  is an attempt at developing a type of Learning Management System.

pushLMS is the name of a new project I am working on with the crew at OSVR, Monash University Pharmacy and Pharmaceutical Sciences and Victoria University.

Combining Virtual Worlds like Open Simulator and Second Life with some PHP software written using the cakePHP MVC framwork, we are creating what could be called “Virtual Education Environments” in the form of assessment for the Students.

We aim to eventually make it open source (well that is what OSVR is about) and I will no doubt blog a bit more about this as the software develops.

More info on this project can be found at the pushLMS google blog for now.

Return top