Provider Registry Server Install Notes: Difference between revisions

From IHRIS Wiki
No edit summary
Line 19: Line 19:


Copy from bzr:
Copy from bzr:
*"ldap/provider.schema" to "/etc/ldap/schema/provider.schema"  (chmod 644 with owner root)
*copy [http://bazaar.launchpad.net/~intrahealth+informatics/rhea-pr/trunk/view/head:/ldap/provider.schema ldap/provider.schema] to "/etc/ldap/schema/provider.schema"  (chmod 644 with owner root)
*"ldap/slapd.conf" to "/etc/ldap/slapd.conf"  (chmod 644 with owner openldap)
*copy [http://bazaar.launchpad.net/~intrahealth+informatics/rhea-pr/trunk/view/head:/ldap/slapd.conf ldap/slapd.conf] to "/etc/ldap/slapd.conf"  (chmod 644 with owner openldap)




Line 34: Line 34:


==Load Base Organizational Units==
==Load Base Organizational Units==
Saved in bzr file "ldap/base_organizational_units.ldif"
Saved in bzr file [http://bazaar.launchpad.net/~intrahealth+informatics/rhea-pr/trunk/view/head:/ldap/base_organizational_units.ldif ldap/base_organizational_units.ldif]


We need to copy and edit in a new location because we will set the password
We need to copy and edit in a new location because we will set the password
Line 65: Line 65:


==Load Sample iHRIS Data==
==Load Sample iHRIS Data==
Saved in bzr file "ldap/ihris_sample_export.ldif"
Saved in bzr file [http://bazaar.launchpad.net/~intrahealth+informatics/rhea-pr/trunk/view/head:/ldap/ihris_sample_export.ldif ldap/ihris_sample_export.ldif]





Revision as of 14:28, 4 June 2012

Installation and configuration notes on Ubuntu 12.04 (Precise).

All files are in launchpad

Source Code

Hosted on launchpad

Simply do a "bzr branch lp:rhea-pr"

Installation

sudo apt-get install slapd ldap-utils phpldapadmin

Configure Custom Schema

See this for more detailed explanations.

<source lang='bash'> sudo /etc/init.d/slapd stop </source>

Copy from bzr:


<source lang='bash'> sudo mv /etc/ldap/slapd.d /etc/ldap/slapd.d.backup_`date +"%d_%m_%y"` sudo mkdir /etc/ldap/slapd.d sudo chown -R openldap:openldap /etc/ldap/slapd.d sudo chmod 755 /etc/ldap/slapd.d sudo slaptest -f /etc/ldap/slapd.conf -F /etc/ldap/slapd.d sudo /etc/init.d/slapd start </source>

Load Base Organizational Units

Saved in bzr file ldap/base_organizational_units.ldif

We need to copy and edit in a new location because we will set the password

Generate admin password: <source lang='bash'> slappasswd </source> should give you something like:

New password:
Re-enter password:
{SSHA}d2BamRTgBuhC6SxC0vFGWol31ki8iq5m

Now we need to add this to the /etc/ldap/slapd.conf by changing:

userPassword: {SSHA}GjvNQ/pWBDY568jLRFPoTNJsuKTohwrA

to

userPasswrod: {SSHA}d2BamRTgBuhC6SxC0vFGWol31ki8iq5m

<source lang='bash'> sudo /etc/init.d/slapd stop sudo -su openldap slapadd -l base_organizational_units.ldif sudo /etc/init.d/slapd start </source>

Load Sample iHRIS Data

Saved in bzr file ldap/ihris_sample_export.ldif


<source lang='bash'> sudo /etc/init.d/slapd stop sudo -su openldap slapadd -l ihris_sample_export.ldif sudo /etc/init.d/slapd start </source>

Testing Data Load

<source lang='bash'> ldapsearch -xLLL -b "dc=moh,dc=gov,dc=rw" uid=person\|9049 </source> should produce something like

dn: uid=person|9049,ou=paid_public_sector,dc=moh,dc=gov,dc=rw
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: providerPerson
uid: person|9049
cn: Prout Biawriav
givenName: Prout
sn:: Qmlhd3JpYXYg
nid:: MSA=
mutuelle: 2
employeeType:: UGFpZCBQdWJsaWMgU2VjdG9yIA==
c:: VEYg
co: Taifafeki

OpenLDAP Web Services

Do a "ln -s /path/to/bzr/webservices /var/www" and the webservices will be on http://localhost/webservices. These include:

OpenLDAP Web User Interface

http://localhost/phpldapadmin