Line 2: |
Line 2: |
| | | |
| this how-to is an help to install mediawiki libraries (mwlib) on SME 9 | | this how-to is an help to install mediawiki libraries (mwlib) on SME 9 |
| + | |
| + | === install === |
| | | |
| you will need pdftk from dag (this repo does not exist anymore so here a way to get the files) | | you will need pdftk from dag (this repo does not exist anymore so here a way to get the files) |
Line 38: |
Line 40: |
| def tostring(self): return self.tobytes() | | def tostring(self): return self.tobytes() |
| | | |
| + | === startup script === |
| + | mkdir /var/log/mediawiki/ |
| + | chown www:www -R /var/log/mediawiki/ |
| + | cat >/etc/init.d/mw-serve <<- EOM |
| + | #!/bin/sh |
| + | |
| + | PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin |
| + | |
| + | case "\$1" in |
| + | start) |
| + | su - www -s /bin/bash -c 'nserve --port=19737 --qserve=localhost:19252 >> /var/log/mediawiki/mw-serve_log.txt 2>&1 &' |
| + | su - www -s /bin/bash -c 'mw-qserve -p 19252 -i localhost >> /var/log/mediawiki/mw-serve_log.txt 2>&1 &' |
| + | su - www -s /bin/bash -c 'nslave --serve-files-port=20361 --host=localhost --port=19252 --numprocs=1 --cachedir /var/log/mediawiki/ >> /var/log/mediawiki/mw-serve_log.txt 2>&1 &' |
| + | #su - www -s /bin/bash -c 'postman --cachedir /var/log/mediawiki/ >> /var/log/mediawiki/mw-serve_log.txt 2>&1 &' |
| + | ;; |
| + | stop) |
| + | #mv /var/log/mediawiki/mw-serve_log.txt /var/log/mediawiki/mw-serve_log.txt.old |
| + | killall nserve |
| + | killall mw-qserve |
| + | killall nslave |
| + | #killall postman |
| + | ;; |
| + | force-reload|restart) |
| + | \$0 stop |
| + | \$0 start |
| + | ;; |
| + | *) |
| + | echo "Usage: /etc/init.d/mw-serve {start|stop}" |
| + | exit 1 |
| + | ;; |
| + | esac |
| + | |
| + | exit 0 |
| + | EOM |
| + | chmod +x /etc/init.d/mw-serve |
| + | pushd /etc/rc.d/rc7.d/ |
| + | ln -s /etc/rc.d/init.d/mw-serve S80mw-serve |
| + | popd |
| | | |
| + | logrotate : |
| | | |
| ===Sources=== | | ===Sources=== |
| # http://mwlib.readthedocs.io/en/latest/installation.html | | # http://mwlib.readthedocs.io/en/latest/installation.html |
| # https://stackoverflow.com/questions/36592618/reportlab-image-to-pdf-please-call-tobytes | | # https://stackoverflow.com/questions/36592618/reportlab-image-to-pdf-please-call-tobytes |
| + | # http://edutechwiki.unige.ch/en/Mediawiki_collection_extension_installation |
| | | |
| ---- | | ---- |
| [[Category:Howto]] | | [[Category:Howto]] |