Sometimes it is better to use virtual machine to demo, so I need to install the alm environment on ubunut os, below are just some records for myself.
Preparation
Start from the redmine turnkey image since I have no knowledge on ruby, better to use an established environment, besides default redmine, there is some nice features we could learn, like etckeeper, which worth another blog
Load it into virtual box (create from its virtual disk), then add one network to access from outside (192.168.56.181 like for me)
Install LDAP server
For later ubuntu (10.x for me), the ldap server use dynamic configuration method, therefore I need different way to handle it, after some tries, below is working way, see https://help.ubuntu.com/10.04/serverguide/C/openldap-server.html as detail
Import schema files over command line
ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/cosine.ldif ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/nis.ldif ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/inetorgperson.ldif
Import ldap config files
originally it is in slapd.conf, now it is sent to config, I use the example ldif file directly
ldapadd -Y EXTERNAL -H ldapi:/// -f backend.example.com.ldif
Import ldap ldif files
the example frontend looks nice as well, don’t forget to give passwd, default is “secret”
ldapadd -x -D cn=admin,dc=example,dc=com -W -f frontend.example.com.ldif
To keep simple, I create seperate ldif for my own account with password since gerrit needs it
# larry.ldif dn: uid=rdccaiy,ou=people,dc=example,dc=comobjectClass: inetOrgPerson uid: rdccaiy userpassword: passwd sn: Cai givenName: Larry cn: Larry Cai displayName: Larry Cai mail: larry.caiyu@gmail.com
And I import it separately
ldapadd -x -D cn=admin,dc=example,dc=com -W -f larry.ldif
If there is something wrong, I just reinstall it completely as I am not good at ldap.
apt-get purge slapdrm -rf /var/lib/ldap/*apt-get install slapd
see reference http://isartor.org/wiki/OpenLdap_with_dynamic_config_backend_on_Ubuntu_10.04 for more information on this.
Now you can follow earlier post to install gerrit for it, surely you need install java-sdk by adding
deb http://archive.canonical.com/ lucid partner
in your /etc/apt/source.list (or similar)
apt-get update apt-get install sun-java6-jdk
Install gitweb
In gerrit, you need to add the url in its configuration and in gitweb, you need to point project root into git repo inside gerrit…
No,no, it is interesting, after installed my gitweb package, it seems I need not to configure, anyway, if needs, then
/etc/gitweb.conf & <reviewsite>/etc/gerrit.conf
Now I got them all inside, my git integration with redmine is back
Summary
Now they all sit inside the virtual machine for demo.
Ubuntu with root permission helps me well for trying different application and from it, I can also learn a lot, hope we can use it more freely soon.
// Also try to see whether this is automatically poped into weibo