Diskussion:Server/CKAN: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Vater (Diskussion | Beiträge) |
Vater (Diskussion | Beiträge) |
||
(8 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
Zeile 11: | Zeile 11: | ||
[[wikipedia:de:zsh]] für eine "schön bequeme" Shell installieren | [[wikipedia:de:zsh]] für eine "schön bequeme" Shell installieren | ||
: <code>pkg install zsh</code> | : <code>pkg install -y zsh</code> | ||
zu [[wikipedia:de:zsh]] wechseln | zu [[wikipedia:de:zsh]] wechseln | ||
: <code>zsh</code> | : <code>zsh</code> | ||
[[wikipedia:de:Python (Programmiersprache)]] installieren | [[wikipedia:de:Python (Programmiersprache)]] installieren | ||
: <code>pkg install python27</code> | : eigentlich müsste, da anscheint Python 2 (2015-07) der Standard bei FreeBSD, es auch ohne Angabe der Version gehen | ||
:: <code>pkg install -y python</code> | |||
: <code>pkg install -y python27</code> | |||
<!-- | |||
<pre> | |||
Message for python27-2.7.9_1: | |||
===================================================================== | |||
Note that some standard Python modules are provided as separate ports | |||
as they require additional dependencies. They are available as: | |||
bsddb databases/py-bsddb | |||
gdbm databases/py-gdbm | |||
sqlite3 databases/py-sqlite3 | |||
tkinter x11-toolkits/py-tkinter | |||
===================================================================== | |||
</pre> | |||
--> | |||
[[wikipedia:de:PostgreSQL]] installieren | [[wikipedia:de:PostgreSQL]] installieren | ||
:: postgresql94 wäre verfügbar, aber postgresql-libpqxx möchte ohnehin gern postgresql93-client installieren | :: postgresql94 wäre verfügbar, aber postgresql-libpqxx möchte ohnehin gern postgresql93-client installieren | ||
: <code>pkg install postgresql93-server</code> | : <code>pkg install -y postgresql93-server</code> | ||
<!-- | |||
<pre> | |||
===> Creating users and/or groups. | |||
Creating group 'pgsql' with gid '70'. | |||
Creating user 'pgsql' with uid '70'. | |||
=========== BACKUP YOUR DATA! ============= | |||
As always, backup your data before | |||
upgrading. If the upgrade leads to a higher | |||
minor revision (e.g. 8.3.x -> 8.4), a dump | |||
and restore of all databases is | |||
required. This is *NOT* done by the port! | |||
Press ctrl-C *now* if you need to pg_dump. | |||
=========================================== | |||
</pre> | |||
<pre> | |||
Message for postgresql93-client-9.3.6_1: | |||
The PostgreSQL port has a collection of "side orders": | |||
postgresql-docs | |||
For all of the html documentation | |||
p5-Pg | |||
A perl5 API for client access to PostgreSQL databases. | |||
postgresql-tcltk | |||
If you want tcl/tk client support. | |||
postgresql-jdbc | |||
For Java JDBC support. | |||
postgresql-odbc | |||
For client access from unix applications using ODBC as access | |||
method. Not needed to access unix PostgreSQL servers from Win32 | |||
using ODBC. See below. | |||
ruby-postgres, py-PyGreSQL | |||
For client access to PostgreSQL databases using the ruby & python | |||
languages. | |||
postgresql-plperl, postgresql-pltcl & postgresql-plruby | |||
For using perl5, tcl & ruby as procedural languages. | |||
postgresql-contrib | |||
Lots of contributed utilities, postgresql functions and | |||
datatypes. There you find pg_standby, pgcrypto and many other cool | |||
things. | |||
etc... | |||
Message for postgresql93-server-9.3.6_1: | |||
For procedural languages and postgresql functions, please note that | |||
you might have to update them when updating the server. | |||
If you have many tables and many clients running, consider raising | |||
kern.maxfiles using sysctl(8), or reconfigure your kernel | |||
appropriately. | |||
The port is set up to use autovacuum for new databases, but you might | |||
also want to vacuum and perhaps backup your database regularly. There | |||
is a periodic script, /usr/local/etc/periodic/daily/502.pgsql, that | |||
you may find useful. You can use it to backup and perfom vacuum on all | |||
databases nightly. Per default, it perfoms `vacuum analyze'. See the | |||
script for instructions. For autovacuum settings, please review | |||
~pgsql/data/postgresql.conf. | |||
If you plan to access your PostgreSQL server using ODBC, please | |||
consider running the SQL script /usr/local/share/postgresql/odbc.sql | |||
to get the functions required for ODBC compliance. | |||
Please note that if you use the rc script, | |||
/usr/local/etc/rc.d/postgresql, to initialize the database, unicode | |||
(UTF-8) will be used to store character data by default. Set | |||
postgresql_initdb_flags or use login.conf settings described below to | |||
alter this behaviour. See the start rc script for more info. | |||
To set limits, environment stuff like locale and collation and other | |||
things, you can set up a class in /etc/login.conf before initializing | |||
the database. Add something similar to this to /etc/login.conf: | |||
--- | |||
postgres:\ | |||
:lang=en_US.UTF-8:\ | |||
:setenv=LC_COLLATE=C:\ | |||
:tc=default: | |||
--- | |||
and run `cap_mkdb /etc/login.conf'. | |||
Then add 'postgresql_class="postgres"' to /etc/rc.conf. | |||
====================================================================== | |||
To initialize the database, run | |||
/usr/local/etc/rc.d/postgresql initdb | |||
You can then start PostgreSQL by running: | |||
/usr/local/etc/rc.d/postgresql start | |||
For postmaster settings, see ~pgsql/data/postgresql.conf | |||
NB. FreeBSD's PostgreSQL port logs to syslog by default | |||
See ~pgsql/data/postgresql.conf for more info | |||
====================================================================== | |||
To run PostgreSQL at startup, add | |||
'postgresql_enable="YES"' to /etc/rc.conf | |||
</pre> | |||
--> | |||
:: eigentlich hieß es libpq (Es wird davon ausgegangen, dass das bei FreeBSD postgresql-libpqxx ist.) | :: eigentlich hieß es libpq (Es wird davon ausgegangen, dass das bei FreeBSD postgresql-libpqxx ist.) | ||
: <code>pkg install postgresql-libpqxx</code> | : <code>pkg install -y postgresql-libpqxx</code> | ||
Inbetriebnahme von [[wikipedia:de:PostgreSQL]] | Inbetriebnahme von [[wikipedia:de:PostgreSQL]] | ||
Zeile 30: | Zeile 157: | ||
<pre>jail_sysvipc_allow="YES"</pre> | <pre>jail_sysvipc_allow="YES"</pre> | ||
<pre></pre> | <pre></pre> | ||
:: Etwa bei PC-BSD | :: Etwa bei PC-BSD kann einfach bei der Jail ''allow.sysvipc'' angewählt werden. | ||
: PostgreSQL soll gestartet werden können (und zu jedem Neustart gestartet werden) | :: Etwa bei FreeNAS kann einfach bei der Jail '',allow.sysvipc=true'' ergänzend eingetragen werden. | ||
:: <code>echo 'postgresql_enable="YES"' >> /etc/rc.conf</code> | : Einrichtung von PostgreSQL | ||
:: (gemäß Hinweis von FreeBSD am Ende der Installation) optionales Definieren für Sprache und so weiter | |||
::: Hinterlegen der Vorgaben zur Verwendung für PostgreSQL | |||
:::: <code>$EDITOR /etc/login.conf</code> | |||
<pre></pre> | |||
<pre> | |||
postgres:\ | |||
:lang=en_US.UTF-8:\ | |||
:setenv=LC_COLLATE=C:\ | |||
:tc=default: | |||
</pre> | |||
<pre></pre> | |||
::: <!-- create capability database --> | |||
:::: <code>cap_mkdb /etc/login.conf</code> | |||
::: <!-- --> | |||
:::: <code>echo 'postgresql_class="postgres"' >> /etc/rc.conf</code> | |||
:: PostgreSQL soll gestartet werden können (und zu jedem Neustart gestartet werden) | |||
::: <code>echo 'postgresql_enable="YES"' >> /etc/rc.conf</code> | |||
: Initialisieren von PostgreSQL | : Initialisieren von PostgreSQL | ||
:: <code>/usr/local/etc/rc.d/postgresql initdb</code> | :: <code>/usr/local/etc/rc.d/postgresql initdb</code> | ||
::: oder alternativ | |||
:::: <code>service postgresql initdb</code> | |||
<!-- | |||
<pre> | |||
he files belonging to this database system will be owned by user "pgsql". | |||
This user must also own the server process. | |||
The database cluster will be initialized with locales | |||
COLLATE: C | |||
CTYPE: en_US.UTF-8 | |||
MESSAGES: en_US.UTF-8 | |||
MONETARY: en_US.UTF-8 | |||
NUMERIC: en_US.UTF-8 | |||
TIME: en_US.UTF-8 | |||
The default text search configuration will be set to "english". | |||
Data page checksums are disabled. | |||
creating directory /usr/local/pgsql/data ... ok | |||
creating subdirectories ... ok | |||
selecting default max_connections ... 100 | |||
selecting default shared_buffers ... 128MB | |||
creating configuration files ... ok | |||
creating template1 database in /usr/local/pgsql/data/base/1 ... ok | |||
initializing pg_authid ... ok | |||
initializing dependencies ... ok | |||
creating system views ... ok | |||
loading system objects' descriptions ... ok | |||
creating collations ... ok | |||
creating conversions ... ok | |||
creating dictionaries ... ok | |||
setting privileges on built-in objects ... ok | |||
creating information schema ... ok | |||
loading PL/pgSQL server-side language ... ok | |||
vacuuming database template1 ... ok | |||
copying template1 to template0 ... ok | |||
copying template1 to postgres ... ok | |||
syncing data to disk ... ok | |||
WARNING: enabling "trust" authentication for local connections | |||
You can change this by editing pg_hba.conf or using the option -A, or | |||
--auth-local and --auth-host, the next time you run initdb. | |||
Success. You can now start the database server using: | |||
/usr/local/bin/postgres -D /usr/local/pgsql/data | |||
or | |||
/usr/local/bin/pg_ctl -D /usr/local/pgsql/data -l logfile start | |||
</pre> | |||
--> | |||
: Starten vom Dienst für PostgreSQL | : Starten vom Dienst für PostgreSQL | ||
:: <code>/usr/local/etc/rc.d/postgresql start</code> | :: <code>/usr/local/etc/rc.d/postgresql start</code> | ||
::: oder alternativ | |||
:::: <code>service postgresql start</code> | |||
<!-- | |||
<pre> | |||
LOG: could not create IPv6 socket: Protocol not supported | |||
LOG: ending log output to stderr | |||
HINT: Future log output will go to log destination "syslog". | |||
</pre> | |||
--> | |||
[[wikipedia:de:Pip (Python)]] und VirtualEnv für Python installieren | [[wikipedia:de:Pip (Python)]] und VirtualEnv für Python installieren | ||
:<code>pkg install py27-pip</code> | :<code>pkg install -y py27-pip</code> | ||
:<code>pkg install py27-virtualenv</code> | :<code>pkg install -y py27-virtualenv</code> | ||
; weitere benötigte Software installieren | ; weitere benötigte Software installieren | ||
: [[wikipedia:de:git]] installieren | : [[wikipedia:de:git]] installieren | ||
:: <code>pkg install git</code> | :: <code>pkg install -y git</code> | ||
<!-- | |||
<pre> | |||
Running fc-cache to build fontconfig cache... | |||
/usr/local/share/fonts: skipping, no such directory | |||
/usr/local/lib/X11/fonts: skipping, no such directory | |||
/usr/home/k-ot/.local/share/fonts: skipping, no such directory | |||
/usr/home/k-ot/.fonts: skipping, no such directory | |||
/var/db/fontconfig: cleaning cache directory | |||
/usr/home/k-ot/.cache/fontconfig: not cleaning non-existent cache directory | |||
/usr/home/k-ot/.fontconfig: not cleaning non-existent cache directory | |||
fc-cache: succeeded | |||
</pre> | |||
<pre> | |||
===> Creating users and/or groups. | |||
Creating group 'git_daemon' with gid '964'. | |||
Creating user 'git_daemon' with uid '964'. | |||
</pre> | |||
<pre> | |||
</pre> | |||
<pre> | |||
Updating /etc/shells | |||
</pre> | |||
<pre> | |||
Message for ca_root_nss-3.19: | |||
********************************* WARNING ********************************* | |||
FreeBSD does not, and can not warrant that the certificate authorities | |||
whose certificates are included in this package have in any way been | |||
audited for trustworthiness or RFC 3647 compliance. | |||
Assessment and verification of trust is the complete responsibility of the | |||
system administrator. | |||
*********************************** NOTE ********************************** | |||
This package installs symlinks to support root certificates discovery by | |||
default for software that uses OpenSSL. | |||
This enables SSL Certificate Verification by client software without manual | |||
intervention. | |||
If you prefer to do this manually, replace the following symlinks with | |||
either an empty file or your site-local certificate bundle. | |||
* /etc/ssl/cert.pem | |||
* /usr/local/etc/ssl/cert.pem | |||
* /usr/local/openssl/cert.pem | |||
*************************************************************************** | |||
Message for git-2.4.0: | |||
------------------------------------------------------------------------ | |||
*************************** GITWEB ************************************* | |||
If you installed the GITWEB option please follow these instructions: | |||
In the directory /usr/local/share/examples/git/gitweb you can find all files to | |||
make gitweb work as a public repository on the web. | |||
All you have to do to make gitweb work is: | |||
1) Copy the files /usr/local/share/examples/git/gitweb/* to a directory on | |||
your web server (e.g. Apache2) in which you are able to execute | |||
CGI-scripts. | |||
2) In gitweb.cgi, adjust the variable $projectroot to point to | |||
your git repository (that is where you have your *.git project | |||
directories). | |||
*************************** GITWEB ************************************* | |||
*************************** CONTRIB ************************************ | |||
If you installed the CONTRIB option please note that the scripts are | |||
installed in /usr/local/share/git-core/contrib. Some of them require | |||
other ports to be installed (perl, python, etc), which you may need to | |||
install manually. | |||
*************************** CONTRIB ************************************ | |||
------------------------------------------------------------------------ | |||
</pre> | |||
--> | |||
: [[wikipedia:en:Apache Solr]] installieren | : [[wikipedia:en:Apache Solr]] installieren | ||
:: <code>pkg install apache-solr</code> | :: <code>pkg install -y apache-solr</code> | ||
::: Im Übrigen bringt Apache Solr die Abhängigkeit zu OpenJDK schon mit sich. Dabei wird die aktuelle Version, was momentan Version 7 ist, mit installiert. | |||
<!-- | |||
<pre> | |||
Message for dejavu-2.34_6: | |||
Make sure that the freetype module is loaded. If it is not, add the following | |||
line to the "Modules" section of your X Windows configuration file: | |||
Load "freetype" | |||
Add the following line to the "Files" section of X Windows configuration file: | |||
FontPath "/usr/local/share/fonts/dejavu/" | |||
Note: your X Windows configuration file is typically /etc/X11/XF86Config | |||
if you are using XFree86, and /etc/X11/xorg.conf if you are using X.Org. | |||
</pre> | |||
<pre> | |||
Message for openjdk-7.80.15,1: | |||
====================================================================== | |||
This OpenJDK implementation requires fdescfs(5) mounted on /dev/fd and | |||
procfs(5) mounted on /proc for some functionality. | |||
If you have not done it yet, please do the following: | |||
mount -t fdescfs fdesc /dev/fd | |||
mount -t procfs proc /proc | |||
To make it permanent, you need the following lines in /etc/fstab: | |||
fdesc /dev/fd fdescfs rw 0 0 | |||
proc /proc procfs rw 0 0 | |||
====================================================================== | |||
</pre> | |||
--> | |||
:: [[wikipedia:en:Apache Solr]] soll gestartet werden können (und zu jedem Neustart gestartet werden) | :: [[wikipedia:en:Apache Solr]] soll gestartet werden können (und zu jedem Neustart gestartet werden) | ||
::: <code>echo 'solr_enable="YES"' >> /etc/rc.conf</code> | ::: <code>echo 'solr_enable="YES"' >> /etc/rc.conf</code> | ||
: [[wikipedia:de:Jetty]] installieren | : [[wikipedia:de:Jetty]] installieren | ||
:: <code>pkg install jetty</code> | :: <code>pkg install -y jetty</code> | ||
<!-- | |||
<pre> | |||
Message for jetty-8.1.15: | |||
Jetty is now installed in /usr/local/jetty | |||
You may want to activate it in /etc/rc.conf: | |||
# echo jetty_enable="YES" >> /etc/rc.conf | |||
Then copy the sample configuration file to the proper location: | |||
# cp /usr/local/jetty/etc/jetty.xml /usr/local/etc/jetty.xml | |||
Now, start Jetty: | |||
env - /usr/local/etc/rc.d/jetty start | |||
For this control script to run seamlessly, it is recommended to increase the | |||
maximum length of commands displayed by ps(1). Please append the following | |||
setting to /etc/sysctl.conf: | |||
# Do not truncate command line arguments in ps(1) listing | |||
kern.ps_arg_cache_limit=10000 | |||
This setting will take effect at next reboot, however it is possible to have | |||
immediate effect with the following command as root: | |||
# sysctl kern.ps_arg_cache_limit=10000 | |||
If you wish to skip this setting, please note that the `stop', `restart' and | |||
`status' will not function properly with jetty. | |||
Once Jetty is started, point your web browser to the default home page at | |||
http://localhost:8080/ to read the documentation and test the samples. | |||
Jetty configuration is located at /usr/local/etc/jetty.xml | |||
Enjoy! | |||
-------------------------------------------------------------------------------- | |||
ADVANCED USAGE | |||
If you need to pass special options to Java, please set the | |||
jetty_flags option in /etc/rc.conf, see examples below: | |||
# Prevent Java from opening an X11 display | |||
jetty_flags="-Djava.awt.headless=true" | |||
# Increase memory limit of the Java virtual machine | |||
jetty_flags="-Xms32m -Xmx256m" | |||
# Run Java with remote debugging turned on on port 8000 | |||
jetty_flags="-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000" | |||
To specify the java version to use, please use jetty_java_version: | |||
jetty_java_version="1.4" | |||
</pre> | |||
--> | |||
:: Jetty soll gestartet werden können (und zu jedem Neustart gestartet werden) | :: Jetty soll gestartet werden können (und zu jedem Neustart gestartet werden) | ||
::: <code>echo 'jetty_enable="YES"' >> /etc/rc.conf</code> | ::: <code>echo 'jetty_enable="YES"' >> /etc/rc.conf</code> | ||
Zeile 56: | Zeile 433: | ||
::: <code>cp /usr/local/jetty/etc/jetty.xml /usr/local/etc/jetty.xml</code> | ::: <code>cp /usr/local/jetty/etc/jetty.xml /usr/local/etc/jetty.xml</code> | ||
::: <code>env - /usr/local/etc/rc.d/jetty start</code> | ::: <code>env - /usr/local/etc/rc.d/jetty start</code> | ||
:::: oder (wahrscheinlich) alternativ | |||
::::: <code>service jetty start</code> | |||
::: <code>echo 'kern.ps_arg_cache_limit=10000' >> /etc/sysctl.conf</code> | ::: <code>echo 'kern.ps_arg_cache_limit=10000' >> /etc/sysctl.conf</code> | ||
::: <code>echo 'jetty_flags="-Djava.awt.headless=true"' >> /etc/rc.conf</code> | |||
<!-- | <!-- | ||
ADVANCED USAGE | ADVANCED USAGE | ||
Zeile 82: | Zeile 462: | ||
::: <code>cat /usr/local/etc/jetty.xml</code> | ::: <code>cat /usr/local/etc/jetty.xml</code> | ||
: [[wikipedia:de:OpenJDK]] 6 installieren | : [[wikipedia:de:OpenJDK]] 6 installieren | ||
:: <code>pkg install openjdk6</code> | :: <code>pkg install -y openjdk6</code> | ||
<pre> | <pre> | ||
## Prevent Java from opening an X11 display | ## Prevent Java from opening an X11 display | ||
Zeile 97: | Zeile 476: | ||
: <code>echo 'proc /proc procfs rw 0 0' >> /etc/fstab</code> | : <code>echo 'proc /proc procfs rw 0 0' >> /etc/fstab</code> | ||
; | ; CKAN einrichten | ||
: <code>mkdir -p /usr/lib/ckan/default</code> | : <code>mkdir -p /usr/lib/ckan/default</code> | ||
: <code>chown `whoami` /usr/lib/ckan/default</code> | : <code>chown `whoami` /usr/lib/ckan/default</code> | ||
Zeile 115: | Zeile 495: | ||
: <code>pip install -r /usr/lib/ckan/default/src/ckan/requirements.txt</code> | : <code>pip install -r /usr/lib/ckan/default/src/ckan/requirements.txt</code> | ||
; | ; [[wikipedia:de:PostgreSQL]] einrichten | ||
: | |||
: | |||
Wechseln zum Account ''pgsql'' | Wechseln zum Account ''pgsql'' | ||
Zeile 130: | Zeile 508: | ||
</pre> | </pre> | ||
: <code>createdb -O ckan_default ckan_default -E utf-8</code> | : <code>createdb -O ckan_default ckan_default -E utf-8</code> | ||
: <code></code> | : <code>exit</code> | ||
---- | ---- | ||
: <code>mkdir -p /usr/local/etc/ckan/default</code> | : <code>mkdir -p /usr/local/etc/ckan/default</code> | ||
Zeile 143: | Zeile 521: | ||
: <code>paster make-config ckan /etc/ckan/default/development.ini</code> | : <code>paster make-config ckan /etc/ckan/default/development.ini</code> | ||
: <code> | : <code>$EDITOR /etc/ckan/default/development.ini</code> | ||
<pre></pre> | <pre></pre> | ||
<pre> | <pre> | ||
Zeile 189: | Zeile 567: | ||
=== mögliche Fragen zur Installation bei [[FreeBSD]] === | === mögliche Fragen zur Installation bei [[FreeBSD]] === | ||
* Wozu brauch die Datei ''pg_hba.conf'' nochmal den Eintrag der IP, wenn | |||
<pre> | |||
local all all trust | |||
# IPv4 local connections: | |||
host all all 127.0.0.1/32 trust | |||
# IPv6 local connections: | |||
host all all ::1/128 trust | |||
</pre> | |||
ohnehin eingetragen ist. | |||
: <code>/usr/local/pgsql/data/pg_hba.conf</code> | |||
<pre></pre> | |||
<pre> | |||
host all all $IP/24 trust | |||
</pre> | |||
<pre></pre> | |||
* Wird JDBC benötigt? | * Wird JDBC benötigt? | ||
** <code>pkg install postgresql-jdbc</code> | ** <code>pkg install -y postgresql-jdbc</code> | ||
<!-- | |||
Message for postgresql-jdbc-9.2.1004: | |||
PostgreSQL JDBC support installed! | |||
postgresql.jar resides in | |||
/usr/local/share/java/classes/postgresql.jar | |||
Add this to your CLASSPATH! | |||
--> | |||
**: Liegt dann bei ''/usr/local/share/java/classes/postgresql.jar''. | |||
* Wie verhält es sich mit ''openjdk''? Bei ''apache-solr'' wird die aktuelle Version (7) installiert. Seitens CKAN wird aber auf die Version 6 verwiesen, oder? | * Wie verhält es sich mit ''openjdk''? Bei ''apache-solr'' wird die aktuelle Version (7) installiert. Seitens CKAN wird aber auf die Version 6 verwiesen, oder? |
Aktuelle Version vom 26. Juli 2015, 04:50 Uhr
Installation
Installation allgemein
- https://docs.ckan.org/en/latest/maintaining/installing/
- https://github.com/ckan/ckan/wiki/How-to-Install-CKAN
Installation bei FreeBSD
FreeBSD (beispielsweise eine Jail) auf den aktuellen Stand bringen
pkg update && pkg upgrade -y
wikipedia:de:zsh für eine "schön bequeme" Shell installieren
pkg install -y zsh
zu wikipedia:de:zsh wechseln
zsh
wikipedia:de:Python (Programmiersprache) installieren
- eigentlich müsste, da anscheint Python 2 (2015-07) der Standard bei FreeBSD, es auch ohne Angabe der Version gehen
pkg install -y python
pkg install -y python27
wikipedia:de:PostgreSQL installieren
- postgresql94 wäre verfügbar, aber postgresql-libpqxx möchte ohnehin gern postgresql93-client installieren
pkg install -y postgresql93-server
- eigentlich hieß es libpq (Es wird davon ausgegangen, dass das bei FreeBSD postgresql-libpqxx ist.)
pkg install -y postgresql-libpqxx
Inbetriebnahme von wikipedia:de:PostgreSQL
- Wenn es sich um eine Jail handelt, so muss für PostgreSQL SysV IPC erlaubt sein.
$EDITOR /etc/rc.conf
jail_sysvipc_allow="YES"
- Etwa bei PC-BSD kann einfach bei der Jail allow.sysvipc angewählt werden.
- Etwa bei FreeNAS kann einfach bei der Jail ,allow.sysvipc=true ergänzend eingetragen werden.
- Einrichtung von PostgreSQL
- (gemäß Hinweis von FreeBSD am Ende der Installation) optionales Definieren für Sprache und so weiter
- Hinterlegen der Vorgaben zur Verwendung für PostgreSQL
$EDITOR /etc/login.conf
- Hinterlegen der Vorgaben zur Verwendung für PostgreSQL
- (gemäß Hinweis von FreeBSD am Ende der Installation) optionales Definieren für Sprache und so weiter
postgres:\ :lang=en_US.UTF-8:\ :setenv=LC_COLLATE=C:\ :tc=default:
-
cap_mkdb /etc/login.conf
-
echo 'postgresql_class="postgres"' >> /etc/rc.conf
-
- PostgreSQL soll gestartet werden können (und zu jedem Neustart gestartet werden)
echo 'postgresql_enable="YES"' >> /etc/rc.conf
- Initialisieren von PostgreSQL
/usr/local/etc/rc.d/postgresql initdb
- oder alternativ
service postgresql initdb
- oder alternativ
- Starten vom Dienst für PostgreSQL
/usr/local/etc/rc.d/postgresql start
- oder alternativ
service postgresql start
- oder alternativ
wikipedia:de:Pip (Python) und VirtualEnv für Python installieren
pkg install -y py27-pip
pkg install -y py27-virtualenv
- weitere benötigte Software installieren
- wikipedia:de:git installieren
pkg install -y git
- wikipedia:en:Apache Solr installieren
pkg install -y apache-solr
- Im Übrigen bringt Apache Solr die Abhängigkeit zu OpenJDK schon mit sich. Dabei wird die aktuelle Version, was momentan Version 7 ist, mit installiert.
- wikipedia:en:Apache Solr soll gestartet werden können (und zu jedem Neustart gestartet werden)
echo 'solr_enable="YES"' >> /etc/rc.conf
- wikipedia:de:Jetty installieren
pkg install -y jetty
- Jetty soll gestartet werden können (und zu jedem Neustart gestartet werden)
echo 'jetty_enable="YES"' >> /etc/rc.conf
- Jetty einrichten und starten
cp /usr/local/jetty/etc/jetty.xml /usr/local/etc/jetty.xml
env - /usr/local/etc/rc.d/jetty start
- oder (wahrscheinlich) alternativ
service jetty start
- oder (wahrscheinlich) alternativ
echo 'kern.ps_arg_cache_limit=10000' >> /etc/sysctl.conf
echo 'jetty_flags="-Djava.awt.headless=true"' >> /etc/rc.conf
- Konfiguration von Jetty prüfen
cat /usr/local/etc/jetty.xml
- wikipedia:de:OpenJDK 6 installieren
pkg install -y openjdk6
## Prevent Java from opening an X11 display # jetty_flags="-Djava.awt.headless=true" ## Increase memory limit of the Java virtual machine # jetty_flags="-Xms32m -Xmx256m" ## Run Java with remote debugging turned on on port 8000 # jetty_flags="-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000"
- Einrichten von openjdk6
echo 'fdesc /dev/fd fdescfs rw 0 0' >> /etc/fstab
echo 'proc /proc procfs rw 0 0' >> /etc/fstab
- CKAN einrichten
mkdir -p /usr/lib/ckan/default
chown `whoami` /usr/lib/ckan/default
virtualenv --no-site-packages /usr/lib/ckan/default
. /usr/lib/ckan/default/bin/activate
- pip
-
- Da spätere eine entsprechende Meldung kam, einfach vorher einmal updat con pip machen.
pip install --upgrade pip
CKAN (2.3) mit pip, aus den Quellen von Github per git beziehend, installieren
- alternativ wäre wohl
pip install -e 'git+https://github.com/ckan/ckan.git#egg=ckan'
- noch aktueller
- alternativ wäre wohl
pip install -e 'git+https://github.com/ckan/ckan.git@ckan-2.3#egg=ckan'
pip install -r /usr/lib/ckan/default/src/ckan/requirements.txt
- wikipedia:de:PostgreSQL einrichten
Wechseln zum Account pgsql
- Im Übrigen nennen die Beschreibung von CKAN den Account immer postgres. Standardmäßig ist sie aber bei PostgreSQL (bei FreeBSD) pgsql.
su pgsql
psql -l
createuser -S -D -R -P ckan_default
Enter password for new role: Enter it again:
createdb -O ckan_default ckan_default -E utf-8
exit
mkdir -p /usr/local/etc/ckan/default
chown -R `whoami` /usr/local/etc/ckan/
- eigentlich heißt es /etc/ckan/default statt /usr/local/etc/ckan/default
ergänzende Erstellung eines Links, um der Vorgabe von CKAN zu entsprechen
- Es sollte geprüft werden, ob das auch ohne Link funktioniert.
ln -s /usr/local/etc/ckan /etc/ckan
chown -R `whoami` /etc/ckan/
cd /usr/lib/ckan/default/src/ckan
paster make-config ckan /etc/ckan/default/development.ini
$EDITOR /etc/ckan/default/development.ini
#sqlalchemy.url = postgresql://ckan_default:pass@localhost/ckan_default sqlalchemy.url = postgresql://ckan_default:password@localhost/ckan_default
#ckan.site_url = ### aktuell gibt es keine Domain, weswegen erste einmal die IPv4-Adresse eingetragen wurde ckan.site_url = http://''$IPv4-Adresse''
- Jetty
- Es wird immer von
$JETTY_HOME
geschrieben. Das ist praktisch/usr/local/jetty
.
- Solr
ln -s /usr/lib/ckan/default/src/ckan/ckan/config/solr/schema.xml /var/db/solr/solr.xml
service solr start
solr_url=http://127.0.0.1:8983/solr
- http://$IPv4-Adresse:8983/solr/
ln -s /usr/lib/ckan/default/src/ckan/who.ini /etc/ckan/default/who.in
(Versuch gemäß http://mikkel.hoegh.org/2011/07/24/install-multicore-apache-solr-freebsd-jetty/ 10.)
ln -s /usr/local/share/java/classes/solr-4.10.1.war solr.war
mögliche Fragen zur Installation bei FreeBSD
- Wozu brauch die Datei pg_hba.conf nochmal den Eintrag der IP, wenn
local all all trust # IPv4 local connections: host all all 127.0.0.1/32 trust # IPv6 local connections: host all all ::1/128 trust
ohnehin eingetragen ist.
/usr/local/pgsql/data/pg_hba.conf
host all all $IP/24 trust
- Wird JDBC benötigt?
pkg install -y postgresql-jdbc
- Liegt dann bei /usr/local/share/java/classes/postgresql.jar.
- Wie verhält es sich mit openjdk? Bei apache-solr wird die aktuelle Version (7) installiert. Seitens CKAN wird aber auf die Version 6 verwiesen, oder?
- Solr ordentlich hoch bekommen ln -s /usr/local/share/examples/apache-solr/example-schemaless/solr /var/db/solr
/usr/local/etc/rc.d/solr: WARNING: /var/db/solr/solr.xml is not readable. /usr/local/etc/rc.d/solr: WARNING: failed precmd routine for solr