Ubuntu sshd with public key authentication

January 25, 2013

Install openssh-server and enable PubkeyAuthentication

sudo apt-get install openssh-server

Verify the following line in /etc/ssh/sshd_config

PubkeyAuthentication yes

ssh-keygen to generate the key pair if needed

Copy public key from remote to this host

ssh-copy-id craig@sshd_host

 

Windows JRuby Projects and Problems

April 6, 2012

Get Thin HTTP to work

Find a preferred platform for running Sinatra, Event-source, Webobjects, streaming with Trinidad/JRuby

Rackup Cramp.io with Trinidad instead of thin

JRuby / JDK on Windows Problems

January 10, 2012

fail: jruby 1.7.0.dev (ruby-1.9.3-p6) (2012-01-10 6886cc0) (Java HotSpot(TM) Client VM 1.7.0_02) [Windows 7-x86-java]
fail: jruby 1.6.5 (ruby-1.9.2-p136) (2011-10-25 9dcd388) (Java HotSpot(TM) Client VM 1.7.0_02) [Windows 7-x86-java]
fail: jruby 1.6.6.dev (ruby-1.9.2-p312) (2011-12-31 ef36279) (Java HotSpot(TM) ClientVM 1.7.0_02) [Windows 7-x86-java]
win: jruby 1.6.6.dev (ruby-1.9.2-p312) (2011-12-31 ef36279) (Java HotSpot(TM) ClientVM 1.6.0_29) [Windows 7-x86-java]
win: jruby 1.7.0.dev (ruby-1.9.3-p6) (2012-01-10 6886cc0) (Java HotSpot(TM) Client VM 1.6.0_29) [Windows 7-x86-java]

=======================================================================================

$ jruby -v
jruby 1.7.0.dev (ruby-1.9.3-p6) (2012-01-10 6886cc0) (Java HotSpot(TM) Client VM 1.7.0_02) [Windows 7-x86-java]

$ gem install bundler
Fetching: bundler-1.0.21.gem ( 36%)ERROR:  While executing gem … (Gem::RemoteFetcher::FetchError)
too many connection resets (http://production.cf.rubygems.org/gems/bundler-1.0.21.gem)

=======================================================================================

$ jruby -v
jruby 1.6.5 (ruby-1.9.2-p136) (2011-10-25 9dcd388) (Java HotSpot(TM) Client VM 1.7.0_02) [Windows 7-x86-java]

$ gem install bundler
Fetching: bundler-1.0.21.gem ( 18%)ERROR:  While executing gem … (Gem::RemoteFetcher::FetchError)
too many connection resets (http://production.cf.rubygems.org/gems/bundler-1.0.21.gem)

=======================================================================================
$ jruby -v
jruby 1.6.6.dev (ruby-1.9.2-p312) (2011-12-31 ef36279) (Java HotSpot(TM) ClientVM 1.7.0_02) [Windows 7-x86-java]

$ gem install bundler
Fetching: bundler-1.0.21.gem (  8%)ERROR:  While executing gem … (Gem::RemoteFetcher::FetchError)
too many connection resets (http://production.cf.rubygems.org/gems/bundler-1.0.21.gem)

=======================================================================================
$ jruby -v
jruby 1.6.6.dev (ruby-1.9.2-p312) (2011-12-31 ef36279) (Java HotSpot(TM) ClientVM 1.6.0_29) [Windows 7-x86-java]

$ gem install bundler
Fetching: bundler-1.0.21.gem (100%)
Successfully installed bundler-1.0.21
1 gem installed

=======================================================================================
$ jruby -v
jruby 1.7.0.dev (ruby-1.9.3-p6) (2012-01-10 6886cc0) (Java HotSpot(TM) Client VM 1.6.0_29) [Windows 7-x86-java]

$ gem install bundler
Fetching: bundler-1.0.21.gem (100%)
Successfully installed bundler-1.0.21
1 gem installed

JRuby on Windows 7 – multiple versions

December 23, 2011

# JRuby folders
/c/Users/craig/jruby/jruby-1.6.5
/c/Users/craig/jruby/jruby-1.6.6.dev
/c/Users/craig/jruby/jruby-1.7.0.dev

# Java releases:
c\Program Files (x86)\Java\jdk1.6.0_29\bin
c\Program Files (x86)\Java\jdk1.7.0_02\bin

# Edit 3 Environment variables:

PATH
c:\Program Files (x86)\Java\jdk1.6.0_29\bin;
c:\Users\Craig\jruby\jruby-1.6.5\bin;

JAVA_HOME=”c:\\Program Files (x86)\\Java\\jdk1.6.0_29″
JRUBY_OPTS=”–1.9″

JRuby Snapshots

http://ci.jruby.org/snapshots/

 

Setup VirtualBox RHEL 6.1 host Windows 2003 guest

December 21, 2011

Also see gist

VirtualBox 2011-12-21 RHEL 6.1 host Windows 2003 guest

# cat createvm.sh
sudo VBoxManage createvm –name Windows2003 \
–basefolder /opt/virtual_box \
–ostype Windows2003 \
–register
sudo VBoxManage modifyvm Windows2003 –memory 768
sudo VBoxManage modifyvm Windows2003 –hwvirtex off
sudo VBoxManage modifyvm Windows2003 –vtxvpid off
sudo VBoxManage modifyvm Windows2003 –vram 32
sudo VBoxManage modifyvm Windows2003 –nic1 bridged –bridgeadapter1 eth0

# cat storage.sh
sudo VBoxManage createhd –size 51200 –filename /opt/virtual_box/Windows2003/c_drive
sudo VBoxManage storagectl Windows2003 –name ‘Ide Controller’ –add ide –sataportcount 2 –bootable on –hostiocache on
sudo VBoxManage storageattach Windows2003 –storagectl ‘Ide Controller’ –port 0 –device 0 –type dvddrive –medium /opt/iso/en_win_srv_2003_r2_standard_cd1.iso
sudo VBoxManage storageattach Windows2003 –storagectl ‘Ide Controller’ –port 1 –device 0 –type hdd –medium /opt/virtual_box/Windows2003/c_drive.vdi

# start headless
VBoxHeadless –startvm Windows2003

# eject virtual CD
sudo VBoxManage storageattach Windows2003 –storagectl ‘Ide Controller’ –port 0 –device 0 –type dvddrive –medium

$ cat virtualbox.repo
[virtualbox]
name=RHEL/CentOS-$releasever / $basearch – VirtualBox
baseurl=http://download.virtualbox.org/virtualbox/rpm/rhel/6.0/$basearch
enabled=1
gpgcheck=1
gpgkey=http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc

Install VirtualBox on RHEL 6.1

December 19, 2011

http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo

[virtualbox]
name=RHEL/CentOS-$releasever / $basearch - VirtualBox
baseurl=http://download.virtualbox.org/virtualbox/rpm/rhel/6.1/$basearch
enabled=1
gpgcheck=1
gpgkey=http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc

Virtual Machine Hosting on Scientific Linux

December 17, 2011

Just learning

What is sVirt?

Kernel Based Virtual Machine

libvirt is: The virtualization API

QEMU is a generic and open source machine emulator and virtualizer.

Qemu/KVM is the thing.

Red Hat Enterprise – Virtualization Getting Started Guide

Users of RHEL can add the RHEL repo file to /etc/yum.repos.d/.

VirtualBox yum-style repository for RHEL

EL6 supports KVM on 64-bit hosts only.

Oracle VM VirtualBox User Manual

VBoxManage is the command-line interface to VirtualBox.

 

Add sudoer user to Linux

December 17, 2011

Ubuntu 12.10 add sudo user

Ubuntu has disabled root account login by default.

sudo adduser craig
sudo usermod -aG sudo craig

Earlier note

useradd username -G wheel
passwd username
visudo

# uncomment this line

## Allows people in group wheel to run all commands
%wheel  ALL=(ALL)       ALL

# Set up ssh access with requiring a password
ssh-copy-id -i ~/.ssh/id_rsa.pub remote_host

Host HTTP access to ISO Image

December 16, 2011

ISO image at /a/b/xx.iso

Mount point at /home/craig/mnt

sudo mount -o loop -t iso9660 /a/b/xx.iso /home/craig/mnt

cd /home/craig/mnt; sudo webfsd -F

 

Vim Plugins

April 13, 2011

Log the current plugins

a
ack-vim
bufexplorer
calmar256
csapprox
delimitmate
endwise
git-runtime
git-vim
gundo
indexed-search
lusty
markdown-runtime
matchit
neocomplcache
nerdcommenter
nerdtree
ragtag
rails
snipmate
supertab
surround
syntastic
taglist
ultisnips

vim-blackboard
vim-coffee-script
vim-cucumber
vim-javascript
vim-ruby
vim-ruby-refactoring
vim-scratch
vim-unimpaired
vividchalk
zencoding

After removing unused Plugins

Add Plugins

A text-object for ruby blocks

textobj-user
textobj-rubyblock

After changes

bufexplorer/
calmar256/
csapprox/
matchit/
nerdtree/
surround/
taglist/
vim-blackboard/
vim-colors-solarized/
vim-javascript/
vim-scratch/
vim-textobj-rubyblock/
vim-textobj-user/
vividchalk/