Archive

Archive for the ‘Tech’ Category

Broadband Migration

July 15th, 2011 No comments

We have moved our internet provider & phone line from Virgin Media to BT Broadband. Thankfully it has been relatively painless, especially as it also knocks out the TV. Rough summary of what needed to be done:

  • Disconnect old router.
  • Connect the new router to the phone line.
  • Wait for router to connect to the internet.
  • Connect laptop to wireless network
  • Browse to the router admin menu and change:
    • Admin password
    • Subnet Address & Router address
    • Wireless password & Wireless Network Name
  • Connect up all wired connections
  • In router admin change:
    • Set all node names and fixed IP addresses
    • Add port forwarding for 5060, 10000-15000, 80 & 443 to server
    • Configure DynDNS
  • Any other wireless devices (Macbook2, Squeezebox) update Wireless config.
Categories: Computers Tags:

Composter

July 12th, 2011 No comments

Trames (French Edition)

by Iain M. Banks [ROBERT LAFFONT]
Rank/Rating: /-
Price: $59.50

Good Ideas 7-Cubic-Foot Compost Wizard Jr.

by Good Ideas Inc [Good Ideas Inc]
Rank/Rating: 1186/-
Price: $119.98

Surface Detail

by Banks [Orbit]
Rank/Rating: 4611117/-
Price: $15.24

Good Ideas 7-Cubic-Foot Compost Wizard Jr.

by Good Ideas Inc [Good Ideas Inc]
Rank/Rating: 1186/-
Price: $119.98

Categories: Website Tags:

Macbook Re-install

April 29th, 2011 No comments

Probably going to do a clean install of our macbook, upgrading to Mac OS 10.6.3. Need to re-install:

  • Onyx – Optimisation Utility
  • Mythtv – Media Front end
  • Firefox & Chrome – Browsers + Adblock (Plus V 1.3.6 – easy list
  • X-Tools & X Windows
  • OpenOffice
  • VLC – Media Player
  • Picasa / iPhoto – Photo Organisers
  • BBC iPlayer Desktop
Categories: Computers Tags:

MythTV Upgrade 0.24

April 6th, 2011 No comments

Pre-server upgrade, need to upgrade MythTV, just as I got used to svn, MythtTV has moved to github. Will work out how to do patches later (see Using Git guide, for now grab a snapshot tarball:
wget --no-check-certificate https://github.com/MythTV/mythtv/tarball/v0.24

Make a clean copy. Then on the server and all clients take a copy of the latest revision in /home/mythtv/XXXXX.

Shutdown all clients and the backend using /etc/init.d/mythbackend stop, stop any cron job that auto starts the backend.

On server backup myth database as described on the MythTV Wiki using mythconverg_backup.pl.

Create the new version of MythTV: Run the previous configure recorded in config.log, updated as appropriate. Run make.

Finally shutdown all clients and the backend again. Ensure any local modifications to myth are in ~/.mythtv (i.e. mysql.txt and any menu modifications).

Remove any copies of mysql.txt (/usr/local/share/myth/mysql.txt & /var/run/mythtv/.mythtv/mysql.txt).

  1. cd XXXXX/mythtv
  2. make install
  3. rm /usr/local/share/mythtv/mysql.txt
  4. rm /var/run/mythtv/.mythtv/mysql.txt

Usually a good idea to run mythtv-setup, on macbook start X11, run:

  1. xhost lofty
  2. ssh lofty
  3. su mythtv
  4. DISPLAY=macbook:0
  5. export DISPLAY
  6. mythtv-setup

Restart the server using /etc/init.d/mythbackend start. Check database is upgraded okay, check detected all tuners, listings, recordings and videos. Restart the client and check it is working (live TV, recordings and videos).

Always worried that we are bringing a lot of incorrect settings and unwanted orphan database guff. We could now create a new mythconverg database using the mc.sql file. Restart the backend pointing at the new database, this will populate with working defaults. Run mythtv-setup to add tuner cards, listings provider and channels. Run mythfilldatabase to get listings. Restart client and set up appropriate Video Playback Profile, check live TV works. Import videos, music and photos. Import old database tables – previously recorded programs (oldrecorded), current recordings (recorded, recordedprogram & recordedseek), and supporting tables: (recordedrating, recordedcredits, people, credits).

Once successful, install mythweb on the server:

  1. mv /var/www/htdocs/myth /var/www/htdocs/myth21
  2. cp -R mythplugins/mythweb /var/www/htdocs/myth23
  3. ln -s /var/www/htdocs/myth23 /var/www/htdocs/myth

Git Useful links

Getting MythTV from Github

First install and configure git:

  1. emerge –ask –verbose dev-vcs/git
  2. git config –global –add push.default nothing
  3. git config –global –add push.default tracking
  4. git config –global user.name "Your Name"
  5. git config –global user.email you@example.com

Grab a copy of the repository and swap to the fixes branch:

  1. git clone git://github.com/MythTV/mythtv.git
  2. git checkout fixes/0.24

There does not seem to be a simple method of tracking what revision you have in git? Proposed upgrade process:

  • Take a copy of the installed source cp -r mythtv mythtv_installed
  • Review changes since this build git short-log HEAD..???
  • Get the latest version of the code git pull
Categories: Computers Tags:

Commissioning New Server (Again)

March 29th, 2011 No comments

Time to upgrade the server again, getting numerous failures, so need to re-install the whole system…

Quick Overview of Steps to Commission the Server:

  1. Burn Gentoo 2011.0 Minimal CD, and boot server using it.
  2. Partition Hard Disk
  3. Device      Boot    Start         End      Blocks   Id  System      Mount
    /dev/hda1   *           1           7       56196   83  Linux       [/boot]
    /dev/hda2               8          70      506047+  82  Linux swap  [swap]
    /dev/hda3              71         800     5863725   83  Linux       [/]
    /dev/hda4             801        9729    71722192+   5  Extended
    /dev/hda5             801        1530     5863693+  83  Linux       [/mnt/portage]
    /dev/hda6            1531        2260     5863693+  83  Linux       [/home]
    /dev/hda7            2261        2869     4891761   83  Linux       [/mnt/root]
    /dev/hda8            Remainder                                      [/shared/]
    
  4. Follow Gentoo Installation Instructions

  5. Use backed up files from old installation as reference to various steps in the Gentoo install guide (/etc/conf.d/*, /etc/fstab, /etc/make.conf, and so on).

    Ensure kernel has support for all filesystems ext2/3, xfs, nfs server. Ensure drivers built for all key components (use lspci -v to get key ones), correct CPU is chosen, hardware sensors and CPU powersaving.

    Copy across all /etc/portage files before emerging the following packages.

Once complete will have the following services running:

  • apache2
  • asterisk
  • dahdi
  • lm_sensors
  • local
  • mysql
  • mythbackend
  • net.eth0
  • netmount
  • nfs
  • nfsmount
  • ntp-client
  • ntpd
  • sshd
  • syslog-ng
  • udev-postmount
  • vixie-cron
  • xinetd

Use /usr/lib/portage/world as a guide as to what packages to install.

Top level services that need to be installed:

  • MythTV Backend
  • Apache Web Server
  • Asterisk PBX
  • Squeezebox Server
  • MySQL Database

Key components to support the above:

  • LinuxTV V4L-DVB
  • DAHDI

Order of Installation:

Utilties

  • syslog-ng
  • vixie-cron
  • gentoolkit
  • logrotate
  • vim
  • ntpd & ntp-client
  • ssmtp

Hardware Control

lm_sensors – follow installation instructions and install appropriate modules
CPU Frequency control – Use kernel modules if possible, explore /sys/devices/system/cpu/cpu0/cpufreq/

NFS Exports

Install and restore exports file from backup, TODO: Check for portmapper/rpcbind.

  1. emerge –ask nfs-utils
  2. cp /backups/exports /etc/exports
  3. /etc/init.d/nfs start
  4. rc-update add nfs default

Mysql

  1. Install the server: See the Gentoo Docs
    1. emerge –ask mysql
  2. Update /etc/mysql/my.cnf based on previous tweaks (Mark updates with comments!)
  3. Start the server:
    1. rc-update add mysql default
    2. /etc/init.d/mysql start
  4. Import user privileges using this useful script:
    1. mygrants()
    2. {
    3.   mysql -B -N $@ -e "SELECT DISTINCT CONCAT(
    4.    'SHOW GRANTS FOR ''', user, '''@''', host, ''';'
    5.    ) AS query FROM mysql.user" | \
    6.   mysql $@ | \
    7.   sed 's/\(GRANT .*\)/\1;/;s/^\(Grants for .*\)/## \1 ##/;/##/{x;p;x;}'
    8. }
  5. Import ‘working’ copy of various databases (asterisk, mail & mythconverg).

Asterisk

See the previous post on Asterisk upgrade.

Also install the latest phpagi

Install sox for increasing gain on voicemail.

Get British audio from Enicomms, put in /var/lib/asterisk/sounds/en_GB

Apache

Install as per Gentoo instructions, and restore backed up www files. (including .htaccess). TODO:

  1. emerge apache
  2. emerge php
  3. /etc/init.d/apache2 start
  4. rc-update add apache2 default
  5. cp -r /backups/www /var/www/localhost/htdocs/
  6. htpasswd -c /var/www/localhost/htdigest username

Download and install, and configure useful tools:

Copy across bespoke tools:

  • Asterisk Manager
  • Share Research

Mythtv

Only really need backend support, but still need all the dependencies, so get portage to add them all. Ensure version we want is enabled in portage, update package.keywords

echo "media-tv/mythtv ~x86" >> package.keywords
emerge --onlydeps --ask mythtv
emerge --noreplace mythtv

Restore /root/.mythtv settings.

Also need xmltv for listings, with imdb support:

emerge --ask xmltv
tv_imdb --download --imdbdir /shared/imdb --prepStage all

Kernel Drivers if possible:

Copy backed up udev rules to ensure known adapter names. cp backups/etc/11-dvb.rules /etc/udev/rules.d/11-dvb.rules

Other Bits n Bobs

  • ctorrent – For downloading torrents
  • lftp – For website backups
  • netkit-ftpd & xinetd – For FTP access
  • dvd+rw-tools – For Backup to DVD
  • git – For access to MythTV repo
  • svn – For access to WordPress repo
  • hdparm – For shutting down drives
  • xfsutils – For xfs maintenance
  • xpdf – To support research note download
  • ethtool – In support of Wake-on-LAN
Categories: Computers Tags:

Media Server Power Consumption

March 23rd, 2011 No comments

Weighing up the pros and cons of upgrading various components, try and capture what we have:

Motherboard –
CPU – AMD Athlon
PCI – Hauppauge Nova-T
PCI – Twinhan
PCI – Nvidia VGA
PCI – Digium Analogue Telephony Card with 1 FXO [5W max]
USB – Hauppauge Nova-T Stick
IDE – HDD
IDE – HDD
IDE – HDD
Fan – 120mm
Fan – 120mm
PSU –

New Server

ASUS P5ND2-SLI Power Consumption 150W(idle) – 220W(load) [1] Manual [pdf] – Manual states power range from 500W to 350W (system consumption) 17 to 25A on the 12V line.

Processor installed is a Pentium 4 with HT support [1], support EIST, max TDP of 85W.

Categories: Computers Tags:

Asterisk Upgrade

October 12th, 2010 No comments

The server is running Gentoo, which will by default only install Asterisk 1.2. Unfortunately it is not obvious that this supports the more up to date dahdi drivers required for the Openvox A400P card that I need to install.

I also could not find anything on the web to recommend a stable version of Asterisk, so I just install the latest ebuild available. To enable installation of dahdi and Asterisk with mysql cdr support I did the following:

  • Save my /etc/asterisk configuration files
  • Save the content of /var/lib/asterisk/agi-bin
  • Update /etc/portage/package.use to enable dahdi support in Asterisk:
    net-misc/asterisk-addons mysql
    net-misc/asterisk dahdi
  • Enable the installation of the latest Asterisk packages, by adding the following to /etc/portage/package.keywords
    net-misc/asterisk-addons ~x86
    net-misc/asterisk-app_notify ~x86
    net-misc/dahdi ~x86
    net-misc/asterisk ~x86
    net-misc/asterisk-core-sounds ~x86
    net-misc/asterisk-extra-sounds ~x86
    net-misc/asterisk-moh-opsound ~x86
    net-misc/dahdi-tools ~x86
    net-libs/libpri ~x86
  • Remove the conflicting version of asterisk-addons:
    emerge --remove asterisk-addons
  • Upgrade Asterisk and install dahdi drivers:
    emerge --ask asterisk asterisk-addons dahdi dahdi-tools
  • Use etc-update to upgrade all the /etc/asterisk files, I just overwrote the old versions and manually re-inserted my config, the important files where:
    indications.conf - 'country=uk'
    modules.conf - load => cdr_addon_mysql.so
    extensions.conf - add my macros and contexts
    sip.conf - add my Outbound SIP Registrations and Providers and Devices, configure network domain
  • Add dahdi to init rc-update add dahdi default
  • Load the kernel modules:
    modprobe dahdi
    modprobe wctdm
  • Configure dahdi:
    dahdi_genconfig
    echo "#include dahdi_channels.conf" >> /etc/asterisk/chan_dahdi.conf
    /etc/init.d/dahdi start
    /etc/init.d/asterisk restart
  • Restore the content of /var/lib/asterisk/agi-bin
Categories: Computers, Website Tags: , ,

Mr. Men Plugin

September 8th, 2010 No comments

I quickly hacked together a WordPress plugin to help friends and family keep track of which Mr. Men books Henry has in his collection. The code is in a pretty ropey state and does not take advantage of all the new WordPress plugin API’s but thought it worth making available in case anyone wants to take it further.

Although it’s called ‘Mr. Men’ wishlist plugin it will take any list of books/CD’s available through Amazon and create a simple tiled array of covers. I grabbed the images and amazon reference numbers (ASIN) values using a simple perl script that accessed the Amazon Web Services API. However that was a while ago and the API has changed quite a bit since then.

Although I started to make it possible to have multiple wishlists but have not finished writing this bit yet.

Available to download from here: Mr. Men Plugin[zip]

Categories: Website Tags: , ,

MythTV Upgrade 0.21 to 0.23 Fixes

August 12th, 2010 No comments

Bit of a nightmare getting the database schema upgraded, and I am reluctant to throw away all my recording history for the last 7 years. The problem I created for myself is that I misunderstood the wiki page detailing how to remove the database corruption, last time I was considering the upgrade. Basically a year ago I converted the database using the instructions in the guide, upgraded to the latest version of MythTV 0.21 – Fixes and assumed that was it fixed.

Alas MythTV has been inserting latin1 encoded characters into the database ever since, so I have a mixture of encoding methods in the database, options are:

  1. Throw away the database, and somehow import the old recordings, or ditch all my old recordings.
  2. Work out when I did the database fix and somehow convert the latter part of the database into the correct encoding method.
  3. Work out when I did the database fix, ditch everything after that point in time.
  4. Convert the whole database into utf8 encoding using scripts.

So lets try the one with the least amount of manual messing about first! Apparently Mysql will attempt to munge incorrectly encoded characters into the correct encoding format when you insert the data. So based on the advice found at Blue Box Group I took a new backup of the mythconverg database, copied it and changed the encoding type from latin1 to utf8. Using the sed script ‘s/DEFAULT CHARSET=latin1/DEFAULT CHARSET=utf8/‘.

This did not appear to convert the characters, tried lots of combinations to try and convert the database with no great progress. Examining the hex dump of some of the UTF sequences did not seem to make any sense, so I’m taking the view that the data is corrupt.

Next attempt involves simply stripping out all the non-ASCII characters and replacing with ‘?’ characters. Easy to do in vi with something like ‘s/[^ -~][^ -~]*/?/g‘.

This will generate a few problems in that the INDEX’s may now exceed the maximum length, so wherever ‘hostname’ is used as a key in the index change it to `hostname`(20). Additionally there will almost certainly be duplicates in the people table, so I removed the line UNIQUE KEY `name` (`name`(41)) where the people table is CREATED. Had to also change the KEY to the oldprogram table to be PRIMARY KEY (`oldtitle`, `airdate`).

Create a new mythconverg23 database with appropriate user privileges and import the modified database. I wrote a short php script to find and remove all the duplicate people from the people table and to remap the credits entries.

To check this was successful recreate the index on the people table with the sql command: ALTER TABLE `people` ADD UNIQUE (`name` ( 41 ));.

Export the database again, change the encoding back to latin1, and import back into mysql.

mysqldump -u mythtv -pmythtv --opt --skip-set-charset \
  --default-character-set=utf8 --skip-extended-insert \
  mythconverg23  > mythconverg23_utf8.sql
cat mythconverg23_utf8.sql | \
sed 's/DEFAULT CHARSET=utf8/DEFAULT CHARSET=latin1/ \
      s/`hostname`(20)/`hostname`/' > mythconverg23_latin.sql
cat mythconverg23_latin.sql | mysql -u mythtv -pmythtv mythconverg23

Okay see if we can now upgrade the schema…

mythbackend -v all
Categories: Computers Tags: , , , ,

MythTV Upgrade 0.23

August 8th, 2010 No comments

Not convinced my EPIA SP800 will support the latest version of Myth so I will be taking precautions to allow me to revert to my old configuration (0.21 fixes).

Moving to version 0.23 Fixes Branch, so Grab initial SVN copy, see MythTV SVN

svn co http://svn.mythtv.org/svn/branches/release-0-23-fixes/

This can be updated periodically with svn up as required.

Make a clean copy using svn export release-0-23-fixes/ clean-release-0-23-fixes_XXXXX, where XXXXX is the SVN revision. Then on the server and all client take a copy of the latest SVN in /home/mythtv/XXXXX.

Shutdown all clients and the backend using /etc/init.d/mythbackend stop

On server backup myth database as described on the MythTV Wiki using mythconverg_backup.pl.

Rename the database from mythconverg to mythconverg21 and duplicate the database into mythconverg23. Add appropriate permissions for the mythtv user. Update all mysql.txt files (note the one in /var/run/mythtv/.mythtv) to point to mythconverg21.

Create the new version of MythTV: Run the previous configure recorded in config.log, updated as appropriate. Run qmake mythtv.pro and then make.

Finally shutdown all clients and the backend again. Ensure any local modifications to myth are in ~/.mythtv (i.e. mysql.txt and any menu modifications). Copy .mythtv to .mythtv21 and .mythtv23.

Remove any copies of mysql.txt (/usr/local/share/myth/mysql.txt & /var/run/mythtv/.mythtv/mysql.txt). Create a shell script to swap between version of myth.

  1. rm ~/.mythtv
  2. ln -s ~/.mythtvXX ~/.mythtv
  3. cd XXXXX/mythtv
  4. make install
  5. rm /usr/local/share/mythtv/mysql.txt
  6. rm /var/run/mythtv/.mythtv/mysql.txt

Where XX is either 21 or 23, XXXXX is the directory of the source tree for the appropriate version of MythTV.

Restart the server using /etc/init.d/mythbackend start. Check database is upgraded okay, check detected all tuners, listings, recordings and videos. Restart the client and check it is working (live TV, recordings and videos).

Always worried that we are bringing a lot of incorrect settings and unwanted orphan database guff. We could now create a new mythconverg database using the mc.sql file. Restart the backend pointing at the new database, this will populate with working defaults. Run mythtv-setup to add tuner cards, listings provider and channels. Run mythfilldatabase to get listings. Restart client and set up appropriate Video Playback Profile, check live TV works. Import videos, music and photos. Import old database tables – previously recorded programs (oldrecorded), current recordings (recorded, recordedprogram & recordedseek), and supporting tables: (recordedrating, recordedcredits, people, credits).

Once successful, install mythweb on the server:

  1. mv /var/www/htdocs/myth /var/www/htdocs/myth21
  2. cp -R mythplugins/mythweb /var/www/htdocs/myth23
  3. ln -s /var/www/htdocs/myth23 /var/www/htdocs/myth
Categories: Computers Tags:

Asterisk Revisited

July 18th, 2010 No comments

We recently moved house which involved moving to a new exchange and getting a new phone number. So I took the opportunity to transfer the old number to be the incoming number for the Sipgate account, surprisingly easy and cheap to do.

Strangely as soon as we did this we started getting lots of calls from a phone spammer, so I instated the phonespam filter, which after a few modifications works a treat. Now all calls rated as spam are instantly hung up.

Have also installed Growl on my macbook, and a couple of scripts on the Asterisk box to send call notifications to the laptop. After knocking up a quick script to look up incoming numbers in my address book, it also shows when friends and family are ringing.

So now the incoming dial plan boils down to:

  1. Look up Incoming Number in Address Book
  2. If not recognized filter out Spam calls
  3. Send notification to laptop (& Myth clients)
  4. Dial Extensions

notify (shell script)
notify.php (Notify php application)
lookup.php (Lookup contact agi script)
contacts.php (Contact php library functions)

Categories: Computers Tags:

Asterisk

July 21st, 2009 No comments

Ever since we moved house and subscribed to Virgin Media for our broadband connection I have been amazed at how much call rates are for the phone package we are on. For example over 5p a minute for national rate, 15p for mobiles and 33p for international.

However the 10Mbit broadband is pretty decent overall, and a few test SIP calls proved that it was good enough at prioritisation to give good call quality. This inspired me to get the cheap ATA I bought out of storage and re-instate our ‘black’ phone. The phone is no longer black – having been consigned to the dustbin long ago, but the name has stuck. This gave us much cheaper calls over the internet (1p National, 9p Mobile and 2p International).

I estimate this will save us over £200 a year on call charges, but some stuff still niggled and I wanted better call logging and accounting than SIPGATE provided. So I have install the Asterisk PBX software on the server in the loft to do some more clever stuff.

So I now have the ATA registering with the Asterisk server, the asterisk server has registered with the SIP providers and routes calls according to least cost (Currently it distributes the calls between SIPGATE and VoipCheap). Additionally it will automatically re-direct 0845 and 0870 numbers to cheaper national rate numbers, using the script written by Martin Smith to query the saynoto0870 database.

Once the system proves itself to be reliable, I will be tempted to use this as our main incoming phone number as well. Then I can set up other cool stuff, like host my own voicemail server, set up auto-redirects to other numbers when I’m away from home. Automatically filter out junk and cold calls using the phone spam filter database.

Certain members of the household still can’t remember when to use the black phone and when to use the normal landline (National calls are free at the weekend with Virgin). So am tempter to get a PCI FXO card to allow me to connect and route calls automatically to the landline from the SIP phone.

Categories: Computers Tags:

Gallery Photo Organising

April 15th, 2009 No comments

Been trying to automate the process of sorting my photos and getting them published on my Coppermine Gallery. I had been using the iPhoto CopperExport plugin, but for some reason that does not work with my current web host.

It turns out Coppermine will automatically import IPTC tags into the title, comments and keywords fields, so I’m investigating how to automate this using iPhoto.

Currently Coppermine 1.4.14, which imports the following IPTC tags:


Name......IPTC Tag..IPTC Name
Title.....005.......Iptc.Application2.ObjectName
Caption...120.......Iptc.Application2.Caption
Keywords..025.......Iptc.Application2.Keywords

Unfortunately the version of iPhoto I use does not export the Metadata to the photos, in fact it seems to strip off all the EXIF info altogether. So the current solution is to use some home baked scripts to add the relevant IPTC tags, shrink and rotate the JPEGs and FTP them up to my site. The tools I’m currently using to do the work are ‘convert’ from the ImageMagick toolset, to resize the JPEGs; and exiv2 to add the IPTC tags.

My top to bottom process for processing my photos is this:

  1. Import from Camera (Canon CameraWindow tool), using unique names based on date+ID
  2. Delete obvious duds in CameraWindow tool
  3. In Finder arrange photos into directories (equivalent to Albums/Rolls)
  4. Copy original photos to my server, possibly adding to existing Album directories
  5. Import all changed albums into iPhoto
  6. In iPhoto, for all pictures that I want to publish: Fill in Title, Comment, Keywords, Rating, allocate _Favorite_ keyword.
  7. Using SmartAlbum to select recent Favourite photos, export Metadata using Metadata export plugin
  8. Run my photo processing scripts to:
    • Copy iPhoto Modified photos back to server
    • Create smaller JPEGs ready for Gallery
    • Insert MetaData into Original & Gallery copy of the photos
    • FTP the Gallery versions to web server
  9. In Coppermine, create any required new Albums & Categories, use batch add to import the photos, including Metadata.
Categories: Computers, Website Tags: , , ,

Last.fm

April 12th, 2009 No comments

Always a bit sceptical of anything ‘free’ but have to admit I’m so far quiet impressed by Last.fm. Using a service called audioscrobbler it keeps a record of all music listened to, then makes recommendations based on those tracks. So far I’ve only hooked up my Squeezebox to it. If I still like it after a couple of weeks, I plan to hook up iTunes and MythMusic. Meanwhile I’ve installed the Last.fm RPS plugin, to show my playlist…
[lastfm user=stutty101&showavatar=0&size=5&position=left&showbadge=0]

Slightly modified to enable it to be displayed in a post like this one.

Categories: Computers, Website Tags: , , ,

MythTV Upgrade

February 26th, 2009 No comments

Moving to Fixes Branch, so Grab initial SVN copy, see MythTV SVN

svn co http://svn.mythtv.org/svn/branches/release-0-21-fixes/

This can be updated periodically with svn up as required.

Make a clean copy using svn export release-0-21-fixes/ clean-release-0-21-fixes_18185, where 18185 is the SVN revision. Then on the server and all client take a copy of the latest SVN in /home/mythtv/18185.

Run the previous configure recorded in config.log, updated as appropriate. Run qmake mythtv.pro and then make.

On server backup myth database as described on the MythTV Wiki using mythconverg_backup.pl.

Shutdown all clients and the backend using /etc/init.d/mythbackend stop, then run make install on the server and one client. Restart the server using /etc/init.d/mythbackend start. Restart the client and check it is working.

If successful, install mythweb on the server:
mv /var/www/htdocs/myth /var/www/htdocs/myth.old
cp -R mythplugins/mythweb /var/www/htdocs/myth

Categories: Computers Tags:

Commissioning New Server

January 5th, 2008 No comments

Having some real issues with my Gigabyte motherboard with the latest versions of the kernel (2.6.16+), not supporting my PCI DVB-T cards, so thought I’d try using the now redundant desktop ASUS board instead. Means I’ve had to buy a new Hard Disk (PATA) as it does not support SATA, however it has 5 PCI slots and can be underclocked.

Quick Overview of Steps to Commission the Server:

  1. Burn Gentoo 2007.0 Minimal CD, and boot server using it.
  2. Partition Hard Disk
  3. Device Boot Start End Blocks Id System
    /dev/hda1 * 1 7 56196 83 Linux [/boot]
    /dev/hda2 8 70 506047+ 82 Linux swap / Solaris [swap]
    /dev/hda3 71 800 5863725 83 Linux [/]
    /dev/hda4 801 9729 71722192+ 5 Extended
    /dev/hda5 801 1530 5863693+ 83 Linux [/usr/portage]
    /dev/hda6 1531 2260 5863693+ 83 Linux [/home]
    /dev/hda7 2261 2869 4891761 83 Linux [/mnt/root]
    /dev/hda8 [/shared/]

    The rest of the disk left for later…

  4. Follow Gentoo Installation Instructions
  5. Once complete will have the following services running:

    • apache2
    • asterisk
    • dahdi
    • lm_sensors
    • local
    • mysql
    • mythbackend
    • net.eth0
    • netmount
    • nfs
    • nfsmount
    • ntp-client
    • ntpd
    • sshd
    • syslog-ng
    • udev-postmount
    • vixie-cron
    • xinetd
Categories: Computers Tags:

Google Maps API

October 7th, 2007 No comments

Two really useful and easy to use Google Maps tools, Picasa Web Albums and Google Maps – My Maps.

The Picasa Map is a really good way to show photos of a local area or holiday, done some of the ones we’ve taken around Christchurch. Turning on the Satellite view makes it easier to pick out features from the photos.

The My Maps feature of Google Maps makes it really easy to pick out feature and show routes, done a few of the local walks we take Henry on, Avon Valley Walk and Steamer Point Walk.

Read more…

Categories: General, Tech Tags: , , ,

DTABS

October 7th, 2007 No comments

Moved my site to a new host, took the opportunity to upgrade all the software (Coppermine, WordPress, and plugins). Unfortunately some plugins not WP 2.3 ready, so I’ve hacked the previous version of dtabs to work with WP 2.3, until a pucker version is produced (Dynamic Tabs Plugin)

Categories: Website Tags:

Movie Gallery

March 10th, 2007 No comments

Liv want’s to put some home movie clips of Henry on our Gallery, unfortunately most are done in portrait mode, and need rotating, I’m sure this must be a common task, but doesn’t seem to be any obvious support on the Mac. So trusty mplayer/mencoder to the rescue, found the answer on www.hanselman.com
mencoder -vf rotate=1 -o OUTPUT_R.AVI -oac copy -ovc lavc -lavcopts vbitrate=2000 INPUT.AVI
To do the first pass, adjusting the rotate=1or3 to rotate 90/240 degrees, and the vbitrate to match the input bitrate.
Second pass was to normalise all the videos to the same size & bitrate, 320×240 2500bits/s is probably adequate.
TBC

Categories: Tech Tags:

Website Backup

February 11th, 2007 No comments

Not getting any response to my support questions at Getpro so I need to do more frequent and thorough backups, so this post simply lists everything I need to do to backup and restore my website:

To backup:

  • copy /.htaccess to /uploads/htaccess.txt, /diary/wp-portfolio.php to /uploads/wp-portfolio.php.txt
  • gzip and download /info, /gfx, /uploads, /diary/wp-content directories
  • Backup mysql database
  • Photos from the gallery should be on local server already

To restore:

  • Install Net2FTP under /ftp.
  • Install the latest version of WordPress under /diary.
  • Install the latest version of Coppermine under /gallery.
  • Install my bookmark software under /info.
  • Upload and unzip the /uploads, /gfx, /diary/wp-content, directories.
  • Copy /uploads/htaccess.txt to /.htaccess and setup .htaccess for the various subdirectories
  • Re-register new domain with google maps, amazon, wordpress, adsense
  • Import the mysql databases for info, gallery & wordpress
  • Edit wp-config.php in wordpress to point to the DB, run the upgrade process.
  • Edit include/config.inc.php in coppermine to point to the DB, run the upgrade process.
  • Edit include/config.inc.php in info to point to the DB.
  • Edit settings.inc.php in ftp (minimal settings)
  • Upload all the photos to the gallery/albums directory, then re-generate all the thumbnails
  • Set up any subdomains & domains, and add appropriate index pages for wordpress, copy wp-portfolio.php from /uploads, upgrade any wp plugins.
Categories: Website Tags: