← Back to team overview

dhis2-devs team mailing list archive

Re: dhis2-tools manual wip

 

Ah.  I just missed one vital step:

After installing, before you can start managing, installing etc you have to
become (or create) a dhis2 admin user.  Like this:

sudo dhis2-create-admin bobj

Converts me (bobj) to a dhis2-admin.  Basicaly adds me to dhis2-admin group
and gives me superuser access to database.  The idea being that you can
create dhis2-admin users who don't ever need to have full root privileges.
 Some finer tuning would still be good here.



On 14 June 2013 10:32, Bob Jolliffe <bobjolliffe@xxxxxxxxx> wrote:

> Hi Knut
>
> Attached is pdf of the man pages which get installed with dhis2-tools.
>  There are a few additional tools, notably dhis2-backup and dhis2-restoredb
> which I still have to create pages for.   But it does make setting up and
> managing dhis2 pretty straightforward.  Basically to create an instance
> called "dhis":
>
> #  install some prerequisites (this is the only complicated bit - I do all
> of this in a short script)
> # latest way to install pstgres according to (
> https://wiki.postgresql.org/wiki/Apt)
> echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release
> -sc)-pgdg main" >/etc/apt/sources.list.d/pgdg.list
> wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc |
> sudo apt-key add -
>
> # need to use a ppa for nginx
> sudo apt-get -y install python-software-properties -y
> sudo add-apt-repository ppa:nginx/stable -y
> sudo apt-get -y update
>
> # install the dhis2-tools deb
> dpkg -i dhis2-tools_1.0-0ubuntu1_all.deb
> apt-get -y install -f
>
> dhis2-create instance -p 8080 dhis
> dhis2-deploy-war dhis
>
> #look at the log:
> dhis2-log dhis
>
> # starting and stopping
> dhis2-shutdown dhis
> dhis2-startup dhis
>
> # backup the database
> dhis2-backup dhis ;# some tuning required
> #restore
> dhis2-restoredb dhis2 knuts_dump.sql
> #or
> dhis2-restoredb dhis2 knuts_dump.sql.gz
> #or
> dhis2-restoredb dhis2 knuts_dump.sql.bz2
>
> # upgrade to latest release
> dhis2-deploy-war dhis
> # upgrade to a war on your file system
> dhis2-deploy-war -f mydhis.war dhis
> # get bleeding edge trunk
> dhis2-deploy-war -t dhis
>
> etc ....
>
> Basically a couple of simple commands (with man pages) to do basic
> mangaement.  Lots of difficult magic happening behind the scenes related to
> automatically setting up nightly backups, security, tomcat tuned caching
> etc.
>
> I need to put the deb back on to dhis2.org downloads and fix some minor
> bugs and complete docs .... I'll update my youtube video soon.  Of course
> you can assemble the package yourself from the source (under tools in repo)
> but not everyone will have the deb toolchain installed.
>
> Bob
>
>

References