Installing Sphinx

  • Digg this article
  • Sphinn this article
  • Stumble this article
  • Facebook
  • del.icio.us
  • LinkedIn
  • Twit this article

Tuesday, 27 January 2009

On Ubuntu Intrepid, this will get you Sphinx for rapid super-fast full-text searching.

sudo apt-get install libmysqlclient15-dev
wget http://www.sphinxsearch.com/downloads/sphinx-0.9.8.1.tar.gz
tar -xzvf sphinx*.gz
cd sphinx*
./configure
sudo make
sudo make install

sudo gem install ultrasphinx

Tested and works ok

More here

Note about Ubuntu Installs

Had a bit of a problem with installing this on Ubuntu, RAKE just couldn't find the inspector and searchd binaries.

Found a way to fix this by configuring it like....

./configure --prefix=/usr/local/sphinx

Then doing the usual make and make install, but creating a symlink afterwards with

ln -s /usr/bin /usr/local/sphinx/bin

And then added a path to my .bashrc file, probably overkill after the first bit but got it working.

nano ~/.bashrc

Then adding...

PATH="$PATH:/usr/local/bin"
PATH="$PATH:/usr/local/sphinx/bin"
Missing Programs?

Note, if you're logged in as a normal user some system commands like smartctl will return command not found even though you know you installed them.

Just use sudo at the start and they should be found and run.

rubygems and .bash_profile

  • Digg this article
  • Sphinn this article
  • Stumble this article
  • Facebook
  • del.icio.us
  • LinkedIn
  • Twit this article

Wednesday, 31 December 2008

Quick note

If you're on Debian Linux, add this to your .bash_profile so rubygems gets loaded in your environment and is available in IRB and Require 'gem' calls

export RUBYOPT=rubygems

Save, reload and you should be fine.

Seems less an issue on OSX and Ubuntu but causes a problem on Debian Etch.

More here

Linux Package Commands + Wajig

  • Digg this article
  • Sphinn this article
  • Stumble this article
  • Facebook
  • del.icio.us
  • LinkedIn
  • Twit this article

Saturday, 20 December 2008

Aptitude or Apt-Get

Was asked this recently, as far as I know the only core difference is Aptitude has a better way of handling dependencies when you remove a package; cleans up better. In all you should try to switch to Aptitude where possible, if you've installed a package with Aptitude then when you remove it via Aptitude it'll know about any dependencies it has to check for or orphaned packages.

Update and Upgrade
apt-get update
apt-get -u upgrade

aptitude update
aptitude safe-upgrade
Install Package
apt-get install gedit
aptitude install gedit
Remove Package (keep config files)
apt-get remove gedit
aptitude remove gedit
Remove Package Completely
apt-get --purge remove gedit
aptitude purge gedit
Upgrade Package
apt-get install gedit
List Possible Upgrades
apt-get upgrade gedit
Show Package Info
dpkg --info gedit*.deb | less
List All Packages
dpkg -l
Check if Package install plus Info
dpkg -l | grep -i 'gedit'
List files owned by package
dpkg -L gedit
List files inside Package
dpkg --contents gedit*.deb
Find out who owns this Package
dpkg -S /bin/netstat
Check if Package installed and it's Status
dpkg -s gedit| grep Status
Show Dependencies for a Package
apt-cache depends mysql-server
Wajig

Wajig is a Linux tool that combines a lot of the abilities within apt-*, aptitude and dpkg into one command. Written in Python it handles normal users and super-user privileges & can be installed with...

apt-get install wajig
aptitude install wajig

More info here

Installing Memcached on Debian Etch

  • Digg this article
  • Sphinn this article
  • Stumble this article
  • Facebook
  • del.icio.us
  • LinkedIn
  • Twit this article

Tuesday, 02 December 2008

Unfortunately this takes a bit of work, the one in the etch repositiories is too old so you're going to have to build you're own sources and install manually.

Add Repository / Increase Cache Limit

So first off add the testing repository to your list of sources

cd /etc/apt
sudo nano sources.list

Then add the testing repository (here for the UK) and save the file

deb-src http://ftp.uk.debian.org/debian/ testing main

Now before you update your sources list increase the size of the package cache by,

nano /etc/apt/apt.conf

And add,

APT::Cache-Limit "16777216";

...now when you update your packages cache you shouldn't get an out-of-space error, finally update

sudo apt-get update
Build Packages

First create & move to your sources dir

mkdir /sources
cd /sources

Next grab the tools needed to compile the sources

sudo aptitude install devscripts

Next we'll check if we need anything extra for libevent

sudo apt-get build-dep libevent

And grab & build the libevent source

sudo apt-get source libevent
cd libevent-1.3e
sudo debuild -us -uc
cd ..

Then install libevent and it's development package

sudo dpkg -i libevent1_1.3e-3_amd64.deb
sudo dpkg -i libevent-dev_1.3e-3_amd64.deb

Next we'll test if there are any build dependencies for memcached

sudo apt-get build-dep memcached

Then grab & build the memcached source

sudo apt-get source memcached
cd memcached-1.2.2
sudo debuild -us -uc
cd ..

Finally install memcached

sudo dpkg -i memcached_1.2.2-1_amd64.deb

You should now have a working install of Memcached 1.2.2 on Debian Etch.

Tomorrow...

  • Digg this article
  • Sphinn this article
  • Stumble this article
  • Facebook
  • del.icio.us
  • LinkedIn
  • Twit this article

Saturday, 02 August 2008

The Joker

Well after a lot of research and hard work the server's ready to drop off at colocation. There's still some grey areas but in all everything looks ready to go, better off there and running than sitting it home waiting.

So tomorrow I'll be driving down to RapidSwitch in Slough to drop it off, after which Michelle wants us to visit her grandparents who live in Farnborough; not far off from the facility.

Here's a quick rundown of the spec:

  • O/S: Debian Etch 4.0 64-bit
  • HDD: Software RAID 1 - 1TB
  • MEMORY: 4GB Corsair
  • CPU: AMD AM2 2+ghz
  • BANDWIDTH: 3TB per month

Bit of a step up from the virtual server environment I get from SliceHost, but fingers crossed it should all go fine; had so much fun putting it together already planning the next incarnation ;-)

P.S.

Dark Knight is really really good, Heath Ledger has pulled off such a believable and terrifying character; have to see it again.

Update

Just got back from her grandparents; boy do they know how to cook a sunday lunch, lovely couple.

Server's online, it's stopped resyncing the raid drives thankfully, was a little worried about that but everythings loaded running and operating well.

Cat sitting next weekend, let's hope mickey isn't in one of his moods ;-)

All the best, have a great week people.

Debian Hopes

  • Digg this article
  • Sphinn this article
  • Stumble this article
  • Facebook
  • del.icio.us
  • LinkedIn
  • Twit this article

Sunday, 27 July 2008

With all these problems, and the need to have the homegrown server running something stable I've decided on Debian Stable for the re-install. I'll be doing this with backports as that way I can at least grab the latest releases without damaging the core stable system; as it'll be sitting in colo I really don't want to drive down there every weekend to kick it back into gear.

Debian can be grabbed from here, note most people have never needed anything but the first dvd or first one or two cd iso's for a basic install so no need to grab everything.

Backports are available here, this at least gives the ability to keep up to date with more specific packages while not damaging the core system.

Fingers crossed this should be the final time I do a rebuild before it goes to colo.

[update]

server running a lot better, since I made the switch to Debian; won't be long now till it's taken down to colo.