Sunday, September 2, 2018

Impara a Programmare in Dieci Anni - salvato da CulturaHacker.it


Impara a Programmare in Dieci Anni

Peter Norvig


Perché tutti vanno di fretta?


Passeggiate in qualsiasi libreria, e vedrete come accanto a Impara Java in 7 Giorni sono presenti infinite variazioni sul tema che pretendono di insegnare Visual Basic, Windows, Internet e altro in pochi giorni o ore. Ho fatto la seguente ricerca di tipo power search su Amazon.com:


pubdate: after 1992 e title: days e
(title: learn o title: teach yourself)


e ho ottenuto 248 risultati. I primi 78 erano libri di informatica (il 79-esimo era Impara il Bengalese in 30 giorni). Ho allora sostituito days con hours ed ho ottenuto un risultato simile: 253 libri, di cui 77 di informatica seguiti da Impara la Grammatica e lo Stile in 24 ore alla 78-esima posizione. Dei primi 200, il 96% erano libri di informatica.


La conclusione è che le persone vanno molto di fretta quando devono imparare qualcosa sui computer, oppure che i computer sono qualcosa di favolosamente facile da imparare rispetto a qualsiasi altra cosa. Non ci sono libri su come imparare Beethoven, o la Fisica dei Quanti, o perfino l'Addestramento dei Cani in pochi giorni.


Proviamo ad analizzare cosa un titolo del tipo Impara il Pascal in Tre Giorni potrebbe significare:


  • Impara:

    In 3 giorni non avrete il tempo di scrivere alcun programma significativo, e con esso imparare dai vostri successi e sconfitte. Non avrete il tempo di lavorare con un programmatore esperto e capire com'è vivere in quell'ambiente. In breve, non avrete tempo di imparare molto. Quindi si può parlare di una familiarità superficiale, non di conoscenza profonda. Come disse Alexander Pope, un po' di sapere è pericoloso.

  • Pascal:

    In 3 giorni potreste imparare la sintassi del Pascal (se già conoscete un linguaggio simile), ma non potrete imparare molto su come usare quella sintassi. In breve, se foste, diciamo, un programmatore Basic, potreste imparare a scrivere programmi in stile Basic usando la sintassi del Pascal, ma non potrete imparare per cosa il Pascal va bene (e non). Qual è il punto? Alan Perlis una volta disse: Un linguaggio che non influenza il modo di pensare la programmazione, non vale la pena conoscerlo. Una cosa possibile è che dovete imparare una piccola parte del Pascal (o più probabilmente, qualcosa del tipo Visual Basic o JavaScript) perché avete bisogno di interfacciarvi con qualcosa di esistente per portare a termine un compito specifico. Ma allora non state imparando a programmare; state imparando a completare quel compito.

  • in Tre Giorni:

    Sfortunatamente, non è abbastanza, come la prossima sezione dimostra.


Impara a Programmare in Dieci Anni


Alcuni ricercatori (Hayes, Bloom) hanno dimostrato che sono necessari circa dieci anni per sviluppare esperienza in una gran varietà di campi, inclusi il gioco degli scacchi, la composizione musicale, la pittura, il suonare il pianoforte, il nuoto, il tennis, le ricerche in neuropsicologia e in topologia. Non sembrano esserci scorciatoie: anche per Mozart, che era un prodigio musicale a 4 anni, ci vollero altri 13 anni prima di iniziare a produrre musica di levello mondiale. In un altro genere, i Beatles sembrano comparire sulle scene con una #1 hits e un'apparizione nello show di Ed Sullivan nel 1964. Ma hanno suonato in piccoli club a Liverpool e Amburgo fin dal 1957, e nonostante siano piaciuti immediatamente, il loro primo grande successo, Sgt. Peppers, fu inciso nel 1967. Samuel Johnson pensava ci volessero più di dieci anni: L'eccellenza in un campo qualsiasi può essere raggiunta solo attraverso il lavoro di una vita: non si può acquistare ad un prezzo inferiore. E Chaucer aggiunse La vita è così breve, l'arte così lunga da imparare.


Questa è la mia ricetta per avere successo nella programmazione:


  • Siate interessati alla programmazione, e fatene perché è divertente. Siate sicuri che sia sufficientemente divertente così da portarla avanti per dieci anni.

  • Parlate con altri programmatori; leggete altri programmi. È più importante di qualsiasi libro o corso.

  • Programmate. Il modo migliore di imparare è imparare facendo. Per essere più tecnici, il massimo livello di prestazioni per gli individui in un dato dominio non è automaticamente una funzione dell'esperienza generale, ma può essere incrementato anche dagli individui di grande esperienza come risultato di un deliberato sforzo per migliorare. (p. 366) e il modo migliore per imparare richiede un compito ben definito con un livello di difficoltà appropriato per l'individuo in questione, una retroazione informativa, e l'opportunità per la ripetizione e la correzione degli errori. (p. 20-21) Il libro Cognizione in Pratica: Mente, Matematica, e Cultura nella Vita di tutti i giorni è un riferimento interessante per questo punto di vista.

  • Se volete, frequentate un'università. Vi darà accesso ad alcuni lavori che richiedono credenziali, e vi darà una conoscenza più profonda del campo, ma se la scuola non vi piace, potete (con qualche attenzione) ottenere un'esperienza simile sul lavoro. In ogni caso, imparare solo dai libri non è abbastanza. L'educazione nella computer science non può rendere nessuno un programmatore esperto più che studiare pennelli e colori possa rendere qualcuno un pittore esperto dice Eric Raymond, autore di Il Nuovo Dizionario Hacker. Uno dei migliori programmatori che ho mai assunto aveva solo il titolo di Scuola Superiore; ha prodotto una gran quantità di ottimo software, ha un proprio newsgroup, e ha guadagnato abbastanza in stock options per comprarsi un proprio nightclub.

  • Lavorate su progetti insieme ad altri programmatori. Siate il miglior programmatore in alcuni progetti; siate il peggiore in altri. Quando sarete il migliore, potrete testare le vostre abilità di guidare un progetto, e ispirare gli altri con la vostra visione. Quando sarete il peggiore, imparerete cosa fanno i maestri, e cosa non piace fare loro (perché lo faranno fare a voi).

  • Lavorate su progetti dopo altri programmatori. Siate interessati a capire un programma scritto da qualcun altro. Capite cosa voleva capire e aggiustate quando il programmatore originale non è in giro. Pensate a come progettare i vostri programmi per renderli più semplici per quelli che li manterranno dopo di voi.

  • Imparate almeno una mezza dozzina di linguaggi di programmazione. Includete un linguaggio che supporti l'astrazione in classi (come Java o C++), uno che supporti l'astrazione funzionale (come Lisp o ML), uno che supporti l'astrazione sintattica (come Lisp), uno che supporti le specificazioni dichiarative (come Prolog o i template del C++), uno che supporti le coroutine (come Icon o Scheme), e uno che supporti il parallelismo (come Sisal).

  • Ricordate che c'è la parola computer in computer science. Dovete sapere quanto tempo occorrerà al vostro computer per eseguire un'istruzione, leggere una parola dalla memoria (con e senza una cache miss), leggere parole consecutive dal disco, e cercare in una nuova locazione di memoria sul disco. (Risposte.)

  • Siate impegnati nello sforzo di standardizzazione di un linguaggio. Potrebbe essere il comitato per l'ANSI C++, oppure potrebbe essere decidere se nel vostro stile ci saranno 2 o 4 spazi per ogni livello di identazione. In ogni caso, imparerete cosa, in un linguaggio, piace ad altre persone, come profondamente lo sentono, e forse perfino perché lo sentono così.

  • Abbiate il buon senso di tirarvi fuori dalla standardizzazione del linguaggio il prima possibile.


Tenendo a mente tutto ciò, è opinabile quanto lontano potrete arrivare imparando dai libri. Prima che il mio primo figlio nascesse, lessi tutti i libri della serie Come Fare, e ancora mi sentivo come un novizio senza speranza. 30 mesi dopo, quando nacque il mio secondo figlio, tornai indietro ai libri per una rinfrescata? No. Invece, mi rifeci all'esperienza personale, che risultò essere molto più utile e rassicurante per me rispetto alle migliaia di pagine scritte da esperti.


Fred Brooks, nel suo saggio No Silver Bullets (Niente Pallottole d'Argento) ha identificato un piano in tre parti per trovare grandi progettisti di software:


  1. Identificare sistematicamente i migliori progettisti il prima possibile.

  2. Assegnare un mentore responsabile per lo sviluppo del prospetto e tenere con cura un archivio della carriera.

  3. Provvedere opportunità per progettisti in crescita di interagire e stimolarsi gli uni con gli altri.


Ciò assumendo che qualcuno già abbia le qualità necessarie per diventare un grande progettista; il lavoro consiste nel motivarli correttamente. Alan Perlis più succintamente: A chiunque può essere insegnato a scolpire: a Michelangelo si poteva insegnare come non farlo. Così è per i grandi programmatori.


Quindi andate avanti e comprate quel libro su Java; probabilmente ne farete un qualche uso. Ma non cambierete la vostra vita, o la vostra reale esperienza come programmatori in 24 ore, giorni, o anche mesi.




Riferimenti


Bloom, Benjamin (ed.) Sviluppare il Talento nei Giovani, Ballantine, 1985.


Brooks, Fred, No Silver Bullets, IEEE Computer, vol. 20, no. 4, 1987, p. 10-19.


Hayes, John R., Complete Problem Solver Lawrence Erlbaum, 1989.


Lave, Jean, Cognition in Practice: Mind, Mathematics, and Culture in Everyday Life, Cambridge University Press, 1988.




Risposte


Tempi approssimativi per varie operazioni su un tipico PC da 1GHz nell'estate 2001:


esecuzione di una singola istruzione 1 nsec = (1/1.000.000.000) sec
leggere una parola dalla cache L1 2 nsec
leggere una parola dalla memoria principale 10 nsec
leggere parole da posizioni sul disco consecutive 200 nsec
leggere una parola da una nuova posizione sul disco (seek) 8,000,000 nsec = 8 msec



Appendice: Scelta del Linguaggio


Molte persone hanno chiesto quale linguaggio di programmazione dovrebbero imparare per primo. Non c'è un'unica risposta, ma considerate questi punti:


  • Riferitevi ai vostri amici. Quando qualcuno chiede Quale sistema operativo dovrei usare, Windows, Unix, o Mac?, la mia risposta normalmente è: usate quello che i vostri amici usano. Il vantaggio che ne avrete imparando dai vostri amici compenserà ogni differenza intrinseca tra SO, o tra linguaggi di programmazione. Considerate anche i vostri amici futuri: la comunità di programmatori di cui farete parte se continuerete. Il linguaggio da voi scelto ha una comunità larga e crescente o una piccola e in estinzione? Ci sono libri, siti web, e forum online da cui avere risposte? Vi piacciono le persone che partecipano a questi forum?

  • Restare sul semplice. I linguaggi di programmazione come il C++ e Java sono progettati per lo sviluppo professionale da parte di grandi gruppi di programmatori con esperienza che sono interessati all'efficienza in fase di run-time dei loro codici. Come risultato, questi linguaggi hanno parti complicate progettate per queste circostanze. Voi siete interessati ad imparare a programmare. Non avete bisogno di queste complicazioni. Per voi va bene un linguaggio progettato per essere facile da imparare e ricordare da un singolo nuovo programmatore.

  • Giocate. In che modo preferireste imparare a suonare il pianoforte: nel modo normale, interattivo, in cui sentite ogni nota appena premete un tasto, o nel modo batch, in cui potete sentire le note solo dopo che avete finito un'intera canzone? Chiaramente, il modo interattivo rende più semplice imparare a suonare il pianoforte, e lo stesso vale per la programmazione. Insistete su un linguaggio che consente il modo interattivo e usatelo.


Dati questi criteri, la mia raccomandazione per un primo linguaggio di programmazione è Python o Scheme. Ma le vostre circostanze possono cambiare, e ci sono altre buone scelte. Se la vostra età è a singola cifra, probabilmente preferirete Alice o Squeak (anche i più anziani potrebbero preferirli). La cosa importante è scegliere e partire.




Appendice: Libri e Altre Risorse


Molte persone hanno chiesto da quali libri e pagine web dovrebbero studiare. Ripeto che imparare solo dai libri non è abbastanza ma posso consigliare i seguenti:





Note


T. Capey ha fatto notare che la pagina Complete Problem Solver su Amazon ora ha i libri Impara il Bengalese in 21 giorni e Impara la Grammatica e lo Stile nella sezione Utenti che hanno acquistato questo libro hanno anche acquistato questi oggetti. Immagino che la maggior parte delle persone che guardano il libro provengano da questa pagina.




Peter Norvig (Copyright 2001)

Tuesday, December 22, 2015

How to configure SSH tunneling for JMeter on remote host

We just need to add two tcp connection listening on each part.

1. Client - modify jmeter.properties file fixing remote_hosts:

remote_hosts=127.0.0.1:55511
client.rmi.localport=55512

2. Server - modify jmeter.properties file adding:

server_port=55511
server.rmi.localhostname=127.0.0.1
server.rmi.localport=55511

3. Connect to the server using:

  • Linux and Mac users
    ssh user@server -L 55511:127.0.0.1:55511 -R 55512:127.0.0.1:55512
  • Windows users
    putty.exe -ssh user@server -L 55511:127.0.0.1:55511 -R 55512:127.0.0.1:55512

4. Server - start jmeter

cd apache-jmeter-2.13/bin/
./jmeter-server -Djava.rmi.server.hostname=127.0.0.1

5. Client - start jmeter

cd apache-jmeter-2.13/bin/
./jmeter.sh -Djava.rmi.server.hostname=127.0.0.1 -t test.jmx

Tuesday, November 24, 2015

Connecting to remote Tomcat JMX instance using jConsole

Tried with Java 8

1. Add this to your java startup script on tomcat remote-host:

-Dcom.sun.management.jmxremote.port=1616
-Dcom.sun.management.jmxremote.rmi.port=1618
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false

2. Execute this on your computer.

  • Windows users:
    putty.exe -ssh user@remote-host -L 1616:remote-host:1616 -L 1618:remote-host:1618
  • Linux and Mac Users:
    ssh user@remote-host -L 1616:remote-host:1616 -L 1618:remote-host:1618
This enable jconsole to connect to a remote-host via few ssh tunnels.

3. Open jconsole on your computer

jconsole localhost:1616

4. Have fun!

P.S.: during step 2, using ssh and -L you specify that the ports 1616 and 1818 on the local (client) host is to be forwarded to the remote side.

Saturday, August 29, 2015

Kubernetes - Azure - remove annoying message 'enter your password for the ssh key'

Trying Kubernets on Azure has been a very painful experience, especially because I were unable to start both the examples presented in the documentation.

I discovered they are bugged, in this post I explain how to overcome the bug present in the first one.

https://github.com/kubernetes/kubernetes/blob/master/docs/getting-started-guides/coreos/azure/README.md

https://github.com/kubernetes/kubernetes/blob/master/docs/getting-started-guides/azure.md

After have successfully executed the create-kubernetes-cluster.js I was unable to follow the guide because every time I try to connect via ssh I was prompted by an annoying message:  "Enter your password for the SSH key"



after a long search I figured out the problem.
The easiest way to avoid this popup is patch the SSH key using the command:

openssl rsa -in ./output/kube_7c84ff0d2685e5_ssh.key -out ./output/kube_7c84ff0d2685e5_ssh.key

finally you can execute:

ssh -F  ./output/kube_7c84ff0d2685e5_ssh_conf kube-00

and continue with the guide.

Friday, January 30, 2015

Vagrant AWS - Chef::Exceptions::InvalidDataBagPath

During Chef execution on a AWS provisioning Vagrant returned the following error:


==> default: Chef::Exceptions::InvalidDataBagPath
==> default: ------------------------------------

==> default: Data bag path '/tmp/vagrant-chef/fdc6caf9a3118279699556aed8f850d7/data_bags' is invalid

To fix this error, just create data_bags directory (if there isn't already) and add chef.data_bags_path configuration this in your VagrantFile


  config.vm.provision :chef_solo do |chef|

    # insert here
    chef.data_bags_path = "./data_bags"

  end

Thursday, January 29, 2015

AWS Vagrant "No host IP was given to the Vagrant core NFS helper"


During the provision of an AWS environment with vagrant:

vagrant up --provision aws 

This command returned

No host IP was given to the Vagrant core NFS helper. This is an internal error that should be reported as a bug.

It was quite hard understand why vagrant is trying to use NFS, even because it should be disabled, on AWS synced_folder are copied using rsync. 
At last I found this link "Error: No host IP was given to the Vagrant core NFS helper" in 0.2.0 #5 https://github.com/gosddc/vagrant-vcenter/issues/5

where is suggested to use

config.nfs.functional = false

If you have a multi environment configuration like me, I suggest to use:

  config.vm.provider :aws do |aws, override|
    ...
    override.nfs.functional = false
  end

Wednesday, January 14, 2015

How to create a Vagrant Box for VirtualBox

I had to create an development environment and the target was an old Centos version (6.2).

But following steps, in my humble opinion, are applicable also to early versions of Centos and maybe, with the right precautions, even in different distributions:

I have downloaded and installed the minimal iso (CentOS-6.2-x86_64-minimal.iso) and created a new virtualbox machine.

Choose to have enough memory
Choose an hard drive large enough


Disable unnecessary devices like usb, audio.


Setup port ssh port forwarding



Configure default CD/DVD drive to mount CentOS-6.2-x86_64-minimal.iso file


Now you can boot the virtual machine and follow the step by step installation.

Leave everything as default and set root password to "vagrant".

When the virtual machine is up and running login as root/vagrant.

Now you need to configure eth0 network card:

# vi /etc/sysconfig/network-scripts/ifcfg-eth0

and add/change following lines:

ONBOOT=yes
BOOTPROTO=dhcp

now reboot and install sudo:

# yum install sudo

then you need to add default vagrant user:

# vi /etc/sudoers.d/vagrant

# vagrant ALL=(ALL) NOPASSWD:ALL

# groupadd -g 900 vagrant
# adduser -m -g 900 -u 900 vagrant -p vagrant

Set the password "vagrant"

# passwd vagrant 

now you need to install openssh-server and configure ssh authorized_keys in order to enable vagrant remote configuration and provisioning:

# sudo yum install openssh-server
# sudo yum install wget

# mkdir -p /home/vagrant/.ssh 
# chmod 0700 /home/vagrant/.ssh 
# wget --no-check-certificate https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub -O /home/vagrant/.ssh/authorized_keys 
# chmod 0600 /home/vagrant/.ssh/authorized_keys 
# chown -R vagrant /home/vagrant/.ssh

Now we need to adjust few little settings in order to let everything work:

# vi /etc/ssh/sshd_config

and uncomment line with:

AuthorizedKeysFile      .ssh/authorized_keys 

Edit sudoers configuration

# vi /etc/sudoers

now we need to comment line with:

# Defaults requiretty

We have almost finished, we need to install Virtual Box Guest Additions. To do this we need to install few required packages:

# yum install gcc build-essential linux-headers-server kernel-devel perl acpid

Now you can mount Guest Additions CD from Virtual Box menus:

VirtualBox Machine -> Devices -> Insert Guest Additions CD Image... (Host + D)

# sudo mkdir /media/cdrom
# sudo mount /dev/cdrom /media/cdrom/
# cd /media/cdrom/
# ./VBoxLinuxAdditions.run 

In my case, during VBoxLinuxAdditions execution I had the following error:

Building the VirtualBox Guest Additions kernel modules
The headers for the current running kernel were not found. If the following
module compilation fails then this could be the reason.
The missing package can be probably installed with
yum install kernel-devel-2.6.32-220.el6.x86_64

Building the main Guest Additions module                   [FAILED]
(Look at /var/log/vboxadd-install.log to find out what went wrong)

You can avoid the problem installing manually the required package:

# cd ~/
# wget ftp://ftp.pbone.net/mirror/ftp.scientificlinux.org/linux/scientific/6.0/x86_64/updates/security/kernel-devel-2.6.32-220.el6.x86_64.rpm

# yum install kernel-devel-2.6.32-220.el6.x86_64
# cd /media/cdrom/ 
# ./VBoxLinuxAdditions.run 

Verifying archive integrity... All good.
Uncompressing VirtualBox 4.3.20 Guest Additions for Linux............
VirtualBox Guest Additions installer
Removing installed version 4.3.20 of VirtualBox Guest Additions...
Copying additional installer modules ...
Installing additional modules ...
Removing existing VirtualBox non-DKMS kernel modules       [  OK  ]
Building the VirtualBox Guest Additions kernel modules
Building the main Guest Additions module                   [  OK  ]
Building the shared folder support module                  [  OK  ]
Building the OpenGL support module                         [  OK  ]
Doing non-kernel setup of the Guest Additions              [  OK  ]
Starting the VirtualBox Guest Additions                    [  OK  ]
Installing the Window System drivers

Could not find the X.Org or XFree86 Window System, skipping.

Now your virtual box machine is ready to be used as vagrant box. You can shutdown it and package with the following command:

$ vagrant package --base vagrant-centos-6.2-x64


Wednesday, October 23, 2013

Mongodb won't start after OS X Mavericks update

Well, if you are in trouble like me, very likely you have my same problem.

After OS X Mavericks update, my mongodb is unable to start.
I found that _mongo user is missing.

Oct 23 11:17:11 mymacbookpro ManagedClient[1497]: FAILURE: Job com.apple.ManagedClient.enrollagent is not loaded in launchd.

Oct 23 11:17:18 mymacbookpro sudo[1500]:     root : unknown user: _mongo

If you're are looking for a quick and dirty solution at this problem, you could just change the user configured to run mongodb into your current user.

Open Terminal and type:

$ sudo vi /Library/LaunchDaemons/org.macports.mongodb.plist

Change running user (_mongo) into your user:

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd" >
<plist version='1.0'>
<dict>
<key>Label</key><string>org.macports.mongodb</string>
<key>ProgramArguments</key>
<array>
<string>/opt/local/bin/daemondo</string>
<string>--label=mongodb</string>
<string>--start-cmd</string>
<string>sudo</string>
<string>-u</string>
<string>_mongo</string>
<string>/opt/local/bin/mongod</string>
<string>--dbpath</string>
<string>/opt/local/var/db/mongodb</string>
<string>--logpath</string>
<string>/opt/local/var/log/mongodb/mongodb.log</string>
<string>--logappend</string>
<string>;</string>
<string>--pid=exec</string>
</array>
<key>Debug</key><true/>
<key>Disabled</key><true/>
<key>KeepAlive</key><true/>
</dict>
</plist>


Then execute:

sudo chown -R freedev: /opt/local/var/db/mongodb/
sudo chown -R freedev: /opt/local/var/log/mongodb/
sudo port unload mongodb
sudo port load mongodb


If you are always unsatisfied by quick and dirty solution, a much cleaner way is create a new user for mongodb, here the steps I found:

Try using the following commands:

sudo dscl . -create /Users/_mongo
sudo dscl . -create /Users/_mongo UserShell /var/empty

You need to add _mongo to admin group, in order to let mongodb listen a network port:

sudo dscl . -append /Groups/admin GroupMembership _mongo

Now you must assign the new unique id to _mongo. I choose the unique id used by my last _mongo user:

sudo dscl . -create /Users/_mongo UniqueID 507


On the other hand _mongo group still exist on my mac so I reused the existing group:

sudo dscl . list /groups PrimaryGroupID  | grep mongo

_mongo                           504

Now we can assign _mongo. I have just reassigned the unique id that the :

sudo dscl . -create /Users/_mongo PrimaryGroupID 504



This just to be sure your filesystem permission are ok with _mongo:

sudo chown -R _mongo: /opt/local/var/db/mongodb/
sudo chown -R _mongo: /opt/local/var/log/mongodb/

Have fun!

Saturday, July 2, 2011

mediawiki - Migrating away from vqwiki

Some time ago we had to migrate all pages of our Wiki, these few lines describe my little adventure.

For historical reasons we adopted VQWiki. Well, I must admit that for a long time not only it met our needs, but even brought a new way to write documentation, whereas official instrument was ms sharepoint. All right then, but at some point, however, we felt the need to change and the reasons that brought us up this direction were many:
  • VQWiki has become a project no longer maintained (last product update was on 03/2009)
  • has some bugs that were becoming really boring. For example, thus tables has no borders, you had to add an HTML style tag directly in page, in order to redefine table css class.
  • VQWiki housed much of our (precious) documentation.
We need a more flexible product, which gives us security and continuity. So with last project startup, I decided to migrate to a new product. Among many Wiki available on Internet my choice fell on MediaWiki , then in version 1.16.5.

Note that in our case VQWiki saved all pages as text files. So this post cannot help you much if your VQWiki use a database to persist pages. Whereas explains how to manipulate files and turn them into a format compatible with import utility provided by MediaWiki.

Let's finally be comfortable starting our 15 easily steps of VQWiki migration. Please download scripts here.

I assume you have already successfully installed and configured MediaWiki.
You must copy scripts in MediaWiki maintenance directory (first level inside docroot). For sake of simplicity this directory could be:

cd /var/www/mediawiki/maintenance

Scripts to be copied are:

mediawiki_import.sh - a bash script that takes care of iterating over all files (old wiki'w pages) for each running patch_vqwiki.pl

patch_vqwiki.pl -  Useful to convert VQWiki format tags. Just to be clear, I'm not a Perl guru, i.e. probably this script could be done better. Anyway, it seemed the right language to run a pattern matching and replacing task on a large number of files. Also it was an opportunity to learn Perl.
This code that takes care of modifying pages' structure. Takes as input a file format VQWiki and generates a new file in a format that it 'can then be processed importTextFile.php (utility directly available in MediaWiki).
We have many tags to be converted, most important are those relating to formatting (i.e. bold, headings, tables, etc..), attachments and images (i.e. img, doc, pdf, ppt, etc.)..

At end of text pages conversion process, we must run utility importImages.php for all images and attachments.
Don't let name importImages.php fool you, this utility analyze and load any type of file, you must simply specify the extension. In my case I needed "only" png, jpg, jpeg, gif, zip, doc, pdf, rtf, zip, xls, xlsx, xml, ppt, docx ...
Obviously, if extension you need is not listed in this list, just add a line to script by specifying correct parameter --extensions

Friday, April 1, 2011

XCode4 Debugging Problem - warning: Unable to read symbols libXcodeDebuggerSupport.dylib (file not found)

Hello,

after iOS update to 4.3.1 returned this annoying bug.

warning: Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.3.1 (8G4)/Symbols/Developer/usr/lib/libXcodeDebuggerSupport.dylib (file not found)

And you cannot debug remotely your apps.
Basically that's happen because directory /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.3.1 (8G4)/Symbols/Developer does not exist (may be we must wait Xcode update).

To fix this issue you could just execute following command:

$ cd /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.3.1\ \(8G4\)/Symbols/
$ sudo ln -s /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk/Developer/ Developer

Tuesday, September 9, 2008

You are not privileged to mount the volume ipod

Hi all,

if you have problem mounting your ipod nano on your linux ubuntu, and receive the message "You are not privileged to mount the volume..." here is a little trick to avoid this.

First you have to identify the UUID of your Ipod, to found yhe correct value you need to submit the following command:

$ ls -al /dev/disk/by-uuid/

total 0
drwxr-xr-x 2 root root 220 2008-09-09 01:58 .
drwxr-xr-x 6 root root 120 2008-09-06 13:25 ..
lrwxrwxrwx 1 root root 55 2008-09-06 13:25 0d007227-430b-41ab-98cd-e91638fb7081 -> ../../mapper/1ATA_SAMSUNG_SP2004C_S07GJ1OL808326_-part5
lrwxrwxrwx 1 root root 55 2008-09-06 13:25 4595-C869 -> ../../mapper/1ATA_SAMSUNG_SP2004C_S07GJ1OL808326_-part3
lrwxrwxrwx 1 root root 55 2008-09-06 13:25 4599-BB54 -> ../../mapper/1ATA_SAMSUNG_SP2004C_S07GJ1OL808326_-part9
lrwxrwxrwx 1 root root 10 2008-09-06 11:25 74E7-61CC -> ../../sdf1
lrwxrwxrwx 1 root root 36 2008-09-09 01:58 7C78-1A23 -> ../../mapper/2000a270012eb5109-part2
lrwxrwxrwx 1 root root 55 2008-09-06 13:25 a6d8d957-d81d-4855-9387-ea90ad046d94 -> ../../mapper/1ATA_SAMSUNG_SP2004C_S07GJ1OL808326_-part6
lrwxrwxrwx 1 root root 55 2008-09-06 13:25 bbf3d35c-b07f-4277-a9fa-037cc4ba9bbf -> ../../mapper/1ATA_SAMSUNG_SP2004C_S07GJ1OL808326_-part7
lrwxrwxrwx 1 root root 55 2008-09-06 13:25 D80400CE0400B194 -> ../../mapper/1ATA_SAMSUNG_SP2004C_S07GJ1OL808326_-part1
lrwxrwxrwx 1 root root 55 2008-09-06 13:25 f06fd980-b709-4bf7-aab4-4fa2cc218df3 -> ../../mapper/1ATA_SAMSUNG_SP2004C_S07GJ1OL808326_-part8


In my case the correct line is the bolded. You should find the correct inserting and removing the ipod, the new line you see in the list when the ipod is connected is your ipod.

Be sure the directory /media/IPOD exist and you have the priviledge.
You could create the directory submitting the following command:

$ sudo mkdir /media/IPOD

You should also add your user into the group plugdev

$ sudo usermod -a -G plugdev yourusername

You have to modify the fstab adding a new row at the end of file:

UUID=Your_UUID_Here /media/IPOD vfat rw,noauto,nosuid,nodev,noatime,user

in my case:

UUID=7C78-1A23 /media/IPOD vfat rw,noauto,nosuid,nodev,noatime,user


That's all, it should work...

Friday, January 18, 2008

How to create a forward proxy for development environment with Apache 2.2

Often web developers need to have a hosts file tricked to point to development intranet simulating a connection to the production site. This is done because they need to simulate the real production site before deploy their changes into real word.

In some case, you can waste a lot of time configuring your hosts file, especially some genius thought that could be funny change dynamically the server name for each page published. Something like article-1-blah-blah.domain.tld, article-2-yes-or-no.domain.tld, and so on...
Well, when there are a lot of developers working on the same project could happen that every developer have his own host file, with his own modification, in this case you could waste a lot of your time trying to came out to this sort of situation.

I would like to share my experience done in these days and I need to solve this problem trying two different solution.

I configured a Bind 9 DNS server for the development staff, but in a few days I discovered that this approach have some lack. First of all (like the hosts file), when you modify the network configuration all the application will be involved in the modification, so you can't have an application connected to the production and another connected to the development environment. Then not every body can change their network configuration (in this case I mean the DNS settings), because of network security policy.

A better solution is to use a forward proxy configured into the development intranet, that can forward internally requests for a defined group of domains and leave the browsers free to interact transparently with the rest of the world.

In the following I'll show you how to configure this kind of proxy in a easy and fast way. You need to install apache 2.2 (I think an older version could work well, but you'll need to do some adjustment).

In Ubuntu the installation it is quiet easy:

$ sudo apt-get install apache2 apache2.2-common

after you need to enable the proxy module:

$ sudo a2enmod proxy
$ sudo a2enmod proxy_connect
$ sudo a2enmod proxy_http

then you probably want to have the proxy listening on a particular port, like the 8888.
So you need to modify the /etc/apache2/ports.conf adding a new line:

Listen 8888

Now you can create a new virtual host, listening on 8888, able to be a forward proxy.
So create /etc/apache2/sites-available/myproxy

and put the following line inside:

<VirtualHost *:8881>
ServerAdmin webmaster@localhost

ErrorLog /var/log/apache2/myproxy_error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel debug

CustomLog /var/log/apache2/myproxy_access.log combined
ServerSignature On

ProxyRequests On
ProxyVia On
ProxyPreserveHost On

<Proxy *>
Order deny,allow
Deny from all
Allow from 10.172.0.0/255.255.0.0
Allow from 172.16.0.0/255.255.0.0
Allow from 127.0.0.1
</Proxy>

AllowCONNECT 443

# Filters
ProxyRemote http://blog.productiondomain.tld/ http://dev-1.develp-domain.tld
ProxyRemote http://news.productiondomain.tld/ http://dev-2.develp-domain.tld
ProxyRemoteMatch http://(.*).forum.(.*).productiondomain.tld/ http://dev-3.develp-domain.tld
ProxyRemoteMatch http://(.*).customercare.productiondomain.tld/ http://dev-4.develp-domain.tld

# all the productiondomain.tld rest...
# ProxyRemoteMatch http://(.*).productiondomain.tld/ http://devlx1-new.bko.vtin.net

</VirtualHost>

Sunday, January 13, 2008

How to share HTTP and HTTPS port between Zimbra and Apache 2.2

After you have installed Zimbra, you could have some problem if you need to share http (port 80) and/or https (port 443) between Zimbra and Apache.
To do this you need change the http/https ports to a new values (port 8080/8443), remember to be logged as zimbra user:
$ zmprov ms zimbra.mydom.com zimbraMailPort 8080
$ zmprov ms zimbra.mydom.com zimbraMailSSLPort 8443
Look at zmtlsctl to see how to choose which port do you want enable: http, After you need to restart zimbra:
$ zmcontrol stop
$ zmcontrol start

Now you can check if the port are really changed:

$ netstat -ltnp
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:389 0.0.0.0:* LISTEN 8802/slapd
tcp 0 0 127.0.0.1:10024 0.0.0.0:* LISTEN 9310/amavisd (maste
tcp 0 0 127.0.0.1:10025 0.0.0.0:* LISTEN 9358/master
tcp 0 0 127.0.0.1:7306 0.0.0.0:* LISTEN 9101/mysqld
tcp 0 0 127.0.0.1:7307 0.0.0.0:* LISTEN 9036/mysqld
tcp 0 0 0.0.0.0:465 0.0.0.0:* LISTEN 9358/master
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 9358/master
tcp 0 0 0.0.0.0:993 0.0.0.0:* LISTEN 9249/java
tcp 0 0 0.0.0.0:995 0.0.0.0:* LISTEN 9249/java
tcp 0 0 0.0.0.0:7780 0.0.0.0:* LISTEN 9285/httpd
tcp 0 0 0.0.0.0:110 0.0.0.0:* LISTEN 9249/java
tcp 0 0 0.0.0.0:143 0.0.0.0:* LISTEN 9249/java
tcp 0 0 0.0.0.0:7025 0.0.0.0:* LISTEN 9249/java
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 6040/sshd
tcp 0 0 0.0.0.0:7035 0.0.0.0:* LISTEN 9249/java
tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 9249/java
tcp 0 0 0.0.0.0:8443 0.0.0.0:* LISTEN 9249/java
tcp 0 0 0.0.0.0:7071 0.0.0.0:* LISTEN 9249/java

Now you can begin to configure apache to access zimbra via reverse proxy. First of all you need to create a new file ssl-zimbra-reverse-proxy into /etc/apache2/sites-available representing the new virtual host

<VirtualHost *:443>
ServerName webmail.zimbra.tld
ServerAlias webmail.zimbra.tld

SSLProxyEngine On

ErrorLog /var/log/apache2/webmail.zimbra.tld-error_log
CustomLog /var/log/apache2/webmail.zimbra.tld-access_log combined

SSLEngine on
SSLCertificateFile /etc/apache2/ssl/apache.pem
SSLProtocol all

ProxyRequests Off


<proxy *>
Order deny,allow
Allow from all
</proxy>

ProxyPreserveHost On
ProxyPass / https://webmail.zimbra.tld:8443/
ProxyPassReverse / https://webmail.zimbra.tld:8443
</VirtualHost>

Now you can enable the proxy module and enable the site:

$ sudo a2enmod proxy
$ sudo a2enmod proxy_http
$ sudo a2ensite ssl-zimbra-reverse-proxy
This should be enough :-), anyway if you found this error in the log

[...] client denied by server configuration: proxy:https://192.168.100.2:8443/


be sure to add the proxy directive as follow:


Order deny,allow
Allow from all


...or if you found this error in the log

[...] [warn] proxy: No protocol handler was valid for the URL /. If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule.

probabily you forgot to enable proxy_http:
$ sudo a2enmod proxy_http

Monday, December 17, 2007

Firefox + Logmein.com - The connection to the server was reset while the page was loading

Have you tried Logmein.com? Wonderful, one of the easyest way to share remotely your Windows desktop.
You can connect at home or at work easily and bring the control of your machine.
You can help your parents if they are in trouble and check the computer.
It works almost with every browser and every operative system...
But, in the latest times, when I try to connect at the main page the browser show me this awful error: " The connection to the server was reset while the page was loading"
In the beginning I thought that was a so successful service, that so much clients have stunned the server.
To day a vague feeling that could be a different kind of problem, so I begun a search and...
Well, I think there is a real problem with the TCP/IP stack.
I think you can try different values since you found the correct one.
Incredible. For what I could discover now, the problem seems to affect every kind of browsers (Firefox/Konqueror/IE) in conjunction with the MTU parameter. Even if you try wget the https://secure.logmein.com/home.asp page the error appears.

To correct you need to change the MTU parameter at least into your ADSL modem, changing it from 1500 (my default value) to 1450.

Thursday, November 29, 2007

An Open Letter to the OpenDS Community and to Sun Microsystems

Neil Wilson one of the founders of the OpenDS project quits and, after about two month of silence, send to the Community a letter that explain his dealing. I would like to quote this letter to give the maximum spread what happened and what are behind the people that support the open source philosophy.

"My name is Neil Wilson, and until recently I held the Owner and Committer roles in the open source OpenDS project. I helped found OpenDS, served as the project architect, and have contributed more code than anyone else. However, I must now regrettably inform you that I have been compelled to end all involvement with OpenDS. I have resigned all roles that I held in the project and have rescinded my Sun Contributor
Agreement. I will no longer contribute code, documentation, bug reports, suggestions for improvement, or advice of any kind.

I joined Sun Microsystems in October of 2001, where I was directly involved with its proprietary directory products in addition to my later work with OpenDS. I wrote and analyzed code to provide new features, fix
bugs, and improve performance, and I developed a number of tools to help improve the Directory Server experience. I had excellent working relationships with a number of customers, and I was instrumental in
closing several deals worth many millions of dollars. I consistently received the top rating in annual performance reviews, and I worked with a number of other groups within Sun, as well as with Sun partners, to
help ensure that the Directory Server products worked as well as possible with other Sun technologies, including Solaris, Java, and a number of other software products, as well as many different kinds of
hardware.

On September 27, 2007, I was notified that Directory Server engineering, including OpenDS, was being consolidated in Grenoble, France, and that US-based positions were being eliminated. Some individuals were
reassigned to work on other software products, but among those laid off were the four OpenDS project owners (myself, Stephen Shoaff, Don Bowen, and David Ely), as well as the OpenDS community manager (Trey Drake). We would technically remain Sun employees for the next two months, but were
not able to access any Sun-internal resources and were not required to work in any way and were encouraged to use that time to seek employment elsewhere.

This was certainly a very surprising move, but the shock wore off and within a few days the OpenDS owners and community manager got together and decided that even if we were no longer working for Sun that we would like to continue our involvement with OpenDS and wished to ensure that the project was in the best possible position moving forward. To that end, we had face-to-face meetings, conference calls, and e-mail
discussions with Sun employees still involved in the project to provide advice and knowledge transfers. I also continued participation on the project mailing lists, committed code changes, and updated the project
issue tracker and documentation wiki.

The project owners also decided that as an act of good faith (and without any prompting from Sun) that we should elect a fifth owner who was a Sun employee, since Sun had certainly made a significant contribution to the project. We appointed Ludovic Poitou to this position, as he had served as the architect for Sun's proprietary Directory Server product for several years, and further suggested that we should amend the project governance to ensure that Sun Microsystems was granted a permanent seat in the project ownership. On November 13, 2007, the OpenDS project owners (including Ludovic) met via conference call with the intention of discussing this governance change. However, during that meeting Ludovic informed us that Sun's intention was to change the OpenDS governance policy so that the project was controlled entirely by a Sun-selected committee. This was a surprise to us, and we indicated that while we were willing to discuss this further to better understand what was involved, we were concerned that this was not necessarily in the best interests of the OpenDS project or its associated open source community. We noted that the current OpenDS
governance policy stated that governance changes could only be made by a consensus of the project owners, and therefore we would be required to approve any potential change.

On November 14, 2007, a member of executive management within Sun's software division contacted one of the recently-laid-off OpenDS project owners and demanded that the owners approve a governance change that would grant Sun full control of the OpenDS project. During this call, we were threatened that if we did not make this change we could face immediate termination and loss of all severance benefits. The four
former-Sun owners discussed this and decided that we could not in good conscience approve the requested change as we did not believe that it would be in the best interests of the project, but we were also not
willing to risk the considerable financial loss that could result if Sun decided to make good on that threat. After first trying to resolve the issue through more amicable avenues, we were ultimately compelled to
resign our ownership and end our association with the project on November 19, 2007.

This was a very disappointing and hurtful turn of events. I believe that we acted only in good faith and in the best interests of the community, and we had clearly taken action to protect Sun's position in the project
even after our own jobs had been eliminated. OpenDS was founded as a community-focused "doacracy", and no one has done more than I have to help ensure its success, or to ensure Sun's success through OpenDS.
However, Sun management has shown that at least in this case they are willing to resort to rather hostile tactics to preserve absolute control. This is most certainly not in the spirit of open source and
open development that we tried to foster or that Sun claims to embody.

Please note that I don't feel that this action was representative of Sun's true open source strategy, but was a relatively isolated incident brought on by middle management acting of their own accord. I believe
and certainly hope that the public statements made by individuals like CEO Jonathan Schwartz and Chief Open Source Officer Simon Phipps are honest and that Sun truly does want to be a genuine community-focused open source company, and I have no reason to believe that they were
aware of or involved with any of what happened with OpenDS. Similarly, I sympathize with the remaining Sun-employed OpenDS engineers who may have been unwittingly drawn into this turmoil, and am disappointed that we will no longer be able to work together, but it was not my choice.
Unfortunately, if Sun is unable to ensure that their middle management is on the same page as the senior management setting the open source strategy and the engineers making it happen, then it won't take too many more incidents like this (or the Project Indiana / OpenSolaris Developer Preview naming fiasco) for people to start to question Sun's true intentions.

In order to avoid potential retaliation from Sun, I have remained silent on this matter through the duration of the two-month period following the layoff notification during which I was still technically a Sun
employee. Now that this time has elapsed, I am no longer at risk of losing severance benefits and I believe that it is important to clear the air. I have no desire to pursue this matter any further through
legal or other channels, but simply wish to explain why I am no longer able to be involved with the OpenDS project.

I am passionate about the technology and hope to continue working in this area in the future, but I am not yet prepared to discuss where I'm going from here. You may watch my new blog at http://directorymanager.wordpress.com/ for more information in the future.

Neil Wilson
neil.a.wilson [at]directorymanager.org"

Support Java Plug-in on 64-bit AMD and Intel

I was tring to see, surfing with firefox, if there was snow on the mountain, I like the snow and love snowboarding!!
Well I discovered that I couldn't see anything because the java plugin wasn't installed into firefox.
Oh, so easy? Well... When I upgraded my Linux to Gutsy I though to update everything to the correct configuration, I have a wonderful (?) AMD64. In other words, I change the binary from i386 to AMD64.

So everything need to be compiled to work on a 64 bit processor. Until now I had some problem, but nothing too difficult. It seems every program was compiled for AMD64 too. Until now.

I discovered with big surprise that there is no support for the java plugin on a AMD64 platform. It is really incredible. In the forllowing lines I collect some of the most interesting link about this problem and, sometime, the probably solution.

Tuesday, November 27, 2007

OpenOffice as Windows Service AKA How to install SRVANY and live happy

Install OpenOffice as Windows Service is not so easy as it seems. You could spent an afternoon or more to understand why it wont start! So I hope this could help somebody.

To install OpenOffice as Windows Service you need two application, SRVANY.EXE and INSTSRV.EXE. You can download it from the Windows Server 2003 Resource Kit Tools at Microsoft Download Center .

I suppose you have already installed OpenOffice and you have also have started it as Administrator. It is important after the first start that you agree the license. If you first don't agree the license after the service won't start as Service.

The easiest way after you have installed OpenOffice (at this moment I have installed the version 2.3) is:

copy c:\Program Files\Windows Resource Kits\Tools\SRVANY.EXE C:\Windows\system32\

instsrv.exe "OpenOffice" c:\WINDOWS\system32\SRVANY.EXE

and add the following key into the registry:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\OpenOffice]
"DisplayName"="Resin - OpenOffice"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\OpenOffice\Parameters]
"AppParameters"="-headless -accept=socket,host=0.0.0.0,port=8100;urp;"
"Application"="C:\\OpenOffice.org.2.3\\program\\soffice.exe"
"AppDirectory"="C:\\OpenOffice.org.2.3"

to load these lines automatically you could copy into a OpenOffice.reg file and double click on the new file.

Tuesday, September 18, 2007

Setting Up a Virtual Frame Buffer (XVBF) to Support Open Office

Deploying Alfresco Community I may need to setup OpenOffice and how I discovered with surprise, OpenOffice insist to connect with X, and there was no X server to connect. So OpenOffice exits with error:

$ soffice "-accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager" -nologo -headless -nofirststartwizard &

soffice.bin X11 error: Can't open display:
Set DISPLAY environment variable, use -display option
or check permissions of your X-Server
(See "man X" resp. "man xhost" for details)

I think because it needs X as rendering engine. I installed Xvbf, that is a X server that can run on machines with no display hardware and no physical input devices. It emulates a dumb framebuffer using virtual memory.

To avoid this problem you have simply start Xvfb before OpenOffice and setup properly the DISPLAY environment variable. If you don't have Xvfb installed on your system you can add it with:

$ apt-get install xvfb

Then you can start it:

$ Xvfb :5 -screen 0 1600x1200x24 &

the Virtual Frame Buffer now is on display 5 screen 0, so you have to set the DISPLAY environment variable to:

$ export DISPLAY=:5.0

Finally now you can start Open Office as daemon.

Alfresco 2.1.0 WCM Community + Ubuntu Feisty + Oracle Express

This is an easy wiky to install Alfresco on Ubuntu with Oracle 10.2 XE and Tomcat 5.5.
This wiki assumes you are knowledgeable enough with Tomcat and Oracle and don't follow you in deep to install them both.
Download the file alfresco-community-tomcat-2.1.0.tar.gz and uncompress it in /opt/alfresco-community-tomcat-2.1.0. You will find a complete installation of Tomcat 5.5 in the tomcat directory.
Now customize the file alfresco.sh setting:
APPSERVER=/opt/alfresco-community-tomcat-2.1.0/tomcat
Under Oracle you have to create a new account (username: alfresco password:alfresco). Then grant connect and resource Rules.
Now you can setup the Oracle connection and to do this you need copy the Oracle JDBC drivers in alfresco/tomcat/common/lib/. Forget to put the JDBC drivers in the common/lib is one of most common problem in the Alfresco installation

Those files are custom-repository.properties and custom-hibernate-dialect.properties:
  1. custom-repository.properties
    • uncomment custom content and index data location and adjust as appropriate:
      #
      # Sample custom content and index data location
      #
      dir.root=/opt/alfresco-community-tomcat-2.1.0/alf_data
      dir.indexes=/opt/alfresco-community-tomcat-2.1.0/alf_data/lucene_indexes

    • uncomment the account info and adjust as appropriate:
      #
      # Sample database connection properties
      #
      db.username=alfresco
      db.password=alfresco
      db.pool.initial=10
      db.pool.max=100

    • uncomment the Oracle connection lines and adjust as appropriate (pay particular attention to the SID, in our case is XE)
      #
      # Oracle connection (requires ojdbc14_g.jar or equivalent jar in shared libraries location)
      #
      db.driver=oracle.jdbc.OracleDriver
      db.url=jdbc:oracle:thin:@localhost:1521:XE

    • comment out any other connection lines using #
  2. custom-hibernate-dialect.properties -
    • comment out any other dialect line using #
      #
      # Oracle dialect
      #
      hibernate.dialect=org.hibernate.dialect.Oracle9Dialect

  3. copy the Oracle JDBC drivers ojdbc14_g.jar in the tomcat common lib:

    • cp $ORACLE_HOME/jdbc/lib/ojdbc14_g.jar alfresco/tomcat/common/lib/

If you have an oracle client you could check the oracle connection with the following command:

$ sqlplus alfresco/alfresco@XE
SQL*Plus: Release 10.2.0.1.0 - Production on Mon Sep 17 22:47:32 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
SQL> quit
Disconnected from Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production

Customize the ./zstart_oo.sh and start OpenOffice like a daemon this will permit to document transformation.
Check if OpenOffice is started correctly looking for a process listening on port 8100
$ netstat -ntl | grep 8100
tcp 0 0 127.0.0.1:8100 0.0.0.0:* LISTEN
The JAVA_HOME variable must be set correctly to your Java5 (or higher) installation.
Now you can start alfresco running the script:
$ ./alfresco.sh start
check the alfresco.log to see what's happening. If you find some exceptions as shown in the following lines, don't worry, that happens because the user haven't the administrator rights:
01:39:48,474 ERROR [org.alfresco.smb.protocol.netbios] NetBIOSNameServer setup error:
java.net.BindException: Permission denied
at java.net.PlainDatagramSocketImpl.bind0(Native Method)
at java.net.PlainDatagramSocketImpl.bind(PlainDatagramSocketImpl.java:82)
at java.net.DatagramSocket.bind(DatagramSocket.java:368)
at java.net.DatagramSocket.(DatagramSocket.java:210)
at java.net.DatagramSocket.(DatagramSocket.java:261)
at java.net.DatagramSocket.(DatagramSocket.java:234)
at org.alfresco.filesys.netbios.server.NetBIOSNameServer.openSocket(NetBIOSNameServer.java:1085)
at org.alfresco.filesys.netbios.server.NetBIOSNameServer.run(NetBIOSNameServer.java:1611)
at java.lang.Thread.run(Thread.java:619)
01:39:48,557 ERROR [org.alfresco.ftp.protocol] FTP Socket error
java.net.BindException: Permission denied
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
at java.net.ServerSocket.bind(ServerSocket.java:319)
at java.net.ServerSocket.(ServerSocket.java:185)
at java.net.ServerSocket.(ServerSocket.java:141)
at org.alfresco.filesys.ftp.FTPNetworkServer.run(FTPNetworkServer.java:407)
at java.lang.Thread.run(Thread.java:619)

you can start the application with the following command and avoid the problem
$ sudo ./alfresco.sh start
look at alfresco.log to see if everything is going well and then check the http://localhost:8080/alfresco/faces/jsp/login.jsp with your browser.