Diskussion:Server/CKAN: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Vater (Diskussion | Beiträge) |
Vater (Diskussion | Beiträge) |
||
(2 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
Zeile 248: | Zeile 248: | ||
: [[wikipedia:de:git]] installieren | : [[wikipedia:de:git]] installieren | ||
:: <code>pkg install -y 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 -y 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 -y 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> | ||
:: Jetty einrichten und starten | :: Jetty einrichten und starten | ||
::: <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 288: | Zeile 463: | ||
: [[wikipedia:de:OpenJDK]] 6 installieren | : [[wikipedia:de:OpenJDK]] 6 installieren | ||
:: <code>pkg install -y 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 393: | 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 -y 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''. | **: Liegt dann bei ''/usr/local/share/java/classes/postgresql.jar''. | ||
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