=== modified file 'src/docbkx/en/dhis2_implementation_guide_installation.xml' --- src/docbkx/en/dhis2_implementation_guide_installation.xml 2013-10-06 07:50:22 +0000 +++ src/docbkx/en/dhis2_implementation_guide_installation.xml 2013-11-18 15:55:14 +0000 @@ -1,5 +1,5 @@ - + Installation The installation chapter provides information on how to install DHIS 2 in various contexts, including online central server, offline local network, standalone application and self-contained package called DHIS 2 Live. @@ -74,32 +74,31 @@ Postgresql installation and tuning To install PostgreSQL version 9.2 we first need to add a Ubuntu package repository to our system. sudo apt-get install python-software-properties - -sudo add-apt-repository ppa:pitti/postgresql - +sudo add-apt-repository ppa:pitti/postgresql sudo apt-get update - Now install PostgreSQL by invoking sudo apt-get install postgresql-9.2 + Now install PostgreSQL by invoking: + sudo apt-get install postgresql-9.2 Switch to the postgres user by invoking sudo su postgres Create a non-privileged user called dhis by invoking createuser -SDRP dhis. Enter a secure password at the prompt. Create a database by invoking createdb -O dhis dhis2. Return to your session by invoking exit You now have a PostgreSQL user called dhis and a database called dhis2. Do performance tuning by opening the following file by invoking - sudo nano /etc/postgresql/9.2/main/postgresql.conf + sudo nano /etc/postgresql/9.2/main/postgresql.conf and set the following properties: - shared_buffers = 3200MB + shared_buffers = 3200MB Determines how much memory should be allocated exclusively for PostgreSQL caching. This setting controls the size of the kernel shared memory which should be reserved for PostgreSQL. Should be set to around 40% of total memory dedicated for PostgreSQL. - work_mem = 20MB + work_mem = 20MB Determines the amount of memory used for internal sort and hash operations. This setting is per connection, per query so a lot of memory may be consumed if raising this too high. Setting this value correctly is essential for DHIS 2 aggregation performance. - maintenance_work_mem = 256MB + maintenance_work_mem = 256MB Determines the amount of memory PostgreSQL can use for maintenance operations such as creating indexes, running vacuum, adding foreign keys. Incresing this value might improve performance of index creation during the analytics and data mart generation processes. - effective_cache_size = 8000MB + effective_cache_size = 8000MB An estimate of how much memory is available for disk caching by the operating system (not an allocation) and is used by PostgreSQL to determine whether a query plan will fit into memory or not. Setting it to a higher value than what is really available will result in poor @@ -108,15 +107,15 @@ shared_buffers setting. PostgreSQL delegates the second layer to the operating system disk cache and the size of available memory can be given with the effective_cache_size setting. - checkpoint_segments = 32 + checkpoint_segments = 32 PostgreSQL writes new transactions to a log file called WAL segments which are 16MB in size. When a number of segments have been written a checkpoint occurs. Setting this number to a larger value will thus improve performance for write-heavy systems such as DHIS 2. - checkpoint_completion_target = 0.8 + checkpoint_completion_target = 0.8 Determines the percentage of segment completion before a checkpoint occurs. Setting this to a high value will thus spread the writes out and lower the average write overhead. - wal_buffers = 16MB + wal_buffers = 16MB Sets the memory used for buffering during the WAL write process. Increasing this value might improve throughput in write-heavy systems. - synchronous_commit = off + synchronous_commit = off Specifies whether transaction commits will wait for WAL records to be written to the disk before returning to the client or not. Setting this to off will improve performance considerably. It also implies that there is a slight delay between the transaction is reported successful to the client and it actually being safe, but the database state cannot be corrupted and this is a good alternative for performance-intensive and write-heavy systems like DHIS 2. - wal_writer_delay = 10000ms + wal_writer_delay = 10000ms Specifies the delay between WAL write operations. Setting this to a high value will improve performance on write-heavy systems since potentially many write operations can be executed within a single flush to disk. Restart PostgreSQL by invoking sudo /etc/init.d/postgresql restart Set the database configuration @@ -135,8 +134,10 @@
Install Java - Install Java by invoking the following command: sudo apt-get install openjdk-7-jdk - Check that your installation is okay by invoking java -version. + Install Java by invoking the following command: + sudo apt-get install openjdk-7-jdk + Check that your installation is okay by invoking: + java -version
Install Tomcat and DHIS2