<-- Back to Andy Balaam Home
MyAddressBook Home | User Guide | Developers | Demo site | Contact
The commands shown are for Ubuntu: Debian should be very similar, and on RPM-based systems the install command is
yum install and the package names and paths may be slightly different. Contributions of documentation for non-Ubuntu systems will be gratefully accepted.
Note that MyAddressBook requires Python 2.6 or greater (not 3.x yet...). Most modern Linux distributions have this.
First, install an LDAP server, a web server and some Python libraries:
sudo apt-get install slapd ldap-utils apache2 libapache2-mod-fastcgi python-ldap python-webpy
If you want to be able to upgrade from MyAddressBook version 1 do this too:
sudo apt-get install python-mysqldb
Create a config file for your LDAP server:
sudo gedit /etc/ldap/ldap.conf
Enter the following as the file contents, and save the file and close:
Edit another file:
sudo gedit /etc/ldap/db.ldif
The contents of that one should be:
With these contents:
Now run these commands:
sudo ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/cosine.ldif sudo ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/inetorgperson.ldif sudo ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/nis.ldif sudo ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/db.ldif ldapadd -x -D 'cn=admin,dc=myaddressbook,dc=sf,dc=net' -w 1234 -f /etc/ldap/addressbook.ldif
After all this you have created an address book in your LDAP server called
addressbook, and a user called
admin. Both of these are inside the domain
dc=myaddressbook,dc=sf,dc=net. The admin user has permissions to add, delete and modify entries, and the password is
Download the latest version of MyAddressBook and put the .tar.bz2 file into your home directory.
Install it like this:
cd tar -xjf myaddressbook-*.tar.bz2 sudo mv myaddressbook-*/ /var/www/myaddressbook
If you modified the above scripts, you must create a config file:
sudo cp /var/www/myaddressbook/myaddressbook.cfg.sample /etc/myaddressbook.cfg sudo gedit /etc/myaddressbook.cfg
The sample config file shows the default values - remove the initial '#' from each line that needs to be different, and edit it to set it to what you need.
If you left the files and commands exactly as shown above, you don't need a config file at all.
Check it works like this:
cd /var/www/myaddressbook ./myaddressbook-local.py
When you run this command, a URL will be printed out. Open this URL in your browser. If you can see an empty list of addresses, MyAddressBook is working.
Stop the process by pressing Ctrl-C in the terminal where you started it.
Create a .htaccess file:
sudo gedit /var/www/myaddressbook/.htacccess
And paste this into the editor and save and exit:
sudo gedit /var/www/myaddressbook/static/.htacccess
sudo service apache2 restart