Background: #fff
Foreground: #000
PrimaryPale: #8cf
PrimaryLight: #18f
PrimaryMid: #04b
PrimaryDark: #014
SecondaryPale: #ffc
SecondaryLight: #fe8
SecondaryMid: #db4
SecondaryDark: #841
TertiaryPale: #eee
TertiaryLight: #ccc
TertiaryMid: #999
TertiaryDark: #666
Error: #f88
/*{{{*/
body {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}

a {color:[[ColorPalette::PrimaryMid]];}
a:hover {background-color:[[ColorPalette::PrimaryMid]]; color:[[ColorPalette::Background]];}
a img {border:0;}

h1,h2,h3,h4,h5,h6 {color:[[ColorPalette::SecondaryDark]]; background:transparent;}
h1 {border-bottom:2px solid [[ColorPalette::TertiaryLight]];}
h2,h3 {border-bottom:1px solid [[ColorPalette::TertiaryLight]];}

.button {color:[[ColorPalette::PrimaryDark]]; border:1px solid [[ColorPalette::Background]];}
.button:hover {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::SecondaryLight]]; border-color:[[ColorPalette::SecondaryMid]];}
.button:active {color:[[ColorPalette::Background]]; background:[[ColorPalette::SecondaryMid]]; border:1px solid [[ColorPalette::SecondaryDark]];}

.header {background:[[ColorPalette::PrimaryMid]];}
.headerShadow {color:[[ColorPalette::Foreground]];}
.headerShadow a {font-weight:normal; color:[[ColorPalette::Foreground]];}
.headerForeground {color:[[ColorPalette::Background]];}
.headerForeground a {font-weight:normal; color:[[ColorPalette::PrimaryPale]];}

.tabSelected{color:[[ColorPalette::PrimaryDark]];
	background:[[ColorPalette::TertiaryPale]];
	border-left:1px solid [[ColorPalette::TertiaryLight]];
	border-top:1px solid [[ColorPalette::TertiaryLight]];
	border-right:1px solid [[ColorPalette::TertiaryLight]];
}
.tabUnselected {color:[[ColorPalette::Background]]; background:[[ColorPalette::TertiaryMid]];}
.tabContents {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::TertiaryPale]]; border:1px solid [[ColorPalette::TertiaryLight]];}
.tabContents .button {border:0;}

#sidebar {}
#sidebarOptions input {border:1px solid [[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel {background:[[ColorPalette::PrimaryPale]];}
#sidebarOptions .sliderPanel a {border:none;color:[[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel a:hover {color:[[ColorPalette::Background]]; background:[[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel a:active {color:[[ColorPalette::PrimaryMid]]; background:[[ColorPalette::Background]];}

.wizard {background:[[ColorPalette::PrimaryPale]]; border:1px solid [[ColorPalette::PrimaryMid]];}
.wizard h1 {color:[[ColorPalette::PrimaryDark]]; border:none;}
.wizard h2 {color:[[ColorPalette::Foreground]]; border:none;}
.wizardStep {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];
	border:1px solid [[ColorPalette::PrimaryMid]];}
.wizardStep.wizardStepDone {background:[[ColorPalette::TertiaryLight]];}
.wizardFooter {background:[[ColorPalette::PrimaryPale]];}
.wizardFooter .status {background:[[ColorPalette::PrimaryDark]]; color:[[ColorPalette::Background]];}
.wizard .button {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::SecondaryLight]]; border: 1px solid;
	border-color:[[ColorPalette::SecondaryPale]] [[ColorPalette::SecondaryDark]] [[ColorPalette::SecondaryDark]] [[ColorPalette::SecondaryPale]];}
.wizard .button:hover {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::Background]];}
.wizard .button:active {color:[[ColorPalette::Background]]; background:[[ColorPalette::Foreground]]; border: 1px solid;
	border-color:[[ColorPalette::PrimaryDark]] [[ColorPalette::PrimaryPale]] [[ColorPalette::PrimaryPale]] [[ColorPalette::PrimaryDark]];}

#messageArea {border:1px solid [[ColorPalette::SecondaryMid]]; background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]];}
#messageArea .button {color:[[ColorPalette::PrimaryMid]]; background:[[ColorPalette::SecondaryPale]]; border:none;}

.popupTiddler {background:[[ColorPalette::TertiaryPale]]; border:2px solid [[ColorPalette::TertiaryMid]];}

.popup {background:[[ColorPalette::TertiaryPale]]; color:[[ColorPalette::TertiaryDark]]; border-left:1px solid [[ColorPalette::TertiaryMid]]; border-top:1px solid [[ColorPalette::TertiaryMid]]; border-right:2px solid [[ColorPalette::TertiaryDark]]; border-bottom:2px solid [[ColorPalette::TertiaryDark]];}
.popup hr {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::PrimaryDark]]; border-bottom:1px;}
.popup li.disabled {color:[[ColorPalette::TertiaryMid]];}
.popup li a, .popup li a:visited {color:[[ColorPalette::Foreground]]; border: none;}
.popup li a:hover {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; border: none;}
.popup li a:active {background:[[ColorPalette::SecondaryPale]]; color:[[ColorPalette::Foreground]]; border: none;}
.popupHighlight {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}
.listBreak div {border-bottom:1px solid [[ColorPalette::TertiaryDark]];}

.tiddler .defaultCommand {font-weight:bold;}

.shadow .title {color:[[ColorPalette::TertiaryDark]];}

.title {color:[[ColorPalette::SecondaryDark]];}
.subtitle {color:[[ColorPalette::TertiaryDark]];}

.toolbar {color:[[ColorPalette::PrimaryMid]];}
.toolbar a {color:[[ColorPalette::TertiaryLight]];}
.selected .toolbar a {color:[[ColorPalette::TertiaryMid]];}
.selected .toolbar a:hover {color:[[ColorPalette::Foreground]];}

.tagging, .tagged {border:1px solid [[ColorPalette::TertiaryPale]]; background-color:[[ColorPalette::TertiaryPale]];}
.selected .tagging, .selected .tagged {background-color:[[ColorPalette::TertiaryLight]]; border:1px solid [[ColorPalette::TertiaryMid]];}
.tagging .listTitle, .tagged .listTitle {color:[[ColorPalette::PrimaryDark]];}
.tagging .button, .tagged .button {border:none;}

.footer {color:[[ColorPalette::TertiaryLight]];}
.selected .footer {color:[[ColorPalette::TertiaryMid]];}

.sparkline {background:[[ColorPalette::PrimaryPale]]; border:0;}
.sparktick {background:[[ColorPalette::PrimaryDark]];}

.error, .errorButton {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::Error]];}
.warning {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::SecondaryPale]];}
.lowlight {background:[[ColorPalette::TertiaryLight]];}

.zoomer {background:none; color:[[ColorPalette::TertiaryMid]]; border:3px solid [[ColorPalette::TertiaryMid]];}

.imageLink, #displayArea .imageLink {background:transparent;}

.annotation {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; border:2px solid [[ColorPalette::SecondaryMid]];}

.viewer .listTitle {list-style-type:none; margin-left:-2em;}
.viewer .button {border:1px solid [[ColorPalette::SecondaryMid]];}
.viewer blockquote {border-left:3px solid [[ColorPalette::TertiaryDark]];}

.viewer table, table.twtable {border:2px solid [[ColorPalette::TertiaryDark]];}
.viewer th, .viewer thead td, .twtable th, .twtable thead td {background:[[ColorPalette::SecondaryMid]]; border:1px solid [[ColorPalette::TertiaryDark]]; color:[[ColorPalette::Background]];}
.viewer td, .viewer tr, .twtable td, .twtable tr {border:1px solid [[ColorPalette::TertiaryDark]];}

.viewer pre {border:1px solid [[ColorPalette::SecondaryLight]]; background:[[ColorPalette::SecondaryPale]];}
.viewer code {color:[[ColorPalette::SecondaryDark]];}
.viewer hr {border:0; border-top:dashed 1px [[ColorPalette::TertiaryDark]]; color:[[ColorPalette::TertiaryDark]];}

.highlight, .marked {background:[[ColorPalette::SecondaryLight]];}

.editor input {border:1px solid [[ColorPalette::PrimaryMid]];}
.editor textarea {border:1px solid [[ColorPalette::PrimaryMid]]; width:100%;}
.editorFooter {color:[[ColorPalette::TertiaryMid]];}

#backstageArea {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::TertiaryMid]];}
#backstageArea a {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::Background]]; border:none;}
#backstageArea a:hover {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; }
#backstageArea a.backstageSelTab {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}
#backstageButton a {background:none; color:[[ColorPalette::Background]]; border:none;}
#backstageButton a:hover {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::Background]]; border:none;}
#backstagePanel {background:[[ColorPalette::Background]]; border-color: [[ColorPalette::Background]] [[ColorPalette::TertiaryDark]] [[ColorPalette::TertiaryDark]] [[ColorPalette::TertiaryDark]];}
.backstagePanelFooter .button {border:none; color:[[ColorPalette::Background]];}
.backstagePanelFooter .button:hover {color:[[ColorPalette::Foreground]];}
#backstageCloak {background:[[ColorPalette::Foreground]]; opacity:0.6; filter:'alpha(opacity:60)';}
/*}}}*/
/*{{{*/
* html .tiddler {height:1%;}

body {font-size:.75em; font-family:arial,helvetica; margin:0; padding:0;}

h1,h2,h3,h4,h5,h6 {font-weight:bold; text-decoration:none;}
h1,h2,h3 {padding-bottom:1px; margin-top:1.2em;margin-bottom:0.3em;}
h4,h5,h6 {margin-top:1em;}
h1 {font-size:1.35em;}
h2 {font-size:1.25em;}
h3 {font-size:1.1em;}
h4 {font-size:1em;}
h5 {font-size:.9em;}

hr {height:1px;}

a {text-decoration:none;}

dt {font-weight:bold;}

ol {list-style-type:decimal;}
ol ol {list-style-type:lower-alpha;}
ol ol ol {list-style-type:lower-roman;}
ol ol ol ol {list-style-type:decimal;}
ol ol ol ol ol {list-style-type:lower-alpha;}
ol ol ol ol ol ol {list-style-type:lower-roman;}
ol ol ol ol ol ol ol {list-style-type:decimal;}

.txtOptionInput {width:11em;}

#contentWrapper .chkOptionInput {border:0;}

.externalLink {text-decoration:underline;}

.indent {margin-left:3em;}
.outdent {margin-left:3em; text-indent:-3em;}
code.escaped {white-space:nowrap;}

.tiddlyLinkExisting {font-weight:bold;}
.tiddlyLinkNonExisting {font-style:italic;}

/* the 'a' is required for IE, otherwise it renders the whole tiddler in bold */
a.tiddlyLinkNonExisting.shadow {font-weight:bold;}

#mainMenu .tiddlyLinkExisting,
	#mainMenu .tiddlyLinkNonExisting,
	#sidebarTabs .tiddlyLinkNonExisting {font-weight:normal; font-style:normal;}
#sidebarTabs .tiddlyLinkExisting {font-weight:bold; font-style:normal;}

.header {position:relative;}
.header a:hover {background:transparent;}
.headerShadow {position:relative; padding:4.5em 0em 1em 1em; left:-1px; top:-1px;}
.headerForeground {position:absolute; padding:4.5em 0em 1em 1em; left:0px; top:0px;}

.siteTitle {font-size:3em;}
.siteSubtitle {font-size:1.2em;}

#mainMenu {position:absolute; left:0; width:10em; text-align:right; line-height:1.6em; padding:1.5em 0.5em 0.5em 0.5em; font-size:1.1em;}

#sidebar {position:absolute; right:3px; width:16em; font-size:.9em;}
#sidebarOptions {padding-top:0.3em;}
#sidebarOptions a {margin:0em 0.2em; padding:0.2em 0.3em; display:block;}
#sidebarOptions input {margin:0.4em 0.5em;}
#sidebarOptions .sliderPanel {margin-left:1em; padding:0.5em; font-size:.85em;}
#sidebarOptions .sliderPanel a {font-weight:bold; display:inline; padding:0;}
#sidebarOptions .sliderPanel input {margin:0 0 .3em 0;}
#sidebarTabs .tabContents {width:15em; overflow:hidden;}

.wizard {padding:0.1em 1em 0em 2em;}
.wizard h1 {font-size:2em; font-weight:bold; background:none; padding:0em 0em 0em 0em; margin:0.4em 0em 0.2em 0em;}
.wizard h2 {font-size:1.2em; font-weight:bold; background:none; padding:0em 0em 0em 0em; margin:0.4em 0em 0.2em 0em;}
.wizardStep {padding:1em 1em 1em 1em;}
.wizard .button {margin:0.5em 0em 0em 0em; font-size:1.2em;}
.wizardFooter {padding:0.8em 0.4em 0.8em 0em;}
.wizardFooter .status {padding:0em 0.4em 0em 0.4em; margin-left:1em;}
.wizard .button {padding:0.1em 0.2em 0.1em 0.2em;}

#messageArea {position:fixed; top:2em; right:0em; margin:0.5em; padding:0.5em; z-index:2000; _position:absolute;}
.messageToolbar {display:block; text-align:right; padding:0.2em 0.2em 0.2em 0.2em;}
#messageArea a {text-decoration:underline;}

.tiddlerPopupButton {padding:0.2em 0.2em 0.2em 0.2em;}
.popupTiddler {position: absolute; z-index:300; padding:1em 1em 1em 1em; margin:0;}

.popup {position:absolute; z-index:300; font-size:.9em; padding:0; list-style:none; margin:0;}
.popup .popupMessage {padding:0.4em;}
.popup hr {display:block; height:1px; width:auto; padding:0; margin:0.2em 0em;}
.popup li.disabled {padding:0.4em;}
.popup li a {display:block; padding:0.4em; font-weight:normal; cursor:pointer;}
.listBreak {font-size:1px; line-height:1px;}
.listBreak div {margin:2px 0;}

.tabset {padding:1em 0em 0em 0.5em;}
.tab {margin:0em 0em 0em 0.25em; padding:2px;}
.tabContents {padding:0.5em;}
.tabContents ul, .tabContents ol {margin:0; padding:0;}
.txtMainTab .tabContents li {list-style:none;}
.tabContents li.listLink { margin-left:.75em;}

#contentWrapper {display:block;}
#splashScreen {display:none;}

#displayArea {margin:1em 17em 0em 14em;}

.toolbar {text-align:right; font-size:.9em;}

.tiddler {padding:1em 1em 0em 1em;}

.missing .viewer,.missing .title {font-style:italic;}

.title {font-size:1.6em; font-weight:bold;}

.missing .subtitle {display:none;}
.subtitle {font-size:1.1em;}

.tiddler .button {padding:0.2em 0.4em;}

.tagging {margin:0.5em 0.5em 0.5em 0; float:left; display:none;}
.isTag .tagging {display:block;}
.tagged {margin:0.5em; float:right;}
.tagging, .tagged {font-size:0.9em; padding:0.25em;}
.tagging ul, .tagged ul {list-style:none; margin:0.25em; padding:0;}
.tagClear {clear:both;}

.footer {font-size:.9em;}
.footer li {display:inline;}

.annotation {padding:0.5em; margin:0.5em;}

* html .viewer pre {width:99%; padding:0 0 1em 0;}
.viewer {line-height:1.4em; padding-top:0.5em;}
.viewer .button {margin:0em 0.25em; padding:0em 0.25em;}
.viewer blockquote {line-height:1.5em; padding-left:0.8em;margin-left:2.5em;}
.viewer ul, .viewer ol {margin-left:0.5em; padding-left:1.5em;}

.viewer table, table.twtable {border-collapse:collapse; margin:0.8em 1.0em;}
.viewer th, .viewer td, .viewer tr,.viewer caption,.twtable th, .twtable td, .twtable tr,.twtable caption {padding:3px;}
table.listView {font-size:0.85em; margin:0.8em 1.0em;}
table.listView th, table.listView td, table.listView tr {padding:0px 3px 0px 3px;}

.viewer pre {padding:0.5em; margin-left:0.5em; font-size:1.2em; line-height:1.4em; overflow:auto;}
.viewer code {font-size:1.2em; line-height:1.4em;}

.editor {font-size:1.1em;}
.editor input, .editor textarea {display:block; width:100%; font:inherit;}
.editorFooter {padding:0.25em 0em; font-size:.9em;}
.editorFooter .button {padding-top:0px; padding-bottom:0px;}

.fieldsetFix {border:0; padding:0; margin:1px 0px 1px 0px;}

.sparkline {line-height:1em;}
.sparktick {outline:0;}

.zoomer {font-size:1.1em; position:absolute; overflow:hidden;}
.zoomer div {padding:1em;}

* html #backstage {width:99%;}
* html #backstageArea {width:99%;}
#backstageArea {display:none; position:relative; overflow: hidden; z-index:150; padding:0.3em 0.5em 0.3em 0.5em;}
#backstageToolbar {position:relative;}
#backstageArea a {font-weight:bold; margin-left:0.5em; padding:0.3em 0.5em 0.3em 0.5em;}
#backstageButton {display:none; position:absolute; z-index:175; top:0em; right:0em;}
#backstageButton a {padding:0.1em 0.4em 0.1em 0.4em; margin:0.1em 0.1em 0.1em 0.1em;}
#backstage {position:relative; width:100%; z-index:50;}
#backstagePanel {display:none; z-index:100; position:absolute; margin:0em 3em 0em 3em; padding:1em 1em 1em 1em;}
.backstagePanelFooter {padding-top:0.2em; float:right;}
.backstagePanelFooter a {padding:0.2em 0.4em 0.2em 0.4em;}
#backstageCloak {display:none; z-index:20; position:absolute; width:100%; height:100px;}

.whenBackstage {display:none;}
.backstageVisible .whenBackstage {display:block;}
/*}}}*/
/***
StyleSheet for use when a translation requires any css style changes.
This StyleSheet can be used directly by languages such as Chinese, Japanese and Korean which use a logographic writing system and need larger font sizes.
***/

/*{{{*/
body {font-size:0.8em;}

#sidebarOptions {font-size:1.05em;}
#sidebarOptions a {font-style:normal;}
#sidebarOptions .sliderPanel {font-size:0.95em;}

.subtitle {font-size:0.8em;}

.viewer table.listView {font-size:0.95em;}

.htmlarea .toolbarHA table {border:1px solid ButtonFace; margin:0em 0em;}
/*}}}*/
/*{{{*/
@media print {
#mainMenu, #sidebar, #messageArea, .toolbar, #backstageButton, #backstageArea {display: none ! important;}
#displayArea {margin: 1em 1em 0em 1em;}
/* Fixes a feature in Firefox 1.5.0.2 where print preview displays the noscript content */
noscript {display:none;}
}
/*}}}*/
<!--{{{-->
<div class='header' macro='gradient vert [[ColorPalette::PrimaryLight]] [[ColorPalette::PrimaryMid]]'>
<div class='headerShadow'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
<div class='headerForeground'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
</div>
<div id='mainMenu' refresh='content' tiddler='MainMenu'></div>
<div id='sidebar'>
<div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div>
<div id='sidebarTabs' refresh='content' force='true' tiddler='SideBarTabs'></div>
</div>
<div id='displayArea'>
<div id='messageArea'></div>
<div id='tiddlerDisplay'></div>
</div>
<!--}}}-->
<!--{{{-->
<div class='toolbar' macro='toolbar closeTiddler closeOthers +editTiddler > fields syncing permalink references jump'></div>
<div class='title' macro='view title'></div>
<div class='subtitle'><span macro='view modifier link'></span>, <span macro='view modified date'></span> (<span macro='message views.wikified.createdPrompt'></span> <span macro='view created date'></span>)</div>
<div class='tagging' macro='tagging'></div>
<div class='tagged' macro='tags'></div>
<div class='viewer' macro='view text wikified'></div>
<div class='tagClear'></div>
<!--}}}-->
<!--{{{-->
<div class='toolbar' macro='toolbar +saveTiddler -cancelTiddler deleteTiddler'></div>
<div class='title' macro='view title'></div>
<div class='editor' macro='edit title'></div>
<div macro='annotations'></div>
<div class='editor' macro='edit text'></div>
<div class='editor' macro='edit tags'></div><div class='editorFooter'><span macro='message views.editor.tagPrompt'></span><span macro='tagChooser'></span></div>
<!--}}}-->
To get started with this blank TiddlyWiki, you'll need to modify the following tiddlers:
* SiteTitle & SiteSubtitle: The title and subtitle of the site, as shown above (after saving, they will also appear in the browser title bar)
* MainMenu: The menu (usually on the left)
* DefaultTiddlers: Contains the names of the tiddlers that you want to appear when the TiddlyWiki is opened
You'll also need to enter your username for signing your edits: <<option txtUserName>>
These InterfaceOptions for customising TiddlyWiki are saved in your browser

Your username for signing your edits. Write it as a WikiWord (eg JoeBloggs)

<<option txtUserName>>
<<option chkSaveBackups>> SaveBackups
<<option chkAutoSave>> AutoSave
<<option chkRegExpSearch>> RegExpSearch
<<option chkCaseSensitiveSearch>> CaseSensitiveSearch
<<option chkAnimate>> EnableAnimations

----
Also see AdvancedOptions
o sudo visudo
- Add ron after root

o Stop [[aptitude]] looking for the CD:
- vi /etc/apt/sources.list to comment out reference to the CD

o This is where pre-build packages can be found:
- http://packages.debian.org/stable/perl/

o sudo vim /boot/grub/menu.lst
- Change 5 seconds to 10

o Upgrading Debian:
- sudo aptitude full-upgrade
Note: This takes hours, due to SSL. If it still hangs, re-boot in single-user mode and run: dpkg -.-configure -a

o Copy directories from desktop to laptop:
- $HOME/.cpan
- $HOME/bin
- $HOME/wiki
- $HOME/homepage
- $HOME/perl-modules
- $HOME/Ron
- $HOME/scripts
- Apache stuff: cgi-bin, conf, htdocs

o Copy dot files from desktop:
- .bash_aliases
- .bashrc
- Then source it to add ~/bin to path
- .emacs
- .vimrc
- Etc

- Firefox add-ons, bookmarks

o Install [[Apache]]
o Install [[Postgres]]

o Configure Icedove, and install contacts and signature

o Install Adobe Flash

o Set up [[emacs]] or UltraEdit

o Install [[Perl]] modules

o man update-alternatives
See also:
- /etc/alternatives/x-www-browser
- /etc/icedove/pref
- /etc/lib/icedove/defaults/syspref

o Install all my modules so as to run app.fcgi

o Install wireless driver for [[NetGear WG111V2]]
o alwaysvpn.com

o The Age: 3 *
o Install via Debian packages:
- sudo aptitude install libssl-dev apache2 libapache2-mod-fcgid
- Edit config file: /etc/apache2/apache2.conf
- Add, in the Global Config section:
 ServerAdmin ron@savage.net.au
 ServerName  127.0.0.1
- Result:
- Log file: /var/log/apache2/error.log
- cgi-bin: /usr/lib/cgi-bin/
- sites: /etc/apache2/sites-enabled/000-default
- Home: /var/www

o sudo a2enmod info
- sudo aptitude install libapache2-mod-perl2 (see mods-enabled/perl.load)

o Determine contents of /etc/apache2/startup.pl

o Restart Apache:
- sudo /etc/init.d/apache2 restart

o Below here are notes for when not using aptitude

o Looking up which module contains a method:
- perl -MModPerl::MethodLookup -e print_method send_cgi_header

o =======================================
o Before installing Apache and mod_perl, and Postgres:
pushd /usr/lib
sudo link libgdbm.so.3.0.0 libgdbm.so
# Not sudo link libperl.so.5.8.8 libperl.so
# Upgrade Perl 5.8.8 to 5.10.0 does not fix this
# which leads to mod_perl problems (with Dynaloader.a)
sudo link libz.so.1.2.3 libz.so
popd
o =======================================

o Check backup of:
- cgi-bin/
- conf/
- htdocs/
- Use bu.apache.bits after cleaning up things.

o Before upgrading Apache:
- apachectl stop
- Shift old directory sideways with mv ~/httpd ~/httpd.old

o Download httpd-2.2.14.tar.bz2
- bunzip2 ...
- tar xvf ...
- cd httpd-2.2.14
Now see run.configure:
- {{{./configure --prefix=$HOME/httpd/prefork --with-mpm=prefork --disable-auth --disable-include --disable-userdir --enable-mods-shared='deflate headers info ssl status'}}}

- make
- make install

o See if httpd.conf has changed:
- diff ~/httpd.old/prefork/conf/httpd.conf ~/httpd/prefork/conf/httpd.conf

o Download mod_perl-2.0.4.tar.gz
- tar xvzf ...
- cd mod_perl-2.0.4
- perl Makefile.PL MP_AP_PREFIX=$HOME/httpd/prefork
- WTF: cd /usr/lib; sudo ln -s libperl.so.5.10 libperl.so
- make
- make test
- sudo make install
- Edit httpd.conf with:
LoadModule perl_module modules/mod_perl.so

o Download mod_fcgid-2.3.4.tar.gz
- tar xvzf ...
- cd mod_fcgid.2.3.4
- APXS=/home/ron/httpd/prefork/bin/apxs ./configure.apxs
- make
- sudo make install
- Edit httpd.conf with:
LoadModule fcgid_module modules/mod_fcgid.so

Warning: If, after starting Apache, you get an endless series of this msg:
[Mon Feb 09 14:01:56 2009] [notice] child pid 6226 exit signal Segmentation fault (11)
in logs/error_log, copy old startup.pl to httpd/prefork/conf (as mentioned below), and restart Apache with sudo bin/apachectl graceful.

o cpan Bundle::Apache2

o Not needed: Install libapreq2 manually:
- cd
- tar xvzf /home/ron/.cpan/sources/authors/id/J/JO/JOESUF/libapreq2-2.12.tar.gz
- cd libapreq2-2.12
- {{{perl Makefile.PL --with-apache2-apxs=/home/ron/httpd/prefork/bin/apxs}}}
- Was: {{{./configure --with-apache2-apxs=$HOME/httpd/prefork/bin/apxs --enable-perl-glue}}}
- make (May need to do this twice, if Makefile is rebuilt)
- make test (Fails on desktop with Apache 2.2.14)
- sudo make install
- Perl modules are installed into /usr/local/lib/perl/5.10.0/Apache2
- Edit httpd.conf to add:
LoadModule apreq_module modules/mod_apreq2.so

o Run Apache::PatchHttpdConf's example/patch-httpd-conf.pl

o Add to httpd.conf:
- Location contacts/
- Location local/
- Location search/

o Copy old startup.pl to httpd/prefork/conf

o Install YUI:
- cd
- cp -r httpd.old/prefork/htdocs/yui httpd/prefork/htdocs

o Install git docs:
- cd
- cp -r httpd.old/prefork/htdocs/git httpd/prefork/htdocs

o Install assets:
- cd
- cp -r httpd.old/prefork/htdocs/assets httpd/prefork/htdocs

o Install MySQL docs:
- cd
- cp -r httpd.old/prefork/htdocs/mysql httpd/prefork/htdocs

o Install contacts/:
- cd
- cp -r httpd.old/prefork/htdocs/contacts httpd/prefork/htdocs

o Install local/:
- cd
- cp -r httpd.old/prefork/htdocs/local httpd/prefork/htdocs

o Install search/:
- cd
- cp -r httpd.old/prefork/htdocs/search httpd/prefork/htdocs

o Install favicon.ico:
- cd
- cp -r httpd.old/prefork/htdocs/fav* httpd/prefork/htdocs

o Install Open Flash Chart:
- cd
- cp -r httpd.old/prefork/htdocs/open-flash* httpd/prefork/htdocs

o Set up passwords:
- cd $HOME/httpd/prefork
- mkdir passwd
- ./bin/htdigest -c passwd/.htpasswd People ron
- Enter password

o Count the number of connexions:
netstat -ntu | grep SYN_RECV | awk '{print $5}' | cut -d: -f1 | sort | 
uniq -c | sort -nr

o 1: Load balancing:
- cat /etc/apache2/lb_map:
pool    www1|www2|www3|www4

And in a .htaccess file:

RewriteEngine On
RewriteMap servers rnd:/etc/apache2/lb_map
RewriteRule ^(/blog.*)$ http://${servers:pool}.domain.com$1 [R,L]

o 2: Load balancing:
<Proxy balancer://mycluster>
BalancerMember http://192.168.1.10:80
BalancerMember http://192.168.1.20:80
</Proxy>
ProxyPass /test balancer://mycluster/

o Finding loaded modules:
# httpd.conf
...
<Perl>
  # This fragment goes at the end, when I think I'm ready to let Apache start forking
  $main::PARENT_PID = $$;
  unshift @INC, sub {
    print STDERR "LATE LOAD: $_[1]\n" if $$ != $main::PARENT_PID;
    return undef;
  };
</Perl>
o Linksys SPA3102 analog phone adaptor

o Mytel offers an Asterisk service
- Host PBX
- Expensive

o MyNetFone
- Offers Whirlpool Saver account to members of the free Whirlpool VoIP forum at http://whirlpool.net.au

o GoVoIP Aussie Pack
- http://gotalk.com.au

o Pennytel

o Freshtel.net

o http://tinyurl.com/bvsve

o http://elastixconnection.com

o http://dumbme.mbit.com.au

o http://medi7.com.au

o TrixBox
o Download from http://sleepycat.com i.e. Oracle

o Unpack:
- cd
- tar xvzf Desktop/db-4.7.25.tar.gz
- cd db-4.7.25
- cp -r docs ~/httpd/prefork/htdocs/
- http://127.0.0.1/docs/index.html
which just says (besides make clean and realclean):
- cd build_unix
- ../dist/configure
- make
- make install

o Use:
- PATH=${PATH}:/usr/local/BerkeleyDB.4.7/bin
- cd ~/httpd/prefork
- mkdir berkeley
- bin/htdbm -cs berkeley/.htdbm ron.savage
Enter password twice.
Now, list users:
- bin/htdbm -l berkeley/.htdbm
Displays ron.savage.
Now, don't use -c:
- bin/htdbm -s berkeley/.htdbm zoe.savage

o Configure Apache if desired...
How to look inside every CPAN distribution (dagolden)
[ #38081 ]

Ever wonder how many CPAN distributions use Module::Build, or Module::Install? Or how common the different ways Changes, ChangeLog, Changelog, etc. show up in a distribution? Or how many distributions use a particular expression in code?

I wrote App-CPAN-Mini-Visit and the visitcpan tool to make answering such questions a lot easier.

It provides a command line tool that unpacks each distribution tarball in a CPAN::Mini repository, visits the resulting directory, and executes another program. For example, listing all distributions that contain Build.PL:

    {{{$ visitcpan --append=dist -- perl -E 'say shift if -f "Build.PL"'}}}

    AASSAD/Catalyst-Helper-Controller-Scaffold-HTML-Template-0.03.tar .gz
    ABERGMAN/Alien-0.91.tar.gz
    ABERGMAN/File-Find-Random-0.5.tar.gz
    ABERGMAN/ SVL-0.29.tar.gz
    ...

Clearly, if I were running frequent analyses, I might just use CPAN::Mini::Extract and keep all the tarballs extracted, but since I only occasionally have questions like this, I'm willing to make the space/time tradeoff.

Oh, and to answer that first question, here's how many distributions use each style of installer:

    $ visitcpan -- perl -E 'if (-f "inc/Module/Install.pm") { say "MI" } elsif (-f "Build.PL") { say "MB" } elsif (-f "Makefile.PL") { say "EUMM" }' | perl -E 'while (<>) { chomp; $cnt{$_}++ } say "$_: $cnt{$_}" for keys %cnt'

    MI: 2306
    MB: 2675
    EUMM: 11781

Looks like Module::Install has almost caught up to Module::Build. Impressive!

{{{--dagolden}}}
o Install:
- Catalyst
- Task::Catalyst::Tutorial
Note: Some questions default to [n]. Skip MySQL and DB2.
o sudo aptitude install ifplugd

o /etc/network/interfaces:
allow-hotplug eth3
	iface eth3 inet dhcp
	wireless-essid private
        # Key length: 128 bits in router setup
	wireless-key B114C3B9EFBFDE852B96B0BF5A

o /etc/udev/rules.d/z25_persistent-net.rules from laptop:
# PCI device 0x8086:0x101e (e1000)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:11:25:14:09:d6", NAME="eth0"
# PCI device 0x14b9:0xa504 (airo)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:0e:9b:44:00:8e", NAME="eth1"
# PCI device 0x10b7:0x9200 (3c59x)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:06:5b:b7:27:09", NAME="eth2"
# PCI device 0x104c:0xac50 (airo_cs)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:0c:30:12:ec:c9", NAME="eth3"

o sudo iconfig on (laptop):
eth2      Link encap:Ethernet  HWaddr 00:06:5B:B7:27:09  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Interrupt:11 Base address:0x2c00 

eth3      Link encap:Ethernet  HWaddr 00:0C:30:12:EC:C9  
          inet addr:192.168.100.3  Bcast:192.168.100.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:30ff:fe12:ecc9/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:72 errors:2 dropped:0 overruns:0 frame:2
          TX packets:73 errors:0 dropped:0 overruns:0 carrier:0
          collisions:1 txqueuelen:1000 
          RX bytes:9675 (9.4 KiB)  TX bytes:8988 (8.7 KiB)
          Interrupt:3 Base address:0xe100 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:9 errors:0 dropped:0 overruns:0 frame:0
          TX packets:9 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:589 (589.0 b)  TX bytes:589 (589.0 b)

o Cisco Wireless PCMCIA Network Card AIR-PCM350:
<ISP> ->
[58.6.186.209 ADSL 192.168.1.1] ->
[192.168.1.2 NetGear WG614 192.168.100.1]
-> [Desktop 192.168.100.2]
-> [LAPTOP 192.168.100.3]
o sudo ntpdate au.pool.ntp.org
o Debian packages are ar packages, which contain control.tar.gz and data.tar.gz

o Unpack a skeleton file:
- cd ~
- Download http://savage.net.au/Debian/skel-1.0.deb.tar.gz (with thanx to Ben Marsh, Editure.com)
- tar xvzf Downloads/skel-1.0.deb.tar.gz
- cd skel-1.0

o Populate it from somedir 'x':
- cp ~/x/prerm ~/x/postinst ~/x/postrm ~/x/control ~/x/conffiles debian

o Edit the control file:
- Add this to the start of debian/control, and edit as necessary:
Source: xyz
Section: misc
Build-Depends: debhelper (>= 5)
Priority: extra
Maintainer: Root <root@localhost>
Standards-Version: 2.4.1

o Edit the changelog file debian/changelog, so at least the first line looks vaguely like:
- xyz (1.00-1) unstable; urgency=low

o Put binaries in skel-01/binaries:
- cp -r ~/x/etc/ ~/x/opt/ binaries

o Build it:
- debuild binary
- cd ..

o Test the output, e.g. xyz_1.00-1_i386.deb...

o Either try installing it:
- dpkg -i xyz_1.00-1_i386.deb
- and remove it with:
- dpkg -r xyz

o Or compare the contents with the originals:
- mkdir z
- cd z
- ar x ../xyz_1.00-1_i386.deb
- Compare files and dirs with ~/x
- The changelog will differ, at least
o Install GMP:
- ./configure
- make
- make check
- sudo make install
- sudo ln -s /usr/local/lib/libgmp.so.3 /usr/lib/libgmp.so.3
because guile does not look in /usr/local/lib/ :-(.

o Install libcrypt:
- ./configure
- make
- make check
- sudo make install

o Install guile:
- ./configure
- make
- make check
- sudo make install

o Install gnutls:
- ./configure
- make
- sudo make install
- LD_LIBRARY_PATH=/usr/local/lib
- export LD_LIBRARY_PATH
because FileZilla does not look in /usr/local/lib/ :-(.

o Install FileZilla
- ./configure
- make
- sudo make install
o Install SwitchProxy
o Install Status-bar Calculator
o Someone else's repository, read only access:
- cd ~/repos
- mkdir chorny.cgi.session
- cd chorny.cgi.session
- git init
- git remote add cromedome.cgi.session {{{git://github.com/cromedome/cgi-session.git}}}
- git pull cromedome.cgi.session master
- Edit
- git push git@github.com:cromedome/cgi-session.git

o My own repository
- Edit
- git push origin master
- Details below.

Or

o Pulling Mark's patches to CGI::Uploader:
- cd ~/repos
- mkdir markstos.cgi.up
- cd markstos.cgi.up
- git init
- git remote add markstos.cgi.up {{{git://github.com/markstos/cgi--uploader.git}}}
- git pull markstos.cgi.up master

o Someone else's repository, which I have commit rights to:
- cd ~/repos
- Get it: git clone {{{git://github.com/cromedome/cgi-session.git}}}
- cd cgi-session
- Name remote: git remote add -f cgi.session
{{{git@github.com:cromedome/cgi-session.git}}}
- Edit locally
- Commit locally
- Enter passphrase for key '/home/ron/.ssh/id_rsa': seekrit
- Push remotely: git push cgi.session master

o Updating locally and then remotely:
- Mark pushes patched to github
- I download them separately and diff with my code
- I patch my code
- I release a new version
- I wish to upload my new version
- git push -.-force origin master

o github:
- (Public) {{{git://github.com/ronsavage/cgi--uploader.git}}}
- (Public) {{{git://github.com/ronsavage/html--timeline.git}}}
- (Private) {{{git@github.com:ronsavage/html--parser--simple.git}}}

o A new repo:

All at home:

Global setup:

  {{{git config --global user.email ron@savage.net.au}}}

Next steps, new repo:

  mkdir html-.-timeline
  cd html-.-timeline
  git init
  touch README
  git add README
  git commit -m 'first commit' -a
  git remote add origin {{{git@github.com:ronsavage/html--timeline.git}}}
  git push origin master

Existing repo:

  cd existing_git_repo
  git remote add origin {{{git@github.com:ronsavage/html--timeline.git}}}
  git push origin master

After someone else (P Durbin) patches the code:

  git pull git://github.com/pdurbin/html-.-timeline.git

And what changes did they make, compared to tag 1.03?

  git diff -t 1.03 [bin/timeline.pl]
o anchorfree.com

o The Age: 3.5 *
o hotspotvpn.com

o The Age: 4 *
o Rip audio CDs: cdda2wav

o CD/DVD burner: mp3burn & burn

o If using KDE, may need to disable Gnome Sound Daemon ESD or aRTS

o Why is gs V 8.15.3 and not 8.54?
o Prepare:
- sudo aptitude install libpng12-dev libgraphviz-dev libopenjpeg-dev libjpeg8-dev libfreetype6-dev
- libopenjpeg-dev is ignored

o Download and unpack V 6.6.0

o Configure
- cd ImageMagick-6.6.0
- ./configure
- make
- sudo make install

o To run scripts:
- LD_LIBRARY_PATH=/usr/local/lib
- export LD_LIBRARY_PATH

o Test with:
- identify

o Installing TTF fonts:
- mkdir ~/.magick/data
- cp *.ttf ~/.magick/data
- This may work because I ran imagick-font-gen, downloadable from http://imagemagick.org,
which died with invalid unicode char...

o Testing fonts:
- identify -list font
- This must display the contents of ~/.magick/type.xml
o Debian versions are stable and testing and unstable.
- The testing one is more reliable than might be supposed from the name, but just sometimes infuriating things go wrong with it. I recommend stable.
- See [[aptitude]].

o Boot from net install CD
- Select nothing

o Hostname: zoe (the desktop)

o All in one partition? No. Separate partitions for each

o Network mirror: Yes

o [] Desktop and [] Standard system (i.e. un-selected)

o Continue without a valid swap partition? No

o When it reboots, you're at the command line. Log in as ron, and su for the next steps

o Packages (as root):
- aptitude install make openssh-server gnome-core xorg gdm gnome-audio less psmisc
- aptitude install telnet htop hexedit mc ifstat at vino iftop nmap memstat dstat zip unzip
- aptitude install epiphany-browser iceweasel locate ntpdate ftp lsof dnsutils iotop
- aptitude install libterm-readline-perl-perl libterm-readline-gnu-perl lshw gcc putty curl
- aptitude install libcurl4-openssl-dev filezilla icedove libadns1-dev adns-tools
- aptitude install openoffice.org-writer openoffice.org-calc tcpdump libbz2-dev

o Select American keyboard, else @ displays "
- Fix with:
- dpkg-reconfigure console-data
- aptitude install locales
- dpkg-reconfigure locales

o Make sure that you install a dictionary for libcrypt-cracklib to use.
- apt-cache search /usr/share/dict
- # choose a dictionary eg wbritish-huge
- apt-get install wbritish-huge
- /etc/cron.daily/cracklib-runtime
- #check /var/log/syslog for notice about words entering the cracklib dictionary
- tail /var/log/syslog
- Nov  8 13:52:43 etch cracklib: updated dictionary (read/written words: 49368 49368).

[[Warning]]
[[aptitude]]
[[Installing Debian]]
[[After installing Debian]]
[[Apache]]
[[Asterisk]]
[[Berkeley]]
[[Catalyst]]
[[chroot]]
[[Cisco Aironet Air-PCM350]]
[[CPAN]]
[[Date and Time]]
DebianPackages
[[debootstrap]]
[[dh-make-perl]]
[[dpkg]]
[[emacs]]
[[FileZilla]]
FireFox
[[Github]]
[[Ideas]]
ImageMagick
MainMenu
[[MySQL]]
[[NetGear WG111V2]]
OpenOffice
[[Oracle]]
[[Perl]]
[[pgAdmin]]
[[Postgres]]
ProcessManagement
[[Rose]]
ShellStuff
[[SQLite]]
[[Stunnel]]
[[SVN]]
TrueCrypt
[[Using chroot]]
[[Various Perl notes]]
[[Various programs]]
[[Various URLs]]
[[VPN]]
[[X Windows]]
o Install via Debian packages:
- Note: If a previous installation is a problem, run aptitude purge...
- sudo aptitude install mysql-client mysql-server libmysqlclient15-dev
- Root username/password: root/...
- Protect the initial accounts: http://dev.mysql.com/doc/refman/5.0/en/default-privileges.html
- Run mysql to create users and databases:
- Warning: I could not get ... identified by password('x'); to work:
- mysql> create user 'ron'@'%' identified by 'x';
- mysql> update user set password=password('x') where user='ron';
- mysql> grant all on *.* to 'ron'@'%';
- mysql> create database modules;
- mysql> create database contacts;
- mysql> create user 'contact'@'%' identified by password('x');
- mysql> update user set password=password('contact') where user='contact';
- mysql> grant all on contacts.* to 'contact';

o Below here is for manual installation

o Download Linux (x86, glibc-2.2, "standard" is static, under the heading 'Linux (non RPM packages) downloads') which is mysql-5.1.32-linux-i686-glibc23.tar.gz
and manual refman-5.0-en.html-chapter.tar.gz

o Unpack manual:
cd ~/httpd/prefork/htdocs
tar xvzf ~/Desktop/refman-5.0-en.html-chapter
mv refman-5.0-en.html-chapter mysql

o Unpack server:
cd
tar xvzf Desktop/mysql-5.0.51a-linux-i686.tar.gz
sudo mv mysql-5.0.51a-linux-i686 /usr/local/mysql
sudo /usr/sbin/addgroup mysql
sudo /usr/sbin/adduser -.-ingroup mysql mysql
Password: ***
cd /usr/local/mysql
sudo chown -R mysql .
sudo chgrp -R mysql .

o Start server and check a few things:
sudo scripts/mysql_install_db -.-user=mysql
sudo bin/mysqld_safe -.-user=mysql &
bin/mysqladmin version
bin/mysqladmin variables
cpan DBI
bin/mysqladmin -u root shutdown
sudo bin/mysqld_safe -.-user=mysql &

Note: mysql_secure_installation seems to be unusable, since it has to be run as sudo, in which case it fails when it tries to run mysql. I did not try su - mysql before running it, but I did PATH=$PATH:/usr/local/mysql/bin...

o Remove anonymous account:
bin/mysql -u root
mysql>drop user ''@'localhost';
mysql>drop user ''@'zoe';
mysql>SET PASSWORD FOR 'root'@'localhost' = PASSWORD('xxx');
mysql>SET PASSWORD FOR 'root'@'zoe' = PASSWORD('xxx');
mysql>SET PASSWORD FOR 'root'@'127.0.0.1' = PASSWORD('xxx');
mysql>quit
mysqladmin -u root -p shutdown
Password: xxx

o In future:
mysql -u root -p mysql
Password: xxx
mysql>...
mysql>\q

o Install DBD::mysql
perl -MCPAN -e shell
cpan>force install DBD::mysql
cpan>quit

o Handling special chars:
$ cat sql/schemapatch-00039.sql
ALTER DATABASE CHARACTER SET = 'utf8' COLLATE = 'utf8_unicode_ci';
o Ref: http://linmodems.technion.ac.il/archive-seventh/msg01682.html

o sudo aptitude install ndiswrapper-common ndiswrapper-utils ndiswrapper-source

o Edit /etc/apt/sources.list and replace 'main' with 'main contrib non-free'

o sudo aptitude update

o sudo aptitude install module-assistant

o sudo module-assistant prepare

o sudo module-assistant auto-install ndiswrapper-source

o Load the driver manually (how?) or reboot

o sudo /usr/sbin/ndiswrapper -i bcmwl5.inf

o sudo /usr/sbin/ndiswrapper -l
Output is: bcmwl5          driver installed (alternate driver: bcm43xx)

o sudo /sbin/modprobe ndiswrapper
o Fire up Calc. If there are icons but no text (e.g. menus):
- Exit all OO apps
- Run sudo /usr/lib/openoffice/program/spadmin
- Click on Fonts
- Click on Add
- Navigate to /usr/share/fonts/truetype/ttf-dejavu
- Click on Select All
- Click on Close a couple of times
- Fire up Calc to verify fonts are installed, since text will now be visible
o openvpn.org
I usually just add this after every connect():
    $dbh->do("alter session set nls_date_format='YYYY-MM-DD HH24:MI:SS'");
    $dbh->do("alter session set nls_timestamp_format='YYYY-MM-DD
HH24:MI:SS.FF'");
o Documentation issues:
- http://perldoc.perl.org/
- $^S is under Special Variables
- The search box cannot find $^S on that site

o Check [[dh-make-perl]] first

o Upgrade CPAN:
sudo perl -MCPAN -e 'install CPAN'
Note: During the installation phase, when asked about dependencies, choose 'follow'.

o Ensure make runs as sudo:
sudo perl -MCPAN -e 'shell'
Type: o conf make_install_make_command 'sudo make'
Type: o conf urllist ...
Type: o conf commit
Type: quit

o Install (not really kept up-to-date):
- App::cpanminus (for cpanm)
- CPAN::SQLite
- YAML
- YAML::Syck
- Test::Pod::Coverage
- Test::Warn
- App::Ack (for ack)
- Capture::Tiny
- CGI::Application::Dispatch
- DBI
- DBD::mysql
- DBD::Pg
- DBIx::Admin::CreateTable
- DBIx::Connector
- Config::General (Prefer Config::Tiny)
- Config::IniFiles (Ditto)
- Config::Tiny
- CPAN::Mini
- CPAN::Mini::Extract
- CPAN::Mini::Inject
- Digest::SHA
- ExtUtils::XSBuilder
- FCGI
- FCGI::ProcManager
- FindBin::Real
- HTML::Template
- Local::Config
- Local::CheckDistro
- Local::Mail::POP3Client (for check.spam.pl)
- Pod::POM
- Pod::Webserver (for podwebserver)
- Text::CSV
- Text::CSV_XS
- URI
- Expat from Sourceforge before (XML::Parser)
Note: There is no make test for expat
- XML::SAX::Expat to stop usage of XML::SAX::PurePerl. See: http://www.cpanforum.com/threads/5980

o Warning: Template::Alloy hangs during make test

o Run minicpan. See also explode.cpan

o Set up config file for mcpani, after installing CPAN::Mini::Inject:
Location: ~/.cpan/config:
local: /home/ron/.cpan/sources
remote: ftp://mirror.internode.on.net/pub/cpan/
repository: /home/ron/perl-modules
passive: yes
dirmode: 0755

o Sample usage of mcpani:
mcpani -.-add -.-module Local::GraphViz -.-authorid RSAVAGE -.-modversion 1.02 -.-file ./Local-GraphViz-1.02.tgz
mcpani -.-add ...
mcpani -.-inject
Then delete ~/.cpan/Metadata, since it will not contain Local::*, and run:
perl -MCPAN -e 'install CPAN::Mini'
This is a fake, just to recreate Metadata.
Warning: Do not use -e shell and reload index

o Releasing a new version of a module:
x Check:
- sub new to use $class and not $caller
- t/pod.t to be present
- $VERSION to match database "module"
- Makefile.PL to work

x Create ~/perl.modules/x-y-1.00/* with build.module X::Y 1.00

x Add module to Postgres table module, with module_registered = "Yes"

x Run transfer.module.pl X::Y 1.00. This:
- copies *.pm to ~/homepage/Perl-modules/pod/x/y.pm
- copies X-Y-1.00.tgz to ~/homepage/Perl-modules/
- updates Postgres database module, table module

x Edit /home/page/Pages/web-site.xml to announce new module

x Build web site, with:
shell>cd ~/homepage/Pages
shell>build > build.log
This creates HTML from *.pm

x Upload files to savage.net.au ( & delete previous version):
- /homepage/Perl-modules/html/x/y.html
- /homepage/Perl-modules/x-y-1.00.tgz
- /homepage/index.html
- /homepage/Perl-modules.html
Note: May need to upload:
- Books
- Wines

x Install from savage.net.au

x Upload to PAUSE - Also, delete previous version(s)

x Announce on comp.lang.perl.announce
o Install via Debian packages:
- sudo aptitude install postgresql postgresql-client postgresql-server-dev-8.3
- The latter provides pg_config, as requested by DBD::Pg
- This time, DBD::Pg did not ask, presumably because I had installed the server dev

o Patch the passwords for the Unix user postgres and the database user too:
- http://www.ubuntugeek.com/howto-setup-database-server-with-postgresql-and-pgadmin3.html
- E.g.:
- sudo su postgres -c psql template1
- sudo passwd -d postgres
- sudo su postgres -c passwd
- Edit /etc/postgresql/8.3/main/pg_hba.conf and add:
- local all all trust
- sudo /etc/init.d/postgresql-8.3 restart

o Add to your path:
- /usr/lib/postgresql/8.3/bin
- /use/share/postgresql-common/ (for pg_wrapper)

o Note:
- /etc/postgres-common/

o Turn off write caching in case of power failure:
(sudo aptitude install postgresql-8.4 issues a warning about this)
- sudo aptitude install hdparm
- sudo hdparm -W 0 /dev/hda
- sudo aptitude install postgresql-8.4 postgresql-client
- Default data dir: /var/lib/postgresql/8.4/main/
- Default pid file: /var/run/postgresql/8.4-main.pid
- See also: /var/lib/postgresql/8.4/main/postmaster.pid

o psql -U postgres [database]
psql=# create role ron login password 'seekrit';
psql=# create database modules owner ron encoding 'UTF8';
psql=# \q

o Getting Postgres to start at boot time after manual install:
- cd ~/postgresql-8.3.4/contrib/start-scripts
- sudo cp linux /etc/init.d/postgresql
- sudo chmod 755 /etc/init.d/postgresql
- sudo update-rc.d postgresql defaults 02 98

o Manual start after manual install:
- su - postgres
- /usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data >logfile 2>&1 &

o Set the prompt within psql:
- \set PROMPT1 '(%n@%m) [%/]>'

o Error msg:
psql: FATAL:  Ident authentication failed for user "ron"
Solution: Edit /etc/postgresql/8.4/main/pg_hba.conf

o Error msg:
psql: FATAL:  database "ron" does not exist
Because you used: psql -U ron
Try: pgsql -U postgres
and create roles and databases.

o Error msg:
Table 'authors' ERROR:  current transaction is aborted, commands ignored until end of transaction block
is caused by not setting AutoCommit = 1.
o Utilities to keep watch on running processes:
- {{{dstat --tcp}}}
- free -m
- htop
- memstat -w -p $pid
- {{{netstat --tcp}}}
- ps -ef | grep $a_name
- ps auwx
I.e. don't use - to prefix auwx if piping into grep, since it produces a warning msg.
- pstree $pid
- vmstat 1 20

o Install:
- Rose::DB
- Rose::DB::Object
- Rose::URI
o Create tables with ~/perl.modules/CGI-Uploader/scripts/create.table.pl
- It gives an error trying to delete a non-existent table

o Run sqlite as the CLI:
- .headers on
- .mode column
- .schema
- etc
- .q

o Docs for sqlite: http://www.sqlite.org/sqlite.html
o Update a file:
- svn commit x.pm -m "Comment"

o Add a new file:
- svn add new.pm

o See what someone else has been doing:
- svn update
o dir [a-z]* is not restricted to lower case. See man bash and search for a-z
- Use {{{dir [[:lower:]]*}}}

Debian
Look at http://www.stunnel.org/ . Set up an a forwarding stunnel on your
machine to connect to a listening stunnel on the remote machine. 
All ports work basically the same way so consult the examples section on
the site for details. The basic mechanism works as follows (both client
and server have stunnel running on them though configured differently) :

(Server is 192.168.0.10)
                                 Tunnel
{{{127.0.0.1:23->192.168.0.10:1000 ----------->
192.168.0.10:1000->127.0.0.1:23}}}

Accepts traffic listening on localhost port 23, encrypts it and forwards
it to remote host port 1000.
Remote host listens on port 1000, decrypts traffic and forwards it to
locahost port 23.

I use perl for this by having it generate a .conf which gets passed to
stunnel as a parameter (establishing the tunnel). I also have it handle
dismantling the tunnel when I am done. I don't have time to be more
descriptive but everything you need to be able to do this is at
www.stunnel.org
o Installation:
- cd /usr/src
- Download Linux source from http://kernel.org/pub/linux/kernel
- sudo bunzip2 linux-source-2.6.18.tar.bz2
- sudo tar xvf ...
- sudo aptitude install dmsetup
- cd
- Download truecrypt-4.3a-source-code.tar.bz2
- bunzip2 ...
- tar xvf ...
- cd truecrypt
- sudo ./build.sh
- sudo aptitude install dmsetup
- sudo ./install.sh

o Use:
- cd
- truecrypt -c 
Create as ~/TrueCrypt, etc
- mkdir /tmp/flash
- truecrypt /media/usbdrive /tmp/flash
- mkdir /tmp/hard
- truecrypt TrueCrypt /tmp/hd
- dir /tmp/flash
- dir /tmp/hard
- truecrypt -d
or
- truecrypt /tmp/flash
- truecrypt /tmp/hard
o Here's how you might use the chrooted environment

o Download a file such as gdbm-1.8.3.tar.gz:
- Use a non-root shell (i.e. no chroot yet)
- Download to ~/Desktop
- su - root
- (pw)
- cp /home/ron/Desktop/gdbm-1.8.3.tar.gz /chroot/etch
- Then in a chroot shell (you'll be in /root, having logged in as root):
- cp /gdbm-1.8.3.tar.gz .
- tar xvzf gdbm-1.8.3.tar.gz
- cd gdbm-1.8.3
- ./configure
- make
- make test
- make install
- Etc

o Here's another example, this time with a Perl package:
- If it is necessary to create a local copy of an official Debian package, eg libcache-memcached-perl:
- cd into your /chroot/lenny env
- apt-get source libcache-memcached-perl
- cd libcache-memcached-perl-1.24/
- edit files, including debian/changelog
- debuild
- Now, if debuild complains about things like:
- E: libcache-memcached-perl: perl-module-in-core-directory usr/lib/perl/5.10/ (no leading /)
- See if you can remove that dir, hopefully because nothing important is in it. Instructions follow
- Similar comments apply to errors such as:
- E: libcache-memcached-perl: perl-module-in-core-directory usr/lib/perl/5.10/perllocal.pod
- and references to .packlist.
- This is how to do it:
- Work in temp/ for cleanliness:
- mkdir temp
- cd temp
- cp ~/libcache-memcached-perl*.deb .
- ar x libcache-memcached-perl_1.24-2_all.deb
- Next, work in data/ because data.tar.gz does not use data/ in the file names:
- mkdir data
- cd data
- tar zxvf ../data.tar.gz
- rm -rf usr/lib/
- tar zcvf data.tar.gz *
- mv data.tar.gz ..
- cd ..
- Warning: In the next line, debian-binary must be first in the archive:
- ar r libcache-memcached-perl_1.24-2_all.deb debian-binary control.tar.gz data.tar.gz
- Make sure you use the new version, by overwriting the old one:
- mv libcache-memcached-perl_1.24-2_all.deb ..
- cd ..
- dpkg -i libcache-memcached-perl_1.24-2_all.deb
- dpkg -L libcache-memcached-perl
o Build using [[dh-make-perl]]
o AlwaysVPN

o HotSpotShield

o HotSpotVpn

o OpenVPN

o WiTopia has personalVPN
o Finding the path to a module:
- This works:
ron@zoe:~$ perl -e 'use CGI; print "$INC{q|CGI.pm|}\n"'
/usr/local/share/perl/5.10.0/CGI.pm

- This fails:
ron@zoe:~$ perl -e 'use CGI; print "$INC{CGI.pm}\n"'

- Why does quoting the hash key make a difference?
Try use warnings to see!

o Avoid:
- Module::Pluggable
- XML with AJAX. Use JSON

o Use Config::Merge to read several config files

o CPAN::Porters

o Proc::SafeExec

o Proc::Daemon: http://use.perl.org/~ddick/journal/34944

o ExtUtils::PackList contains modrm

o Mail::Toaster

o IO::CaptureOutput: Good. But now we use Capture::Tiny

o Perl lib for testing:
- perl -Ilib t/x.t

o Releasing Perl modules:
# Check:
- sub new to use $class and not $caller
- t/pod.t to be present
- $VERSION to match 'modules' database
- PPDs on my web site to be up-to-date
- Makefile.PL to work
# Create c:/perl-modules/x-y-1.00/* with build-module X::Y 1.00
# Add module to 'modules' database, with module_registered = 'Yes'
# Via CGI, make distro. This:
        - copies to /homepage/Perl-modules/pod/x/y.pm
        - copies to /homepage/Perl-modules/x-y-1.00.tgz
        - copies to /perl-modules/x-y-1.00.tgz
        - updates 'modules' database
# Edit /home/page/Pages/web-site.xml to announce new module
# Build web site, with
  cd /homepage/Pages
  build > build.log
  This creates HTML from *.pm
# Upload files to savage.net.au (& delete previous version):
  - /homepage/Perl-modules/html/x/y.html
  - /homepage/Perl-modules/x-y-1.00.tgz
  - /homepage/index.html
  - /homepage/Perl-modules.html
  Note: May need to upload:
  - Books
  - Wines
# Install from savage.net.au, with
  {{{ppm install --location=http://savage.net.au/Perl-modules/ppm X::Y}}}
# Upload to PAUSE
  - Also, delete previous version(s)
# Announce on comp.lang.perl.announce
o http://gnomefiles.org

o http://freshports.org

o http://gnuwin.org

o http://www.osalt.com

o http://www.lugod.org
o htdigest

o vsftpd
o TiddlyWiki converts double hyphen to strikeout, so in this document I (used to) use -.- to represent double hyphen. So, cutting-and-pasting can be a trap.

o The way around it is to use TiddlyWiki's syntax """{{{ ... }}}""" to stop interpretation

o Sometimes, 'I' refers to the author of the text I've cut-and-pasted.
o witopia.net

o The Age: 4.5 *
o If you select a screen resolution not supported by the hardware or sortware:
- sudo dpkg-reconfigure xserver-xorg
will set up /etc/X11/xorg.conf with a list of possible resolutions, and
- ~/.gconf/desktop/gnome/screen/default/0/\%gconf.xml
will hold the currently selected resolution, and hence can be edited
o I prefer aptitude to apt-get almost always.

o 'apt-cache showpkg $p' shows dependencies whereas 'aptitude show $p' does not

o apt-cache does not find things like apt-file

o apt-file takes a file name:
- For Module::Build say, use apt-file search Build.pm

o If 'aptitude update' produces an error msg about cannot resolve on every line of source.list:
- Run {{{dpkg --purge resolvconf}}} (note spelling)

o Just before reading about edits to /etc/apt/sources.list:
- Don't forget to run {{{aptitude update}}} after editing it!

o aptitude and apt-get use /etc/apt/sources.list.
- On my laptop (running testing) it is (although I personally don't use Wx):
- The contents:
deb http://ftp.au.debian.org/debian/ lenny main contrib non-free
deb-src http://ftp.au.debian.org/debian/ lenny main contrib non-free

deb http://ftp.au.debian.org/debian/ squeeze main contrib non-free
deb-src http://ftp.au.debian.org/debian/ squeeze main contrib non-free

deb http://security.debian.org/ lenny/updates main contrib
deb-src http://security.debian.org/ lenny/updates main contrib

deb http://apt.wxwidgets.org/ lenny-wx main
deb-src http://apt.wxwidgets.org/ lenny-wx main

o On my desktop (running stable) /etc/apt/sources.list:
- To enable backports:
- wget -q http://backports.org/debian/archive.key -O- | apt-key add -
- The contents:
deb http://mirror.pacific.net.au/debian/ lenny main contrib non-free
deb-src http://mirror.pacific.net.au/debian/ lenny main contrib non-free

deb http://www.backports.org/debian/ lenny-backports main contrib non-free
deb-src http://www.backports.org/debian/ lenny-backports main contrib non-free

deb http://security.debian.org/ lenny/updates main non-free
deb-src http://security.debian.org/ lenny/updates main non-free

deb http://volatile.debian.org/debian-volatile lenny/volatile main non-free
deb-src http://volatile.debian.org/debian-volatile lenny/volatile main non-free

o Nice-to-haves:
- aptitude install locales
- dpkg-reconfigure locales
- Select both en_AU.* & ok
- Select en_AU.UTF-8* & ok
- Check by running shell>perl
- There should be no output
- aptitude install cvs
- aptitude install devscripts
- aptitude install apt-file
- apt-file update
- aptitude install debhelper
- aptitude install debmake (etch, not lenny; lenny has debhelper, see /usr/bin/db_*)
- aptitude install [[dh-make-perl]]

o To stop an upgrade from the current version of a package to a more recent version, edit debian/changelog thus:
- libsoap-lite-perl (2:0.55-1.local.2) unstable; urgency=low
- Note the '2:'
o Tag: Forbid upgrading
o Get from github
o Read README
o Installs /var/www/htdocs/cgit/cgit.cgi instead of:
- /var/www/
- /usr/lib/cgi-bin/
o To install other versions of Debian within your current Debian, use chroot and debootstrap:
- cat /etc/debian_version
- 4 (i.e. etch)
- 5.0.3 (i.e. lenny)
- cat /etc/issue
- Debian GNU/Linux 5.0 \n \l (i.e. lenny)
- Debian GNU/Linux squeeze/sid \n \l (i.e. testing)

o Let's install etch (V 4). My current version is lenny (V 5):
- su - root
- mkdir /chroot
- The name /chroot is not mandatory, but sure helps
- cd /chroot
- aptitude install debootstrap
- debootstrap etch /chroot/etch
- cd etch
- chroot . (note the '.')
- cat /etc/debian_version
- You can now work in /chroot/etch as though it were etch. Occasionally you'll get a warning message about some file not being writable. Just ignore it.
- Similarly for lenny

o Within the newly-installed version, edit /etc/apt/source.list as appropriate for etch or lenny:
- See [[aptitude]], including {{{aptitude update}}}!

o Lastly, if you have a file of favourites, e.g. ~/.bash_aliases, copy it to /chroot/etch.

o See [[Using chroot]]
o See [[chroot]]
o Running dh-make-perl:
- See http://www.debian-administration.org/articles/78
- Copy to *.noxs and *.xs
o Install x.deb:
- dpkg -i x.deb

o Installing with force:
- {{{dpkg -i --force-overwrite libdata-pageset-perl_1.06-1_all.deb}}}

o Status report:
- dpkg-query -W -f='${Package} ${Status}\n' libdata-pageset-perl

o Reporting the installed status of a package:
- dpkg -l libdata-pageset-perl

o Reporting the contents of a package
- dpkg -L libdata-pageset-perl

o Find which package a file is in:
- dpkg -S statgraph.cgi

o List files installed from a package:
- dpkg -L libdata-pageset-perl

o If dpkg fails with:
dpkg: dependency problems prevent configuration of libdata-pageset-perl
libdata-pageset-perl depends on xyz, then:
- aptitude install xyz
- Repeat dpkg command

o Libraries required to build emacs:
http://www.emacswiki.org/cgi-bin/emacs-en/EmacsOnGnuLinux
Note: After emacs is built, it reports not finding Xaw3dg (note the capital X)

o Download:
http://www.gnu.org/software/emacs/#Obtaining

o Build:
http://www.emacswiki.org/cgi-bin/emacs-en/EmacsOnGnuLinux

o Customization:
- Require to chop trailing spaces
- Require to set tabstops each time emacs starts
- Require to sometimes add \n to a file's last line
o sudo aptitude install curl

o curl http://apt.wxwidgets.org/key.asc | sudo apt-key add -

o sudo aptitude install pkg-config

o sudo aptitude install libgtk2.0-dev

o cd /path/to/wxGTK/src/
- ../configure -.-with-gtk -.-enable-gtk2 -.-enable-unicode
- make
- sudo make install
# Install wxWidgets contrib modules.
- cd contrib/
- make
- sudo make install
- Note: I've read that a script is included in the pgAdmin source tarball 
(xtra/wx-build/build-wxgtk) which will build and install wxWidgets in each 
combination of shared/static/debug/release builds for you.
   
o Unpack the pgAdmin tarball to a convenient location, and build and install it 
   as follows:
- sh bootstrap	# Required only if building from an SVN checkout
- sudo aptitude install libxml2-dev
- sudo aptitude install libxslt-dev
- ./configure
- make all
- sudo make install