Server-Schulung-Teil10-Abschluss Installation Kivitendo

From revampedia
Jump to: navigation, search


This training session took place on 06-08-17. We finally finished the installation of Kivitendo. What would remain is to enter the necessary data into the program, but that doesn't belong into a server training in my opinion.

If there are still questions open after these instructions, please go to "Views" and then "Discussion" to leave your feedback, so I can add more Details to this page. jr

Setup an administrator in Kivitendo

We open Kivitendo in the browser. In my case it was the address We get a login mask and we log in at administration.
- Next we go to "Users, Mandator, User groups" (Benutzer, Mandanten, Benutzergruppen) and select there "New User group" (Neue Benutzergruppe). Since this administrator should have full access, we put everywhere a check mark.
- Our next step is to create a "new user" (Neuer Benutzer). For this training enviroment I selected the username "Admin" with the password "admin".
- Now the select the group "Full Access" (Vollzugriff) for our newly created user.
- we selected the menu variant "top with CSS" (oben mit CSS)

It's useful to create departments if you have various cost centers. You have to select Yes/No (Ja/Nein) (default=No/Nein)

Create a database in Kivitendo

To be able to do that we go to our administrator part and there to "database administrator" (Datenbankadministration) and select "new database" (Neue Datenbank). The fields will already be filled out. We only have select the name of the new databse and press the button "Create new database" (Neue Datenbank anlegen:). In our case we selected "kivitendotest". Additionally we have to select the "chart of accounts to be used" (Zu verwendender Kontenplan:). As German speaking Swiss we selected "Switzerland-deutsch_MWST-2014".

Create mandator in Kivitendo

To create a mandator we select "New Mandator"(Neuer Mandant). There we will out the "mandator name" (Mandantenname:) and "database name" (Datenbankname:). In our test case it was "kivitendotest" for both fields. We also select the "user and group allocations" (Benutzer und Gruppenzuordnung). In our case we selected everything, as we didn't have any additional entries.

For the moment we can "log out" (Abmelden) of the browser.

Repetition: Update Kivitendo

On our virtual machine where Kivitendo is installed we go to the CLI. As I saw with "git status" that I'm currently in the "master branch" can I simply enter the following command to update the packages through git:

user1@vm1:/var/www/git/kivitendo-erp$ sudo git pull

As we had to have root privileges to execute the "git pull" command, we need to change the ownership of some files back to www-data. For that we use the next command:

user1@vm1:/var/www/git/kivitendo-erp$ sudo chown -R www-data:www-data .

As we've updated the program we need to restart the web server:

user1@vm1:/var/www/git/kivitendo-erp$ sudo systemctl restart apache2

We should also refresh the browser content. We need to back to the admin section (Adminbereich). I received the following message:

    Führe aus: Zugriffsrecht auf alle Entwürfe


When we login afterwards with the username I got the next message:

 kivitendo wird gleich die Datenbank [ kivitendotest ] aktualisieren.

Sie sollten eine Sicherungskopie der Datenbank erstellen, bevor Sie fortfahren, da die Aktualisierung unter Umständen nicht umkehrbar ist. 

    Führe aus: add directory for filemanagment


Bonus assignment setup taskserver

To setup a taskserver for Kivitendo, you go in the browser to the admin section of the program and create a new user. The username was "taskserver" and we chose a difficult password that we're allowed to forget, once it's been configured.

In the next step we go to the CLI of our virtual machine with the Kivitendo application and open the following file with the preferred editor:

user1@vm1:/var/www/git/kivitendo-erp$ sudo nano config/kivitendo.conf
debug = 1
run_as =  www-data

send_email_to  =
email_subject  = kivitendo vm1 Task-Server: Hintergrundjob fehlgeschlagen
email_from     = kivitendo vm1 Daemon <www-data@vm2>

send_email_to  = admin
email_from     = kivitendo vm1 Daemon <www-data@vm2>

If you wish to have the log files somewhere else and not in /tmp/, you can modify the path in the same file:

# location of a separate log file for the console. everything normally written
# to the kivitendo log will be put here if triggered from the console
log_file = /tmp/kivitendo_console_debug.log

That the changes become active we need to restart the web server:

user1@vm1:/var/www/git/kivitendo-erp$ sudo systemctl restart apache2

We go back to the browser and login as our user. There we select "System\Background-Jobs and Taskserver\Taskserver control" (System\Hintergrund-Jobs und Taskserver\Taskserversteuerung).

Assignment for next session

In the documentation of Kivitendo we find at the point how to automatically start the taskserver when the machine boots. This is our assignement for the next time and so I got to do it three times for me and the remaining participants.

In case you wish to get to the solution on your own, I'll post the steps I took to make it work, but it will be hidden inicially.

To the solution:
user1@vm1:/var/www/git/kivitendo-erp$ sudo cp scripts/boot/systemd/kivitendo-task-server.service /etc/systemd/system/
user1@vm1:/var/www/git/kivitendo-erp$ sudo nano /etc/systemd/system/kivitendo-task-server.service

      ExecStart=/var/www/git/kivitendo-erp/scripts/ start
      ExecStop=/var/www/git/kivitendo-erp/scripts/ stop

user1@vm1:/var/www/git/kivitendo-erp$ sudo systemctl start kivitendo-task-server.service
user1@vm1:/var/www/git/kivitendo-erp$ sudo systemctl enable kivitendo-task-server.service