Today is my nephew Eric's birthday. I won't be able to see him this weekend but I hope he has a good one. In a few weeks he'll be living real close since they're moving to the same city I live in. Exciting!
Happy Birthday Eric from Uncle Gary and Aunt Andrea.
Friday, June 12, 2009
Monday, May 11, 2009
Boston 2010 here I come!
I ran the Fredericton Marathon yesterday and I managed to get my target time of 3:15 and qualify for the Boston marathon!! I'm pretty excited about going next year.
I'm just glad that all this training was not wasted. The weather was a bit chilly, and we got rained on a couple of times, but the course has to be one of the best we have around here. I was feeling great till the last 4 kilometres and it was a mental battle after that. I wasn't sore anywhere in general, more of a fatigue thing where you're body is running low on energy.
I'm feeling quite sore today and limping around the house for the next few days is expected.
Andrea did a great job as my 'support' crew handing out bananas and watermelon.
Dean ran and got another PB of 3:05, and Steve ran his 1st marathon and qualified for Boston as well with a time of 3:27. Steve's older, so he's lucky enough that he doesn't need the same time as Dean or I do. He needed to be under 3:30, while Dean I needed to be under 3:15.
I managed to come in 12th out of almost 200 marathoners and 2nd for my age group. Of course Dean was 1st for our age group the bugger. Always 2nd to Dean... :-)
I'm just glad that all this training was not wasted. The weather was a bit chilly, and we got rained on a couple of times, but the course has to be one of the best we have around here. I was feeling great till the last 4 kilometres and it was a mental battle after that. I wasn't sore anywhere in general, more of a fatigue thing where you're body is running low on energy.
I'm feeling quite sore today and limping around the house for the next few days is expected.
Andrea did a great job as my 'support' crew handing out bananas and watermelon.
Dean ran and got another PB of 3:05, and Steve ran his 1st marathon and qualified for Boston as well with a time of 3:27. Steve's older, so he's lucky enough that he doesn't need the same time as Dean or I do. He needed to be under 3:30, while Dean I needed to be under 3:15.
I managed to come in 12th out of almost 200 marathoners and 2nd for my age group. Of course Dean was 1st for our age group the bugger. Always 2nd to Dean... :-)
Friday, March 06, 2009
Off to Bangor for the weekend for some ultimate
I'm off for my 1st road trip to an ultimate tournament this weekend. We're playing indoors, but it's a full sized field gym. Should be interesting playing indoors in a gym the size of a soccer field.
I also need to get 20km in for my training. That's going to be hard since these guys like to drink...
I also need to get 20km in for my training. That's going to be hard since these guys like to drink...
Thursday, February 26, 2009
Creating a server for torrents, usenet, PS3 Media server, vmware server and software raid
I have a PS3 and it's awesome at playing media files over UPnP. Divx, xvid, mpeg etc.
I then thought I'd try some HD content in 1080P. But this server just couldn't handle the load and stuttered. I thought it was time to rebuild the OS since it's an older version of Ubuntu, and I have other software on it that's no longer in use (mediatomb). But this also meant a hardware upgrade. So I bought:
Hellanzb with Zussaweb
Next I installed hellanzb and what it needs:
Create the hellanzb.conf file.
Start it up:
Make sure it's running:
I wanted to have a web interface for hella, so I decided to use zussaweb. But it needs apache. So I installed it and the php mod:
The first step is to add zussaweb to the httpd.conf file:
Now we need to create a password file:
Now allow apache user www-data to read our password file:
Restart apache:
Deluge
Now I want to install deluge. Get deluge. The one I used was here. To install the deb package, run the command:
Make the init.d script executable and have it startup at boot:
Next is PS3 Media Server
I installed the latest code from SVN, so you're going to need a few packages. Plus I want the multithreaded version of mplayer.
I can't recall all the libs that are needed, so you may need to add more as needed. But here's a list to ensure you have everything:
vi PMS.sh
Use this for the contents of the script. Ensure you change the DIRNAME to where you've just put PMS. Notice I added the 'console' parm at the end to ensure no java GUI is started.
Next is to create directories. I have videos on various drive and different mount points through SAMBA. I didn't want to modify the PMS.conf file for all of these, so I decided to create one directory and it has symbolic links to all the other folders. Here's what mine looks like:
Software RAID
I already had RAID 1 configured on the older box and was worried that I'd have to redo it all over again on the new machine. I backed up all the files to a USB drive just in case.
But once I got Ubuntu 8.10 installed and hooked the 2 500G SATA drives up I was able to add them to a raid device.
It's been a while, but here's what I think I did to 'rebuild' that raid array. I know that at a basic level you create the raid device (/dev/md0) and then add the discs to the raid device. It warned me that the discs already had a filesystem on them but I did it anyways.
- I had a server running Ubuntu 7 with a headless version of Azureus for downloading torrents and general network storage of movies, music etc. I also installed the WebUI for it so I could upload torrents remotely.
- I then decided I wanted software raid, so I added a couple of 500G drives and implemented software raid. It was real easy using mdadm.
- Then I wanted to start streaming to the PS3 from this server. I then installed Mediatomb and it worked fairly well. It had the ability to transcode incompatible files to a format the PS3 liked. But it never worked the greatest transcoding so I only used videos the PS3 could play natively.
- Then I finally signed up for a usenet account, so I wanted the ability to download usenet files. But since the server is in the basement, it needed a webUI. So I installed hellanzb with the Zussaweb interface.
I then thought I'd try some HD content in 1080P. But this server just couldn't handle the load and stuttered. I thought it was time to rebuild the OS since it's an older version of Ubuntu, and I have other software on it that's no longer in use (mediatomb). But this also meant a hardware upgrade. So I bought:
- AMD X2 6000 CPU
- Asus M3N78-VM Motherboard
- 4 gigs of DDR2
Hellanzb with Zussaweb
Next I installed hellanzb and what it needs:
sudo apt-get install rar unrar par2 python-dev python-twisted python-pyopenssl wget tar screen hellanzb
Create the hellanzb.conf file.
sudo cp /usr/etc/hellanzb.conf.sample /usr/etc/hellanzb.conf
sudo vim /usr/etc/hellanzb.conf
- Make sure you configure the server information in the .conf file. It’s pretty self explanatory and gives examples.
- If you’re planning to use SSL; make sure you enable the SSL option and change the port from 119 to 443. I use SSL since astraweb supports it.
- Set the PREFIX dir to something like /home/username/ or /mnt/storage/hellanzb/
sudo vi /etc/init.d/hellanzbAdd this:
#Change change_me_to_the_user_to_run_this_as to the correct user to run this as. To get this script to start when the box starts:
### BEGIN INIT INFO
# Provides: hellanzb
# Required-Start: $network $local_fs
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Usenet Binary Downloader
### END INIT INFO
#
# hellanzb Start the hellanzb
#
# hellanzb init-script v0.6 dedicated
#
# the following vars are used:
# NAME= leave it to hellanzb, its just a display name and it is used to connect to it with screen
# USERNAME= your username, this is used to run hellanzb in
# *_PIDFILE= the pid file which the script checks
#
NAME=hellanzb
USERNAME=change_me_to_the_user_to_run_this_as
HELLANZB_PIDFILE=/var/run/hellanzb.pid
HELLANZB_BIN=/usr/bin/hellanzb
DESC="Binary Usenet Download Services:"
trap "" 1
export LANG=C
. /lib/lsb/init-functions
case "$1" in
start)
log_acti else
log_end_msg 1
fi
;;
stop)
log_action_msg "Stopping $DESC"
log_daemon_msg " Stopping $NAME.."
if start-stop-daemon -K --pidfile $HELLANZB_PIDFILE; then
log_end_msg 0
else
log_end_msg 1
fi
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: /etc/init.d/$NAME start|stop|restart}"
exit 1
;;
esac
exit 0
on_msg "Starting $DESC"
log_daemon_msg " Starting $NAME.."
if start-stop-daemon -S -c $USERNAME -m -b --pidfile $HELLANZB_PIDFILE --exec /usr/bin/screen -- -S $NAME -D -m $HELLANZB_BIN; then
log_end_msg 0
sudo chmod +x /etc/init.d/hellanzb
sudo update-rc.d hellanzb defaults
Start it up:
sudo /etc/init.d/hellanzb start
Make sure it's running:
ps-ef |grep hellaYou should see it running.
I wanted to have a web interface for hella, so I decided to use zussaweb. But it needs apache. So I installed it and the php mod:
sudo apt-get install apache2 libapache2-mod-php5So I then downloaded zussaweb and extracted it to /var/www. I also wanted to have it password protected, so I needed to create an .htaccess file in the /var/www/zussaweb page.
The first step is to add zussaweb to the httpd.conf file:
sudo vi /etc/apache2/httpd.confadd this to httpd.conf:
Options Indexes Includes FollowSymLinks MultiViews
AllowOverride AuthConfig
Order allow,deny
Allow from all
Now we need to create a password file:
sudo mkdir -p /home/secure/Change 'ogden' to whatever user you wish to log into the web interface with.
sudo htpasswd -c /home/secure/apasswords ogden
Now allow apache user www-data to read our password file:
sudo chown www-data:www-data /home/secure/apasswordsCreate the .htaccess file:
sudo chmod 0660 /home/secure/apasswords
sudo vi /var/www/zussaweb/.htaccessAdd the following:
AuthType BasicChange the user ogden to the user you used to create the password file.
AuthName "Restricted Access"
AuthUserFile /home/secure/apasswords
Require user ogden
Restart apache:
sudo /etc/init.d/apache2 restartYou should be able to navigate to the web server and get prompted for a username/password:
Example: http://192.168.1.100/zussawebI then forwarded all port 21 access on my internet router to this server. That way I can download any usenet file I want whenever I'm not home. My Asus router has the ability to configure an account on dyndns.org, so I can just connect to my dyndns address.
Deluge
Now I want to install deluge. Get deluge. The one I used was here. To install the deb package, run the command:
sudo dpkg -i deluge-torrent_1.1.2-1_amd64.intrepid.debChange the DELUGED_USER to a user on the server.
sudo vi /etc/default/deluge-daemon
Make the init.d script executable and have it startup at boot:
sudo chmod +x /etc/init.d/deluge-daemonYou should now be able to navigate to the deluge webui at the server ip with port number 8112. The default password is deluge and you can configure the directories where it stores the files.
sudo update-rc.d deluge-daemon defaults
sudo /etc/init.d/deluge-daemon start
Next is PS3 Media Server
I installed the latest code from SVN, so you're going to need a few packages. Plus I want the multithreaded version of mplayer.
sudo apt-get install subversion build-essential git-core checkinstall yasm libgpac-dev ant sun-java6-jdk
I can't recall all the libs that are needed, so you may need to add more as needed. But here's a list to ensure you have everything:
sudo apt-get install em8300-headers gawk gettext html2text \Get the latest mplayer:
intltool-debian ladspa-sdk libaa1-dev libartsc0 libartsc0-dev \ libasound2-dev libatk1.0-dev libaudio-dev libaudio2 \
libaudiofile-dev libavahi-client-dev libavahi-common-dev \
libcaca-dev libcairo2-dev libcdparanoia0-dev libcucul-dev \
libdbus-1-dev libdbus-glib-1-dev libdirectfb-dev \
libdirectfb-extra libdts-dev libdv4-dev libenca-dev libenca0 \
libesd0-dev libexpat1-dev libfaac-dev libfaac0 \
libfontconfig1-dev libfreebob0 libfreetype6-dev libfribidi-dev \ libggi-target-x libggi2 libggi2-dev libggimisc2 \
libggimisc2-dev libgif-dev libgii1 libgii1-dev \
libgii1-target-x libgl1-mesa-dev libglib2.0-dev libglide3 \
libglu1-mesa-dev libglu1-xorg-dev libgtk2.0-dev libice-dev \
libjack-dev libjack0 libjpeg62-dev liblzo-dev liblzo1 \
liblzo2-2 liblzo2-dev libmad0 libmad0-dev \
libmail-sendmail-perl libmp3lame-dev libmp3lame0 libmpcdec-dev \
libmpcdec3 libncurses5-dev libogg-dev libopenal-dev libopenal1 \ libpango1.0-dev libpixman-1-dev libpng12-dev libpopt-dev \
libpthread-stubs0 libpthread-stubs0-dev libpulse-dev \ libpulse-mainloop-glib0 libsdl1.2-dev libslang2-dev libsm-dev \ libsmbclient-dev libspeex-dev libsvga1 libsvga1-dev \ libsys-hostname-long-perl libsysfs-dev libtheora-dev \
libtwolame-dev libtwolame0 libvorbis-dev libx11-dev libxau-dev \ libxcb-render-util0-dev libxcb-render0-dev libxcb-xlib0-dev \
libxcb1-dev libxcomposite-dev libxcursor-dev libxdamage-dev \
libxdmcp-dev libxext-dev libxfixes-dev libxft-dev libxi-dev \ libxinerama-dev libxrandr-dev libxrender-dev libxt-dev \
libxv-dev libxvidcore4 libxvidcore4-dev libxvmc-dev libxvmc1 \ libxxf86dga-dev libxxf86vm-dev mesa-common-dev po-debconf \
sharutils x11proto-composite-dev x11proto-core-dev \
x11proto-damage-dev x11proto-fixes-dev x11proto-input-dev \
x11proto-kb-dev x11proto-randr-dev x11proto-render-dev \
x11proto-video-dev x11proto-xext-dev x11proto-xf86dga-dev \ x11proto-xf86vidmode-dev x11proto-xinerama-dev xtrans-dev \
zlib1g-dev libschroedinger-dev libstdc++5 libfaad-dev \
libgsm1-dev libdc1394-22-dev libfaad-dev libsdl1.2-dev
svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayerGet the multithreaded version of ffmpeg:
git clone git://gitorious.org/ffmpeg/ffmpeg-mt.gitGet the latest of x264:
git clone git://git.videolan.org/x264.gitCompile and install x264:
cd x264Compile and install ffmpeg:
./configure --enable-shared
make
sudo checkinstall --fstrans=no --install=yes --pkgname=x264 --pkgversion "1:0.svn`date +%Y%m%d`-ubuntu"
sudo ldconfig
cd ffmpeg-mtCompile and install mplayer:
git clone git://git.ffmpeg.org/libswscale
./configure
make
sudo make install
cd ../mplayerGet the latest PMS:
cp -rf ../ffmpeg-mt/libavcodec libavcodec
cp -rf ../ffmpeg-mt/libavutil libavutil
cp -rf ../ffmpeg-mt/libavformat libavformat
./configure
make
sudo make install
cd ..Now we want to have PMS start up on boot. Since I'm starting it headless we don't want the actual java GUI to start. We need to modify the PMS.sh script.
svn checkout http://ps3mediaserver.googlecode.com/svn/trunk/ ps3mediaserver-read-only
cd ps3mediaserver-read-only/ps3mediaserver
ant
vi PMS.sh
Use this for the contents of the script. Ensure you change the DIRNAME to where you've just put PMS. Notice I added the 'console' parm at the end to ensure no java GUI is started.
#!/bin/shNow we need to create an /etc/init.d script:
DIRNAME="/home/gmo/ps3mediaserver/current_version"
cd $DIRNAME
# Setup PMS_HOME
if [ "x$PMS_HOME" = "x" ]; then
PMS_HOME=`cd $DIRNAME/; pwd`
fi
export PMS_HOME
# Setup the JVM
if [ "x$JAVA" = "x" ]; then
if [ "x$JAVA_HOME" != "x" ]; then
JAVA="$JAVA_HOME/bin/java"
else
JAVA="java"
fi
fi
# Setup the classpath
PMS_JAR="$PMS_HOME/pms.jar"
# Execute the JVM
exec "$JAVA" $JAVA_OPTS -Xmx768M -Djava.encoding=UTF-8 -Djava.net.preferIPv4Stack=true -jar "$PMS_JAR" "$@" console
sudo vi /etc/init.d/ps3mediaserverPut this in the script and make sure you update the directories in red:
#!/bin/shNow we need to create the proper rc.d files:
DIRNAME="/home/gmo/ps3mediaserver/current_version"
cd $DIRNAME
PMS_PIDFILE=/var/run/pms.pid
DESC="PS3 media server"
DAEMON=/home/gmo/ps3mediaserver/current_version/PMS.sh
NAME="ps3mediaserver"
case "$1" in
start)
start-stop-daemon --start -b -m --pidfile $PMS_PIDFILE --exec $DAEMON
;;
stop)
start-stop-daemon -K --pidfile $PMS_PIDFILE
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: /etc/init.d/$NAME start|stop|restart}"
exit 1
;;
esac
sudo update-rc.d ps3mediaserver defaults
Next is to create directories. I have videos on various drive and different mount points through SAMBA. I didn't want to modify the PMS.conf file for all of these, so I decided to create one directory and it has symbolic links to all the other folders. Here's what mine looks like:
gmo@gmo-server:~/videos$ ls -lTo create the links above, you would do something like this:
total 4
drwxr-xr-x 51 gmo gmo 4096 2009-02-24 22:38 action
lrwxrwxrwx 1 gmo gmo 24 2009-02-15 15:40 comedy -> /mnt/asus-videos2/comedy
lrwxrwxrwx 1 gmo gmo 24 2009-02-15 16:29 crime -> /media/sdb1/videos/crime
lrwxrwxrwx 1 gmo gmo 28 2009-02-15 15:39 documentary -> /mnt/asus-videos/documentary
lrwxrwxrwx 1 gmo gmo 24 2009-02-15 16:29 drama -> /media/sdb1/videos/drama
lrwxrwxrwx 1 gmo gmo 25 2009-02-15 15:39 exercise -> /mnt/asus-videos/exercise
lrwxrwxrwx 1 gmo gmo 23 2009-02-15 15:39 horror -> /mnt/asus-videos/horror
lrwxrwxrwx 1 gmo gmo 22 2009-02-15 15:40 kids -> /mnt/asus-videos2/kids
lrwxrwxrwx 1 gmo gmo 22 2009-02-15 15:40 music -> /mnt/asus-videos/music
lrwxrwxrwx 1 gmo gmo 24 2009-02-15 15:40 romance -> /mnt/asus-videos/romance
lrwxrwxrwx 1 gmo gmo 23 2009-02-15 15:40 scifi -> /mnt/asus-videos2/scifi
lrwxrwxrwx 1 gmo gmo 25 2009-02-15 16:30 sports -> /media/sdb1/videos/sports
lrwxrwxrwx 1 gmo gmo 27 2009-02-15 16:30 thriller -> /media/sdb1/videos/thriller
lrwxrwxrwx 1 gmo gmo 20 2009-02-15 16:29 tv_shows -> /media/sde1/tv_shows
cd /home/gmo/videosNow edit the PMS.conf:
ln -s /media/sde1/tv_shows tv_shows
cd /home/gmo/ps3mediaserver/current_versionThe lines I changed are folders, hostname, port, language, nbcores, mencoder_audiolangs, mencoder_sublangs, and mencoder_audiosublangs. I also added the sort type at the bottom. I checked the source and the functionality exists, but it wasn't added to the conf file.
vi PMS.conf
folders = /home/gmo/videos,/raid-driveYou should now be able to start up PMS.
hostname = 192.168.1.220
port = 16111
language = eng
thumbnails = true
thumbnail_seek_pos = 1
nbcores = 2
turbomode = false
minimized = false
hidevideosettings = false
usecache = false
charsetencoding = 850
engines = mencoder,avsmencoder,tsmuxer,mplayeraudio,ffmpegaudio,tsmuxeraudio,vlcvideo,mencoderwebvideo,mplayervideodump,mplayerwebaudio,vlcaudio,ffmpegdvrmsremux
autoloadsrt = true
avisynth_convertfps = true
avisynth_script =
transcode_block_multiple_connections = false
tsmuxer_forcefps = true
tsmuxer_preremux_pcm = false
tsmuxer_preremux_ac3 = false
audiochannels = 2
audiobitrate = 384
maximumbitrate = 0
skiploopfilter = false
enable_archive_browsing = false
mencoder_fontconfig = false
mencoder_font =
mencoder_forcefps = false
mencoder_usepcm = false
mencoder_intelligent_sync = true
mencoder_decode =
mencoder_encode = keyint=1:vqscale=1:vqmin=2
mencoder_nooutofsync = true
mencoder_audiolangs = eng
mencoder_sublangs = eng
mencoder_audiosublangs = eng
mencoder_subfribidi = false
mencoder_ass_scale = 1.0
mencoder_ass_margin = 10
mencoder_ass_outline = 1
mencoder_ass_shadow = 1
mencoder_noass_scale = 3
mencoder_noass_subpos = 2
mencoder_noass_blur = 1
mencoder_noass_outline = 1
mencoder_subcp = cp1252
mencoder_ass = true
mencoder_disablesubs = false
mencoder_yadif = false
mencoder_scaler = false
mencoder_scalex = 0
mencoder_scaley = 0
ffmpeg = -g 1 -qscale 1 -qmin 2
#this is the sort method for the file listing - by date or alphabetical
# 0 = alpha 1=date
key_sort_method = 0
sudo /etc/init.d/ps3mediaserver startGo to your PS3 and you should be good to go for viewing the videos.
Software RAID
I already had RAID 1 configured on the older box and was worried that I'd have to redo it all over again on the new machine. I backed up all the files to a USB drive just in case.
But once I got Ubuntu 8.10 installed and hooked the 2 500G SATA drives up I was able to add them to a raid device.
It's been a while, but here's what I think I did to 'rebuild' that raid array. I know that at a basic level you create the raid device (/dev/md0) and then add the discs to the raid device. It warned me that the discs already had a filesystem on them but I did it anyways.
sudo mdadm --create --verbose /dev/md0 --level=1 --raid-devices=2 /dev/sda1 /dev/sdc1I'd need to mount it to access it, so I created a directory for it:
sudo mkdir /raid-driveThen I added it to the /etc/fstab to mount at boot:
sudo chmod -R 777 /raid-drive
sudo vi /etc/fstabAdd this to the fstab file:
/dev/md0 /raid-drive ext3 defaults,errors=remount-ro 0 2You should then be able to mount the drive and use it like any other mounted drive:
sudo mount /raid-drive
New home of garyogden.com
So I've decided to use blogger as my new home for garyogden.com.
I did have it hosted by a friend, and then I was hosting it myself, but it's a bit slow over DSL.
So here's hoping this works out.
I did have it hosted by a friend, and then I was hosting it myself, but it's a bit slow over DSL.
So here's hoping this works out.
Subscribe to:
Posts (Atom)