Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
#ZOO_VERSION=3.5.5
#ZOO_APP_DIR=/opt/zookeeper
#ZOO_CONF_DIR=/opt/zookeeper/conf
#ZOO_DATA_DIR=/store/data
#ZOO_DATA_LOG_DIR=/store/datalog
#ZOO_LOG_DIR=/store/logs
#ZOO_SERVERS="server.1=zkensemble-0.zkensemble.default.svc.cluster.local:2888:3888 server.2=zkensemble-1.zkensemble.default.svc.cluster.local:2888:3888 server.3=zkensemble-2.zkensemble.default.svc.cluster.local:2888:3888"
@bejean
bejean / prometheus-node-solr-exporters-install.sh
Last active June 16, 2025 13:26
Install script for Prometheus node and solr exporter
#!/bin/bash
# Install and configure node-exporter
useradd -d /home/prometheus prometheus
mkdir /opt/prometheus
cd /opt/prometheus
wget --no-cache -O - https://github.com/prometheus/node_exporter/releases/download/v0.18.1/node_exporter-0.18.1.linux-amd64.tar.gz > node_exporter-0.18.1.linux-amd64.tar.gz
tar xzf node_exporter-0.18.1.linux-amd64.tar.gz
rm -f node_exporter-0.18.1.linux-amd64.tar.gz
ln -s node_exporter-0.18.1.linux-amd64 node_exporter
@bejean
bejean / solr-exporter.service
Created October 17, 2019 06:51
Prometheus solr-exporter.service
[Unit]
Description=Prometheus Solr Exporter
After=network-online.target
[Service]
User=solr
Restart=on-failure
#Change this line if you download the
#Prometheus on different path user
@bejean
bejean / node-exporter.service
Created October 17, 2019 06:50
Prometheus node-exporter.service
[Unit]
Description=Prometheus Node Exporter
After=network-online.target
[Service]
User=prometheus
Restart=on-failure
#Change this line if you download the
#Prometheus on different path user
@bejean
bejean / albTika
Last active July 24, 2018 08:09
Tika Server init.d
#!/bin/bash
#
# albTika Start/Stop Tika server.
#
# chkconfig: 35 99 01
# description: Tika server is the document converter process of AMI Enterprise Intelligence
#
# processname: albTika
#
@bejean
bejean / zookeeper
Last active July 16, 2018 11:22
Zookeeper init.d
#!/bin/bash
#
# zookeeper Start/Stop
#
# change this value as necessary
RUNAS=zookeeper
APP=/home/zookeeper/zookeeper/bin/zkServer.sh
export JAVA_HOME=/usr/bin/java
@bejean
bejean / zookeeper-env.sh
Created April 3, 2018 21:03
zookeeper-env.sh
#-------------------------------------------------------------------
# zookeeper-env.sh
#--------------------------------------------------------------------
# Configure Log
ZOO_LOG_DIR="/var/log/zookeeper"
ZOO_LOG4J_PROP="WARN, ROLLINGFILE"
# Configure JVM GC log
ZOO_GC_LOG_DIR="/var/log/zookeeper"
SERVER_JVMFLAGS="-verbose:gc -XX:+PrintHeapAtGC -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+PrintTenuringDistr
@bejean
bejean / zookeeper
Last active May 17, 2022 14:44
Zookeeper init.d script
#!/bin/sh
# Purpose: This script starts and stops the Zookeeper daemon
# chkconfig: - 90 10
# description: Zookeeper daemon
# Source function library
. /etc/init.d/functions
APP=/opt/zookeeper/bin/zkServer.sh
@bejean
bejean / gist:a2002d848a93a70887cf
Last active August 29, 2015 14:11
SolrCloud Opensuse init.d start script sample
#!/bin/bash
#
# Template LSB system startup script for example service/daemon FOO
# Copyright (C) 1995--2005 Kurt Garloff, SUSE / Novell Inc.
#
# This library is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or (at
# your option) any later version.
#
@bejean
bejean / gist:9962ae15d7bd233013ff
Created November 28, 2014 15:27
Mongod init.d script (debian / ubuntu)
#!/bin/sh
#
# init.d script with LSB support.
#
# Copyright (c) 2007 Javier Fernandez-Sanguino <jfs@debian.org>
#
# This is free software; you may redistribute it and/or modify
# it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2,
# or (at your option) any later version.