Skip to content

SLES 12 Installation notes for NLCR

Rudolf edited this page Jul 23, 2015 · 8 revisions

SLES 12 Installation notes for National Library of the Czech Republic

There was too much hassle with building Python 2.7 in SLES 11, as there is no repo for Python 2.7. Sticking with SLES 12 is better choice regarding maintainability of server.

Prerequisities

Install also python-devel, pcre-devel, zlib-devel, libopenssl-devel using zypper/yast

Nginx

Install pcre-devel, zlib-devel, libopenssl-devel using zypper Nginx is not part of SLES repository, build it from source: http://nginx.org/en/docs/configure.html with ./configure --prefix=/usr/local/nginx

curator00:~ # cat /usr/local/nginx/conf/nginx.conf

server {
    listen       80;
    server_name  curator00.webarchiv.cz;
    return       301 http://www.curator00.webarchiv.cz$request_uri;`
}

server {
    listen 80;
    server_name www.curator00.webarchiv.cz;
    access_log /var/log/seeder/access.log;
    error_log  /var/log/sseeder/error.log;

    #listen 443 ssl;
    #ssl_certificate      <ssl_path>.crt;
    #ssl_certificate_key  <ssl_path>.key;

    location / {
        uwsgi_pass  unix:///opt/git/Seeder/uwsgi.sock;
        include uwsgi_params;
    }

    location /media {
        root /opt/git/Seeder/Seeder;
    }

    location /static {
        alias /opt/git/Seeder/Seeder/static_root;
    }

}

UWSGI

pip install uwsgi will fail without installed python-devel package.

curator00:~ # cat /usr/local/uwsgi

[uwsgi]
virtualenv      = /opt/seeder/
pythonpath      = /opt/git/Seeder/Seeder
plugins         = python
master          = 1
pidfile         = /opt/git/Seeer/seeder.pid
touch-reload    = /opt/git/Seeder/reload.touch
socket          = /opt/git/Seeder/seeder.sock
chmod-socket    = 777
cheaper-algo    = spare
cheaper         = 2
cheaper-initial = 2
cheaper-step    = 1
processes       = 6
vacuum          = 1
harakiri        = 60
wsgi-file       = /opt/git/Seeder/Seeder/wsgi.py

Supervisor

curator00:~ # cat /usr/local/supervisor.conf

[program:seeder]
user = wwwrun
command=uwsgi --ini /usr/
autostart=true
autorestart=true
stdout_logfile=<log_path>seeder/uwsgi.log
stderr_logfile=<log_path>seeder/uwsgi.log
redirect_stderr=true
stopsignal=QUIT

Manet

Easiest installation seems thru npm package manager which is part of Node.js. Cloning git https://github.com/joyent/node.git a building node.js as defined in README.md. Then just

curator00:/opt/git/node # npm install -g phantomjs
curator00:/opt/git/node # npm install -g manet 
Clone this wiki locally