Changes

From SME Server
Jump to navigationJump to search
2,037 bytes added ,  14:29, 27 June 2017
no edit summary
Line 2: Line 2:  
this how to is to install wikimedia parsoid server on a SME9
 
this how to is to install wikimedia parsoid server on a SME9
    +
=== install ===
    
install epel repo
 
install epel repo
Line 32: Line 33:  
  uri: 'http://wiki.medi.com/api.php'
 
  uri: 'http://wiki.medi.com/api.php'
 
and optionals as per example
 
and optionals as per example
  domain: 'wiki.medi.com'  # optiona
+
  domain: 'wiki.medi.com'  # optional
 +
 
 +
===configure startup using deamontools===
 +
mkdir -p /var/services/parsoid/supervise
 +
mkdir -p /var/services/parsoid/log/supervise
 +
mkdir /var/log/parsoid
 +
chown www:www /var/log/parsoid
 +
echo  >/var/services/parsoid/run <<- EOM
 +
#!/bin/sh
 +
exec 2>&1
 +
exec \
 +
    /usr/local/bin/setuidgid www \
 +
    /usr/bin/node /opt/parsoid/parsoid.js \
 +
    -c /opt/parsoid/etc/config.yaml \
 +
    -n 1
 +
# /usr/bin/node /opt/parsoid/parsoid.js --help
 +
#Usage: /opt/parsoid/parsoid.js [command] [options]
 +
#
 +
#Commandes:
 +
#  docker-start  starts the service in a Docker container
 +
#  docker-test  starts the test process in a Docker container
 +
#  build        builds the service's package and deploy repo
 +
#
 +
#Options:
 +
#  -n, --num-workers  number of workers to start                    [default: -1]
 +
#  -c, --config      YAML-formatted configuration file
 +
#                                [string] [default: "./config.yaml"]
 +
#  -f, --force        force the operation to execute    [boolean] [default: false]
 +
#  -d, --deploy-repo  build only the deploy repo        [boolean] [default: false]
 +
#  -r, --review      send the patch to Gerrit after building the repo
 +
#                                                      [boolean] [default: false]
 +
#  --verbose          be verbose                        [boolean] [default: false]
 +
#  -v, --version      print the service's version and exit
 +
#                                                      [boolean] [default: false]
 +
#  -h, --help        Display help                                [boolean]   
 +
EOM
 +
chmod +x /var/services/parsoid/run
 +
echo  >/var/services/parsoid/log/run <<- EOM
 +
#!/bin/sh
 +
exec \
 +
    /usr/local/bin/setuidgid www \
 +
    /usr/local/bin/multilog t s5000000  \
 +
    /var/log/parsoid
 +
EOM
 +
chmod +x /var/services/parsoid/log/run
 +
 
 +
then add link
 +
pushd /services
 +
ln -s /var/services/parsoid
 +
popd
 +
pushd /etc/init.d/supervise/
 +
ln -s ../daemontools parsoid
 +
popd
 +
pushd /etc/rc.d/rc7.d/
 +
ln -s  S99/etc/rc.d/init.d/e-smith-service parsoid
 +
popd
 +
 
    
===Sources===
 
===Sources===
Super Admin, Wiki & Docs Team, Bureaucrats, Interface administrators, Administrators
3,254

edits

Navigation menu