Kivitendo auf FreeBSD installieren

von Mirco Schmidt (Kommentare: 4)

ERP Hosting auf FreeBSD

Voraussetzungen

Folgende Bedingungen sind zu erfüllen bevor Sie die im Artikel beschriebene Vorgehensweise befolgen können:

 

  • FreeBSD 9.2 Installation
  • root oder sudo Zugang
  • Grundkenntnisse in der Bedienung einer Shell

Im Jail allow.sysvipc=1 setzen

http://stackoverflow.com/a/12352861/1673236
http://www.freebsddiary.org/jail-multiple.php

# jail -m jid=X allow.sysvipc=1

http://www.wordpress.lonbil.co.uk/2013/08/installing-postgresql-on-freenas-9-1/
# sudo nano /mnt/oneRAIDZ2/jails/.JAIL-NAME.meta/jail-flags
add:
allow.sysvipc=1

Als erstes pkg installieren:
# pkg

# pkg2ng

# pkg update

# pkg install nano

Altes pkg Repo auskommentieren
# nano /etc/pkg.conf
erste Zeile auskommentieren

# pkg install apache22 ap22-mod_fcgid ap22-mod_security postgresql90-server texlive-full

/etc/rc.conf
# nano /etc/rc.conf
add:
#
# Running Kivitendo
#
apache22_enable="YES"
apache22_flags=""
postgresql_enable="YES"

Initdb, createuser, createdb & import
# /usr/local/etc/rc.d/postgresql initdb
# nano /usr/local/pgsql/data/pg_hba.conf
add:
#
# Allow connections from within the LAN
#
host all all 10.10.10.0/24 md5

# nano /usr/local/pgsql/data/postgresql.conf
add:
listen_addresses = '*'

# /usr/local/etc/rc.d/postgresql start
# su pgsql
# createuser -sdrP postgres
# createuser -P kivitendo
# createdb -O kivitendo kivitendo

Falls vorhanden Datensicherung zurückspielen
# psql kivitendo < ../lx-office_one.sql

# nano /
add:
#
# Needed Modules
#
LoadModule authz_host_module libexec/apache22/mod_authz_host.so
LoadModule alias_module libexec/apache22/mod_alias.so
LoadModule mime_module libexec/apache22/mod_mime.so
#LoadModule security2_module libexec/apache22/mod_security2.so

#
# Kivitendo
#
LoadModule fcgid_module libexec/apache22/mod_fcgid.so

#SecRuleEngine On
#SecServerSignature "(unknown)"
ServerSignature Off
#ServerTokens Prod
#ServerTokens OS

and comment all other modul entry's

and at the end of the "<Directory "/usr/local/www/apache22/data">" block add:
RedirectMatch ^/$ /one/

# nano /usr/local/etc/apache22/Includes/kivitendo.conf
add:
ServerName lx.mirco.home

<IfModule mod_fcgid.c>
AddHandler fcgid-script .fcgi
AddHandler fcgid-script .fpl
</IfModule>
#FcgidMaxRequestLen 10485760
FcgidMaxRequestLen 10485760

#
# Test-Installation
#
AliasMatch ^/test/[^/]+\.pl /opt/test/dispatcher.fpl
Alias /test /opt/test/

<Directory /opt/test>
AllowOverride All
Options ExecCGI Includes FollowSymlinks
Order Allow,Deny
Allow from All
</Directory>

<DirectoryMatch /opt/test/users>
Order Deny,Allow
Deny from All
</DirectoryMatch>

#
# ONE Produktiv-Installation
#
AliasMatch ^/one/[^/]+\.pl /opt/one/dispatcher.fpl
Alias /one /opt/one/

<Directory /opt/one>
AllowOverride All
Options ExecCGI Includes FollowSymlinks
Order Allow,Deny
Allow from All
</Directory>

<DirectoryMatch /opt/one/users>
Order Deny,Allow
Deny from All
</DirectoryMatch>


Install needed perl archives
#pkg install p5-Archive-Zip p5-Config-Std p5-DateTime p5-DBI p5-DBD-Pg p5-FCGI p5-JSON p5-PDF-API2 p5-Rose-DB-Object p5-Template-Toolkit p5-Text-CSV_XS p5-Text-Iconv p5-URI p5-XML-Writer

Kivitendo Installation von GitHub oder dem alten Server holen

# mkdir /opt
# tar xjvf ...
# chown -R www:www lx*
# chown -R www:www templates
# ln -s ...

In case of trouble:

Latex:
# texhash

Postgres:
verwendete Datenbank prüfen

# nano config/lx-office.conf

Additional Pkg's for Kivitendo 3.1:
# pkg install p5-Email-MIME p5-perl-ldap p5-Net-SSLGlue p5-GD p5-Image-Info p5-HTML-Parser p5-File-Copy-Recursive

# perl -MCPAN -e 'install HTML::Restrict'

Mailversand aus Kivitendo:
https://steigmann.kivitendo-premium.de/doc/html/ch02s11.html
# pkg install p5-Net-SSLGlue p5-Net-SMTP-SSL

Zurück