Showing posts with label mac book pro. Show all posts
Showing posts with label mac book pro. Show all posts

Friday, December 25, 2009

home network and backups: NAS convenience & simplicity


Merry Christmas! My gift to you is sharing some home networking and backup information!

The Dream:
...will start with a dream. This is... the Cadillac of home storage. The Drobo with SATA option. Considered it, but didn't go this route for our home network due to price. But you should check it out:

SATA, hot swappable, plenty of space for the next decade, and the way RAID is implemented for you makes it basically bulletproof for all your images, movies, music, software assets, etc. Even if 2 drives fail at once, your data is secure. That level of reliability comes with a high price tag, about $2500 ($800 for the chassis, $350 per each 2TB SATA drive). Overkill, but pretty awesome.

A More Reasonably priced setup:
Settling for less bulletproof, but with an affordable price and convenience... price tag only is about $119 per TB - a big discount to DroboS greatness.


Figure 1: Back of the Envelope design layout

The following outlines this configuration and setup for the home:

- NAS1 - 1 TB network attached storage (NAS) attached to your wireless router or Airport Extreme Base Station (AEBS) - (chose these MiniMax Hard Drives: same form factor as AirportExtreme, USB or Firewire, relatively quiet, $119 each via Amazon)

- NAS2 - another identical 1 TB drive daisy chained via USB

- you can configure AEBS (and other routers) to let drives attached to it to be shared drives between computers. If you have access to the wireless 802.11 network, you get access to the drives. In addition can password protect the drives themselves (beyond the 802.11 authentication), or require user authentication if you wish (easily setup).

- each Mac is set up to use NAS1 as it's source for music, movies, etc. -- can configure this in iTunes. Move your movies, and music to the spot on the NAS, and tell iTunes this is its 'home' for purchases, etc. -- this way you do not have to store 60, 80, 100 GB or however much music + movies + images on your laptop itself, but it's on the shared network drive. It has another added benefit if you're using any devices which consume iTunes media (E.g. aTV), in that these devices will effectively sync through the NAS through iTunes on your computer. If you're planning on using these media files for awhile you'll want them on expandable drive, instead of laptop harddrives which will fill up. (requires less management/time to organize)

- buffer size: any device that uses iTunes, or your computer in a client-server relationship will then be set to sync with the shared drive, not at your hard drive. There's a little added latency, but not much if you're on 802.11n, and you can set the buffer size on iTunes to "large" which means that you will download more of the song or movie first before playing it (less stuttering during playback)

- as of Snow Leopard's release, you can use network attached storage as TimeMachine backup destinations. Therefore, configured NAS2 to be the backup for both laptops.

- only extra item is that TimeMachine unfortunately does not allow you to backup from one NAS to another, only works from your computer's harddrive to the TimeMachine destination drive. This is something hopefully Apple will address in future releases. We want to back up from NAS1 to NAS2 and make sure that any shared drives on NAS1 also get backed up in case of failure. One option for dealing with this: write an rsync shell script that runs via cron, this is one way:

Summary:
- movies, photos, images on a NAS to prevent you from using up space on laptop hard drive
- configure iTunes to use the NAS & therefore media through shared drive
- automatic backups from laptops to NAS2 via TimeMachine
- automatic scheduled backups from NAS1 to NAS2 via rsync script running on cron

...once setup, makes managing your digital assets less time consuming or worrisome.

Here are some links I found useful, if you're interested in going down this path:
- AEBS sharing drive:
- TimeMachine backups allowed on AirPort Extreme:
- Mac's synch-ing from a directory on NAS:
- iTunes over NAS via Airport disk:
- iTunes sharing libraries:


Monday, August 27, 2007

installing MemCacheD on Mac OS X with MacPorts

installing MemCacheD on Mac OS X with MacPorts couldn't be easier:

1. as long as you have MacPorts (frmly DarwinPorts) installed on your Mac, just open up a bash shell and type the following:

$ sudo port install memcached
Because memcached utilizes libevent, MacPorts will check to see if libevent-dev is found... if it is not, it will fetch libevent-1.3d.tar.gz from http://monkey.org/~provos/, verify checksum, install... then likewise fetch memcached, verify checksum, extract, configure, install. This currently at the time of this post installs memcached 1.2.2_1.

Sunday, August 26, 2007

Rails stack on Mac OS X and Ubuntu 6.06

Been researching and practicing with Rails for a little while now, and went through the process of updating my setup on my Mac book pro (Mac OS X), as well as on an Ubuntu (Dapper, 6.06) test machine (actually a test VM).

Most of this is similar to what you would find inside of "Agile Web Development with Rails" by the esteemed DHH and Dave Thomas (by the way, if you're interested in Rails development, imho, it's the best book around by far -- very comprehensive and a smooth read). It is also similar to this post by James Duncan Davidson.

So why am I posting this here? Well because in order for me to get it to work on both my Mac and on Ubuntu 6.06, I had to tweak the instructions slightly for a variety of reasons (some version upgrades, etc).

Posting this on my blog not only to share, but for my own future reference. So here goes, for both Mac OS X and Ubuntu Dapper Drake 6.06, a line by line installs of a Rails stack: Apache 2.2, mySQL5 database server, SVN, Ruby 1.8.4, Ruby Gems, Ruby Termios Library, Mongrel, Mongrel Cluster, Capistrano 2.0.

For Mac OS X on Mac Book Pro (Intel-based Mac):

# first you need to download and install DarwinPorts (now known as MacPorts) 1.5.2:
http://darwinports.com/

# once you have MacPorts installed, you may commence with the Rails stack install...
$ sudo port install apache2
$ sudo port install mysql5 +server
$ sudo port install subversion +tools
$ sudo port install ruby
$ sudo port install rb-rubygems
$ sudo port install rb-termios
$ sudo gem install -y rake
$ sudo gem install -y rails
$ sudo gem install -y capistrano
$ sudo gem install -y mongrel
$ sudo gem install -y mongrel_cluster
For Ubuntu 6.06 VM on Mac Book Pro (Intel-based Mac):
$ sudo apt-get install apache2
$ sudo apt-get install mysql-server
$ sudo apt-get install openssl libssl-dev
$ sudo apt-get install libdb4.3 libdb4.3-dev db4.3-util libdb4.3++c2 libdb4.3++-dev
$ wget http://www.shiftingheat.com/packages/subversion/subversion_1.4.0-1_i386.deb
$ sudo dpkg -i subversion_1.4.0-1_i386.deb # install ruby gems from source:
$ sudo apt-get install ruby
$ wget http://rubyforge.org/frs/download.php/17190/rubygems-0.9.2.tgz
$ tar xzvf rubygems-0.9.2.tgz
$ cd rubygems-0.9.2
$ sudo ruby setup.rb
$ sudo gem update --system

# now install 'build-essential' before installing gems:
# Compilers (and manual pages [optional])
$ sudo apt-get install build-essential manpages-dev
$ sudo apt-get install ruby1.8-dev

# now install the following RubyGems: Rake, Rails, Capistrano, Mongrel, Mongrel_cluster...:
$ sudo gem install --include-dependencies rake
$ sudo gem install --include-dependencies rails
$ sudo gem install --include-dependencies termios
$ sudo gem install --include-dependencies capistrano
$ sudo gem install --include-dependencies mongrel
# selected: 2. mongrel 1.01 (ruby), 1. fastthread 1.0 (ruby)
$ sudo gem install --include-dependencies mongrel_cluster
I will try and make a follow up post on Configuring Mongrel and Deploying with Capistrano 2.0, and connecting Apache to Mongrel, installing MemCacheD... but this at least gets the Rails stack installed with gems.

Hope this saves you some time in your Rails development-

Sunday, June 03, 2007

VirtueDesktops for Mac + Dojo.sql ENCRYPT(?) screencast

This is wild. For those of us awaiting the release of "spaces" in Mac OS X Leopard, in the meantime you can download VirtueDesktops
http://virtuedesktops.info/index.php/downloads/
http://virtuedesktops.info/index.php/about/

I caught the use of this during a screencast by Brad Neuberg (http://dojotoolkit.org/offline), and have been playing around with it on my Mac today. You can see him use Virtue Desktops in this screencast where he efficiently moves to different desktops. IMO, it's a great way to efficiently organize my machine. Thanks for the link, Brad!

Incidentally, the screencast is related to encrypting data with Dojo Offline. If you're interested in that screencast it is here, it's pretty sweet:
http://codinginparadise.org/video/dot/dot_encryption_small.mov

On the Google Gears mailing list Brad mentions that enabling transparent encryption and decryption will be in the Dojo Offline port that runs on top of Google Gears in about 2 weeks. Looking forward to seeing that high level lib on top of Gears!

Sunday, February 25, 2007

Coldfusion MX 7.02 on Mac Book Pro

Trying to get my dev environment up using CFMX on a Mac Book Pro and have followed Mark Andrachek's [awesome] instructions, http://webmages.com/geek/cfmx-on-intel-macs/, but encoutering a problem.

Symptom: after completing all steps, when I go to: http://localhost/CFIDE/Administrator/ I receive the following error message:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, [no address given] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.


Apache/1.3.33 Server at mark-holtons-computer.local Port 80

- Apache (1.3) is running on my localhost (I know this because when I go to http://10.0.1.196/ I see:

"If you can see this, it means that the installation of the Apache web server software on this system was successful. You may now add content to this directory and replace this page."

In step 1 of Mark's instructions, I had been able to verify the CF Administrator was up and running, but now I cannot access it via : http://127.0.0.1:8300/CFIDE/Administrator/

I'm thinking this has to do with the connector and perhaps I didn't configure something correctly there. I'm pretty sure I compiled the Apache HTTPD/JRun4 Connector right, as I've followed the directions to the letter:


"Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request."

If I run a cat error_log from the shell, here is what the Apache error_log ("/private/var/log/httpd/error_log") states, line for line, when I make the request to http://localhost/cfide/administrator/ via the browser:

[Sun Feb 25 10:58:13 2007] [notice] jrApache[449:49825] could not initialize proxy for 127.0.0.1:51020
[Sun Feb 25 10:58:13 2007] [notice] jrApache[449:49825] could not open "/Applications/JRun4/lib /wsconfig/1/jrunserver.store": Permission denied
[Sun Feb 25 10:58:13 2007] [notice] jrApache[449:49825] initialized proxy for 127.0.0.1:51020
[Sun Feb 25 10:58:13 2007] [notice] jrApache[449:49825] Couldn't initialize from remote server, JRun server(s) probably down.
[Sun Feb 25 10:58:13 2007] [notice] jrApache[449:49825] could not initialize proxy for 127.0.0.1:51020
[Sun Feb 25 10:58:13 2007] [notice] jrApache[449:49825] could not open "/Applications/JRun4/lib
/wsconfig/1/jrunserver.store": Permission denied
[Sun Feb 25 10:58:13 2007] [notice] jrApache[449:49825] initialized proxy for 127.0.0.1:51020
[Sun Feb 25 10:58:13 2007] [notice] jrApache[449:49825] Couldn't initialize from remote server, JRun server(s) probably down.
[Sun Feb 25 10:58:13 2007] [notice] jrApache[449:49825] JRun will not accept request. Check JRun web server configuration and JRun mappings on JRun server.

That file, jrunserver.store, is one I had to create for connection purposes and has permissions of:
-rwxr-xr-x 1 holtonma holtonma 28B Feb 24 22:50 jrunserver.store

...what properties does this file need to have?? (does this file need to have user/group of "admin admin" instead of "holton holton"?)....

Greatly appreciate any words of wisdom anyone can provide.