Install¶
Requirements¶
In order to run DomotiGa you need a working Gambas 2.x environment.
With the current DomotiGa code you need at least version 2.13.1 (install it from the svn repository)
Look here how to install it on your system.
Howto Install DomotiGa¶
Login as the user you want to run DomotiGa as, Do not use root! It's a security risk!
Then create an installation directory in your home directroy and download a the latest release of DomotiGa with svn.
$ mkdir -p ~/install $ cd ~/install $ svn co http://svn.domotiga.nl/domotiga/trunk/ domotiga
This will create a new directory called 'domotiga' with all code in it.
Copy these files over to your home dir and work from there, otherwise an update of the svn will overwrite your files.
$ cp -rp ~/install/domotiga ~ $ cd ~/domotiga $ rm -rf `find . -type d -name .svn`
Last command deletes all hidden .svn directories.
Create DomotiGa Database¶
You need to create and import the example database, for this you need your mysql root password.
Note: Ubuntu/Debian asks for this password when you are installing mysql-server package, so you can skip this step.
Configure your MySQL Install:
If this is the first time you use a MySQL database on this machine, please set a MySQL root account password first:
$ mysqladmin -u root password "yourpassword" (without quotes)
DomotiGa uses a default database name, username and password as supplied in domotiga.sql, if you want to use different ones
you need to edit the file domotiga.conf before starting the program.
Next import the Domotiga example database:
$ mysql -u root -p <~/domotiga/install/domotiga.sql
Now you can start Gambas2 IDE and Open Project, browse to ~/domotiga/DomotiGa and open it.
Start the project to run DomotiGa.
You can also create a shortcut/launcher which starts DomotiGa directly.
See the README inside the domotiga directory.
(you have to compile/create executable of the project first if you have made changes to the source code)
Update your DomotiGa from svn¶
Goto your svn repos you have downloaded before, for example.
$ cd ~/install/domotiga $ svn up
Make a backup of your old code directory.
$ cp -rp ~/domotiga ~/domotiga.backup
Make a backup of your database.
Use Menu Tools -> Database Admin -> Backup
Or run from cli.
$ mysqldump -u root -p domotiga >domotiga-backup.sql
You can also download a new tree ofcourse.
If you installed domotiga under your home directory, copy the new files over.
$ cp -rp ~/install/domotiga ~ $ cd ~/domotiga $ rm -rf `find . -type d -name .svn`
Now restart DomotiGa, it will update your database automatically to the latest version.
It's also a good idea to compile a new executable, because the latest small changes are not already in there.
$ gambas2
Load DomotiGa or DomotiGaServer project from ~/domotiga/..
Select menu Project -> Make -> Executable
Save to domotiga directory.
How to migrate DomotiGa to another machine¶
Make sure you have compiled/installed gambs2 on the new machine
Make a sql dump of your database.
$ cd ~/domotiga $ mysqldump -u root -p domotiga >dump.sql
Pack and copy over the ~/domotiga directory to your new machine.
$ cd ~ $ tar czvf ./domotiga.tar.gz ./domotiga $ scp domotiga.tar.gz user@host:/home/user
Unpack on new machine.
$ cd ~ $ tar xzvf domotiga.tar.gz
Prepare database dump.
$ cd ~/domotiga $ vi dump.sql
Add database priviledges to top of file (under /* SET commands)
CREATE DATABASE domotiga; GRANT ALL ON domotiga.* TO domouser@localhost IDENTIFIED BY 'kung-fu'; GRANT ALL ON domotiga.* TO domouser@'%' IDENTIFIED BY 'kung-fu'; USE domotiga;
Load database dump.
$ mysql -u root -p <dump.sql
Start DomotiGa on new machine.
HAVE FUN!
Related Resources¶
Comment¶
Updated by: rdnzl, Updated 3 months ago
Access count: 2562 since 2011-08-25
Attached Files¶