Posts

Showing posts from April, 2017

Run on start up in FreeBSD

1.Crontab "@reboot" ... 0 2 * * 1 root /usr/local/bin/certbot renew --renew-hook "service apache24 restart" -q #upnpc * * * * * root /usr/local/bin/upnpc.sh @reboot mosq:wheel /usr/local/bin/python3 /home/mosq/.workspace.py/python3/ilohas/ilohas/spider/batch/runner.py 2./etc/rc add a line just before ending line. ... /usr/local/bin/uwsgi --emperor /usr/local/etc/uwsgi/vassals --uid www --gid www --daemonize /var/log/uwsgi-emperor.log exit 0 3.Create a script as System service. path:/usr/local/etc/rc.d/ For a example #!/bin/sh # PROVIDE: miniupnpc # REQUIRE: NETWORKING SERVERS DAEMON ldconfig resolv # KEYWORD: shutdown . /etc/rc.subr # Add the following lines to /etc/rc.conf to enable miniupnpc # miniupnpc_enable="YES" # miniupnpc_config="port protocol [port2 protocol2] [...]" name="miniupnpc" rcvar=miniupnpc_enable load_rc_config $name miniupnpc_enable=${miniupnpc_enable:-"NO"} command="/usr/local/b...

Solr Cloud Mode on FREEBSD

1.Set Bash as the default shell. 2.Create the groups and users zookeeper:*:962: solr:*:161: ... zookeeper:*:962:962:zookeeper user:/nonexistent:/usr/sbin/nologin solr:*:161:161:Apache Solr System:/var/db/solr:/usr/sbin/nologin 3.Download zookeeper and solr from https://zookeeper.apache.org/releases.html#download https://lucene.apache.org/solr/downloads.html and unzip them. curl -O https://xxxxxx OR wget https://xxxxxx 4.link path to /usr/local/etc tar zxf xxxx.gz sudo ln -s /usr/local/etc/solr ~/solr.xx.xx sudo ln -s /usr/local/etc/zookeeper ~/zookeeper.xx.xx 5.Customize solr config copy solr/server/solr/configsets/_default to solr/server/solr/configsets/xxx_default and create file "data-config.xml" <dataconfig> <datasource driver="org.postgresql.Driver" url="jdbc:postgresql://localhost/postgres" user="pgu1" password="pgu1" /> <document> <entity name="item" query=...