-
Installing Solr on Ubuntu Jaunty 9.04
Posted on August 20th, 2009 11 comments
Solr install success on Ubuntu Jaunty 9.04
I just installed Apache Solr on Ubuntu Jaunty 9.04. I am not a Java or Tomcat person, so it was all rather new and a confusing, there was no good install guide and I hit a few walls, so here are some pointers that should get you to a working install.
I am using the command-line install method, so it’s works for desktop and server editions. You can skip the apt-gets and use Synaptics Package Manager to install the packages if you prefer.
1) Install Java
sudo apt-get install sun-java6-bin sun-java6-demo sun-java6-jdk sun-java6-jreI believe the default install of Jaunty installs openjdk java, so you will want to make sure that Sun Java is chosen:
sudo update-alternatives --config javaYou will prompted to pick a version as the default:

Select the Sun Java version
Edit /etc/profile to sent the JAVA_HOME environment variable:
JAVA_HOME=/usr/lib/jvm/java-6-sun
export JAVA_HOME2) Install Tomcat
sudo apt-get install tomcat5.5 libtomcat5.5-java tomcat5.5-admin tomcat5.5-webappsCheck that Tomcat is running:
sudo service tomcat5.5 statusGrant yourself Tomcat Manager and Admin permissions; edit /usr/share/tomcat5.5/conf/tomcat-users.xml and include the following:
<user username="myname" password="mypassword" roles="admin,manager"/>3 Install Solr
sudo apt-get install solr-common solr-tomcat5.5 libxpp3-java(I kept getting “java.lang.NoClassDefFoundError: org/xmlpull/v1/XmlPullParserException at java.lang.Class.forName0(Native Method)” in the Solr admin page; a little searching led me to find that the problems was that libxpp3-java was not installed. Why it’s not a required package, I don’t know!)
4) Restart Tomcat and Test Solr
sudo service tomcat5.5 restartNow you can go to the Tomcat web admin page at http://localhost:8180/ and login with the credentials you supplied above.
Go to http://localhost:8180/solr/ and do a test query to confirm it’s working.

Of course you will get zero results, you have no content indexed yet.
That should be enough to get started!
-
Cal Henderson “Why I Hate Django” Djangocon 2008
Posted on July 21st, 2009 1 commentI confess: I am a tech talk junkie. I often have some tech talk running on my desktop computer while I am working on my laptop, or watch one on my mobile phone while I am stuck in Bangkok traffic.
But this… this tech talk is a masterpiece. It’s geeky. It’s techy. It’s educational. It’s sarcastic. And, if you are a geek, it’s side-splitting funny. I laughed, I cried… I learned.
Warning: Ruby developers: you will be made the brunt of many jokes.
Highlight: Non-Ruby developers: Smug Ruby developers will be the brunt of many jokes.
Even if you are not into Django, it’s a great talk on scaling web apps and it’s f’ing funny too.
And Cal, if you are ever in Bangkok… I am buying, let’s go out for a drink: on me.
-
Tidy Up Your XML in Vim
Posted on June 13th, 2009 1 commentYou have some nice, compact XML, the kind without whitespace or newlines, like this:

Not easy to read. OK for computers to crunch–but if you want to get an idea of the document’s structure at a glance or do some editing–well, you might want it formatted a little nicer.
So let’s use Tidy to clean it up–all from the comfort of your Vim session…
(You could also use xmllint–your choice–depends on what you have installed and what you prefer.)
You can execute a shell command from Vim by typing:
:!Then to tidy up your XML run tidy with the following options:
tidy -mi -xml -utf8“-im” means indent and modify the original file; “-xml” means, you are dealing with XML and “-utf8″ is optional, it means “use UTF-8 for both input and output” so you’ll get readable characters instead of encodings if you have umlats or grave symbols.
You can see all of tidy’s formatting, encoding and other options by typing
tidy -hSo the whole command we type into Vim is:
:! tidy -mi -xml -utf8
You will drop to shell while the command executes:

Hit “return” when you are done and then Vim will ask if you want to reload the file:

And there you go, beautifully formatted HTML to read!

Enjoy
! -
Google Chrome Changes the Game: The Browser as Platform
Posted on September 2nd, 2008 1 commentGoogle announced their new browser named “Chrome” today. Check out the blog post and, better yet, the Google Chrome comic book.
The platform wars just moved from the OS to the browser and Google took a commanding lead.
Rather than re-write everything, allow me the luxury of re-purposing my Tweets:
- Chrome is all open source. They have made the world their R&D department. Brilliant.
- Chrome just increased the importance of Javascript dramatically. They launched a platform where Javascript is the dominant language.
- Google just moved the development platform to the browser. The OS just took a backseat
- If MS was afraid that Google had them in the Search Engine Market, they should be shitting themselves about now about the browser market.
- Chrome will set the bar for what people will expect in a web browser.
- Google didn’t have to reinvent the OS; they just had to build the best browser that could run on any OS.
- Automated testing against google’s vast index of web pages is a stroke of brilliance for stability testing a browser.
- Chrome should solve the biggest annoyance I have with my browser: better memory management so I don’t have to restart my broswer 3X daily.
- Chrome is privacy-oriented. That’s a good thing.
- The name is very toungue-in-cheek: chome is a refernece to the UI for an application, Google wants Chrome to be the UI for the user’s web experience.
- This is the biggest architectural leap in computing in a long time.
Google has just moved to the forefront of the Browser wars and will force the competition to keep up. They have the brand recognition, industry leverage and exposure to get their browser installed in a LOT of computers.
Oh–an it’s also built on the same engine that the Android mobile browser will run on.
Mark my words: Google just changed the game on the web. Chrome is the lever they use to move the world.
-
Quick Video on Building Flex Apps
Posted on September 1st, 2008 No commentsI just saw this brief video on how to build a Flex app on the Adobe website. It’s pretty impressive!
-
Tackling Scalability Issues
Posted on July 9th, 2008 1 commentIf you a techie kind of person and if you have ever had ambitions to build a large-scale website, you have thought to yourself “how can I make this scale really big?”
Well, the guys at YouTube have been through the drill. Here is a great video by Cuong Do, one of the founders of YouTube and the guy in charge of making YouTube scale, about how they managed to scale YouTube.
Yeah, there are some architectural decisions you can make up-front that will make scaling a website easier, but, after watching this video about the scalability challenges YouTube faced, I realized that:
- Scalability is all about managing bottlenecks. You watch for them forming, you deal with them before they become a problem.
- Improving performance in parts of the system that are not bottlenecks does very little good.
- The problems you get are almost never the problems you plan for.
- Plan, but don’t over plan. See what happens and adapt.
I have become a huge fan of the Google Tech Talk videos and tech videos in general on Google Video and YouTube. I have started to download them and load them on to my iPhone (how to do that is a future blog post itself) and I find myself watching them whenever I am in the subway, in a taxi or have a few minutes to kill. They are a great way to get a healthy dose of new knowledge fast and if you have them on the iPhone, you can get that dose in those random periods of downtime that would otherwise be wasted time.
-
Tuning LAMP Systems
Posted on June 29th, 2008 No commentsI have been on a website performance and scalability kick lately. I thought I would share some articles I have enjoyed on the topic.
IBM Developer Works has a nice little two part series on Tuning Lamp Systems (pt 2).
Then again, IBM Developer Works often has some awesome articles. Scan it regularly if you can!
Enjoy!
-
Are You Tweeting About Me?
Posted on April 9th, 2008 1 commentDo you have the feeling that people you are not following on Twitter are talking about you or even trying to @message you but the messages are not reaching you because you are not following them?
Do you even care?
Well, if you do care, here is a simple solution to seeing who’s tweeting about you. Use the Twitter Track feature and track your user name! On Twitter I am jfxberns so I would use the following command to track my user name:
track jfxberns
Now, any time somebody’s tweet has jfxberns in it, I see it on my Twitter client. Pretty handy!
If you want to see who’s tweeting about you–just track yourself.
track yourusername -
Drupal Modules: Rank, Rate, Review at DrupalModules.com
Posted on April 8th, 2008 No commentsI usually don’t get all gooey and gushy when I write up a website, but this is one I like a lot: DrupalModules.com built by John Forsythe.
DrupalModules.com does a great job of taking the list of Drupal Module (which was nothing more than a raw information dump on the Drupal site) and wrapping it with a smattering of practical community features and thereby turning it into an extremely useful resource for Drupal developers.
It’s not only the site itself that shines, the people that use it are doing a bang-up job with the information they are contributing. The reviews are generally well written, they give examples of how people have used the modules in real life to solve problems and they link to other off site resources (examples of the module in action, tutorials) that help clarify what the module can do and how it does it.
In comparison, Drupal.org lists the modules and has a short blurb–usually written by the maintainer who, even though he knows the module the best, often does a terrible job explaining the modules capabilities and uses. Lots of data, not much information.
DrupalModules.com is a big step forward.
By the way, John has also developed a nifty search engine for sifting through the Drupal code base appropriately called DrupalCodeSearch.com.
-
TinyURL-like Module for Drupal – Tweeters Take Note!
Posted on February 29th, 2008 2 commentsJust ran across a nifty little module for Drupal called Knurl.
“Knurl is a module that provides a URL shortcut and redirection service similar to TinyURL or TightURL.”
Every time I see a short URL I think: hey, there is something that can can be sent on Twitter. Or by SMS. Seems like this would be a great module for somebody that wanted to interface to send messages via Twitter the Twitter API or SMS news.
This module will be rattling around the back of my mind until I come up with a way to use it.





