Posts

Showing posts from March, 2009

ZFS sharing over NFS

These are some instructions for setting up a NFS share in OpenSolaris with ZFS commands.

My plan is to share a secondary drive installed in my PC to other computers using NFS protocol. I am using a 260 GB drive that is connected to the SATA port inside the computer. First we need to make sure that the drive is formatted properly and ZFS pool is set right.

You might want to take a look at the other ZFS references on our site before continuing.

My information: 2.5" Hitachi drive, capacity 260GB RAW, Drive ID = "c6d0"

Setup my pool called "laptop" (running as root) zpool create laptop c6d0 Then we need a few folders on the drive just to make things nice. I am going to call it "freebie" zfs create laptop/freebie Now for some NFS magic zfs set sharenfs=on laptop/freebie Verify that the NFS share point is set properly zfs get sharenfs laptop/freebie Set the permissions for the folder so people can read and write to it. There are normal NIX commands chm…

Red5 Open Source Flash Server on Ubuntu 8.10

I am working on a video capture video kioski so I need to either purchase thousands of dollars of Adobe Flash Media Server software or I have been looking at Red5 Open Source Flash Server which is free. Now I don't want to knock the great software Adobe has but the amount of traffic and rev up time don't allow me to go with the expensive option. So let's get going with Red5.

I got the software from: http://osflash.org/red5

Then I took my fresh install of Ubuntu 8.10 (Desktop Edition) and ran the Add/Remove Software application. I searched for JAVA and installed: OpenJDK Java 6 Web Start and the OpenJDK Java 6 Runtime.

Once I got the JAVA install I unzipped the software on the desktop and then ran the following commands in terminal: (As root/su) tar -xzvf release.tar.gz cd release export RED5_HOME=`pwd` ./red5.sh The terminal window will look locked but the server is running in the background and if you want to stop the server press the CNTRL+C and the server will quit.

On…

ffmpeg live stream to ffserver

I finally got this to work!! Here is how I did it.

Hardware: HP a1140n with firewire 6-pin and Canon zr45 with 4-pin firewire. I have everything hooked up and running Ubuntu 8.10.

Software: ffmpeg, ffserver config file, dvconnect, DV Live capture instructions

Once you have everything in place and you tested the live capture of the video then you can continue. Remember that you need to either have a tape playing in the camera or have the camera turned on to start recording for dvconnect to work. I ran through all of the examples first and made sure I could grab the video, transcode the videos to flash before I got this all to work properly.

ffserver.conf [CHANGES]:

Note that you may experience problem with the config file and the output, fear not we will get through this. I commented out the MPG streaming and will eventually give you a great mp4 config as I am still working on it. Below is the FLV code I got working and you can change the information as you see fit for the bit rates et…

Ubuntu 8.10 ffserver config file

I did a standard install and then used my instructions to install ffmpeg

My installed I created did not create the CONF file which was needed. I created my own conf file below. nano /etc/ffserver.conf Paste the below into the editor (NOTE: This is the original conf from ffmpeg, I have some other posts later) # Port on which the server is listening. You must select a different # port from your standard HTTP web server if it is running on the same # computer. Port 8090 # Address on which the server is bound. Only useful if you have # several network interfaces. BindAddress 0.0.0.0 # Number of simultaneous requests that can be handled. Since FFServer # is very fast, it is more likely that you will want to leave this high # and use MaxBandwidth, below. MaxClients 1000 # This the maximum amount of kbit/sec that you are prepared to # consume when streaming to clients. MaxBandwidth 1000 # Access log file (uses standard Apache log file format) # '-' is the standard output. Custom…

Ubuntu 8.10 LIVE Firewire 1394 DV Capture

Another post but this one is a bit different, I am capturing LIVE video information from a DV camera over Firewire 1394.

I am using the same equipment which is a HP a1140n with 6-pin firewire in the back connected to a Canon ZR45 video camera.

I started the camera up and also begin recording

Then I did the following things in terminal window as root mkfifo /tmp/fifo.rawdv dvconnect -- >/tmp/fifo.rawdv Running the last command will stop the terminal, that is fine because it is running a process. When you stop the camera then it will stop the dvconnect and prompt will return.
I started another terminal window and begin capturing video to flash file using ffmpeg: ffmpeg -f dv -i /tmp/fifo.rawdv -vcodec flv -b 666k -s 380x286 -ar 22050 -ab 24 -f flv /home/user_name/Desktop/output-file.flv I then took a look at the video. You can change around the video script for the ffmpeg.

Ubuntu 8.10 Firewire 1394 DV Capture

I am using an HP A1140n with firewire (6-pin) on the back hooked to a Canon ZR-45 camcorder (4-pin). I saw on the web that there are a lot of problems so I hope that this will go more smoothly having everything in a single place.

I started with a fresh OS with nothing special at all. I did however install ffmpeg since I am going to convert video so you can either skip that section below or go ahead and install it anyways. We use it a lot and I know that it always comes in handy down the line :-)

Before I begin to install ffmpeg I suggest you install some DV codecs and get thing setup. I needed some libraries for DV to ingest I ran the following command: apt-get install libdv-bin Then you need to tell ubuntu 8.10 to load the video module when booting. nano /etc/modules Add in the "video1394" to the bottom of the list, here is a complete dump of my file. # /etc/modules: kernel modules to load at boot time. # # This file contains the names of kernel modules that should be loa…

iSCSI for Mac

I have been playing around with building a NAS device and since I have some Mac computers to support I found a piece of software for the Mac to connect to iSCSI devices. It is a free application and from what I here a really good one. I hope to have a review of this soon.

http://www.studionetworksolutions.com/products/product_detail.php?pi=11

Capistrano Script for Ruby on Rails

Here is an excellent capistrano deploy script for Ruby on Rails applications. It changes the permissions and on the files and also pushes the mongrel cluster file. I changed my information so make sure you look at the script from beginning to end.

#Capistrano Recipe 2.0 for pushing the files. Developed by Arthur Gressick set :domain, "subdomain.your_site.com" set :user, "root" set :application, "your_site_root" #make sure and don't run as super user #set :use_sudo, false #SVN Repository information #default_run_options[:pty] = false set :scm, :subversion set :repository_addy, "svn://svn.your_repository.com/ruby_project/trunk" set :deploy_via, :export set :deploy_to, "/home/user/vhosts/#{application}" set :scm_user, "username" set :scm_password, Proc.new { Capistrano::CLI.password_prompt("SVN password for #{scm_user}, please: ") } set :repository, Proc.new { "--username #{scm_user} --password #{scm_pass…

Tahoe-LAFS Distributed, Secure, Fault-Tolerant Filesystem

I have long been looking for a viable off-site backup solution for both my business and personal data. The business part is pretty easy. I only back up a couple hundred megabytes, and even allowing for weekly full backups + daily incrementals, I can keep a few months of backups available in a basic 4 GB volume from rsync.net. (For what it's worth, a shout-out to Duplicity here, which is what I use to manage the backups to rsync.net. It handles everything, including encryption and an rsync-like only-send-the-differences algorithm.)

Backing up my personal files, though, is an entirely different problem. Like most people, this includes a huge amount of media: over 100 GB of audio and more than 200 GB of photographs. Backing up to any of the popular online backup companies will either cost me a fortune per month or run the risk of crossing some fuzzy "acceptable use" line.

The other day I ran across the Tahoe-LAFS and this has me really excited. It is a distributed, secure a…

OpenSolaris ZFS Setup

I will have a completed project called OpenSolaris NAS device once I get the testing finished but for now here are some directions for setting up a ZFS file system. I am using VMware fusion for Mac and created the main system and then 4 additional 1GB drives. I set them up at SATA drives which would be like I would have in the final product.

First thing I had to do what install the software and then after I install everything I opened the terminal and begin hacking away. Here are my commands that I ran:

Get the ID for each of the attached drives. iostat -En Create a simple mirror of just 2 drives. (drive_id = id from command above) zpool create your_pool_name mirror drive_id drive_id SAMPLE of script above zpool create your_pool_name mirror c4t1d0 c4t2d0 Check your work zpool list zpool status create a folder zfs create your_pool_name/folder_name Adding more space to the storage pool zpool add your_pool_name mirror drive_id drive_id Checking all of the drives that make up the zf…

CentOS 4 Networking Config

I was having some problems setting up the network settings on a CentOS 4 system. I found a handy little command for editing the network configuration netconfig Don't forget to restart the network after changing /etc/init.d/network restart

Setup of a new rails app with svn

The easiest way to setup a new repository for your rails application is to ssh into the repository host and then using terminal type as root svnadmin create /path/to/repos/new-repo-name Then to lock it down without using ssh and using the provided svnserve program running as a daemon on the host run this command from the newly created repository directory vi conf/svnserve.conf Make sure to set in the [general] section anon-access = none and auth-access = write Also make sure to uncomment password-db = passwd Then after you save those changes execute the following vi conf/passwd Add an entry for yourself and whomever you'll be sharing this repository with, like other developers and such. Save and quit. While in the same repo directory go ahead and make a temp directory and inside the temp directory create three directories ( trunk, tags, branches ) mkdir trunk tags branches You'll want to import these directories into your repo. svn import . [svn-host] -m …

CactiEZ ISO Image

I came across another complete Cacti ISO yesterday and began working with it. I was very impressed with everything that is comes with and how easy it was to get it up and running. I had to post this link for anyone who wants a complete all in one package that they can install on a VM or an old PC in the office.

CactiEZ - http://cactiez.cactiusers.org/

I would highly recommend that you take a look at this release.