forked from ayeowch/bitnodes
-
Notifications
You must be signed in to change notification settings - Fork 0
Install
Yedige Davletgaliyev edited this page Jul 1, 2019
·
3 revisions
DigitalOcean 1Gb 1vCPU Droplet Debian 9.7 64-bit
aptitude update; aptitude upgrade
aptitude -y install apt-transport-https build-essential dirmngr htop python-dev python-pip tcl tcpdump unzip
export REDIS_SOCKET=/tmp/redis.sock
export REDIS_PASSWORD=d74fe559c0
net.core.somaxconn=60000
fs.file-max=1000000
* soft nofile 1000000
* hard nofile 1000000
vi /etc/apt/sources.list.d/tor.list
deb https://deb.torproject.org/torproject.org stretch main
deb-src https://deb.torproject.org/torproject.org stretch main
gpg --recv A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89
gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | apt-key add -
aptitude update
aptitude install tor deb.torproject.org-keyring
vi /etc/tor/torrc
Log notice file /var/log/tor/notices.log
service tor reload
cd; wget http://download.redis.io/releases/redis-5.0.5.tar.gz
tar xzf redis-5.0.5.tar.gz; cd redis-5.0.5; make; make test
make install
cd utils; bash install_server.sh
vi /etc/init.d/redis_6379
***************************************************************************
#!/bin/sh
EXEC=/usr/local/bin/redis-server
CLIEXEC=/usr/local/bin/redis-cli
PIDFILE=/var/run/redis_6379.pid
CONF="/etc/redis/6379.conf"
REDISSOCKET="/tmp/redis.sock"
REDISPASSWORD="d74fe559c0"
###############
# SysV Init Information
# chkconfig: - 58 74
# description: redis_6379 is the redis daemon.
### BEGIN INIT INFO
# Provides: redis_6379
# Required-Start: $network $local_fs $remote_fs
# Required-Stop: $network $local_fs $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Should-Start: $syslog $named
# Should-Stop: $syslog $named
# Short-Description: start and stop redis_6379
# Description: Redis daemon
### END INIT INFO
case "$1" in
start)
if [ -f $PIDFILE ]
then
echo "$PIDFILE exists, process is already running or crashed"
else
echo "Starting Redis server..."
$EXEC $CONF
fi
;;
stop)
if [ ! -f $PIDFILE ]
then
echo "$PIDFILE does not exist, process is not running"
else
PID=$(cat $PIDFILE)
echo "Stopping ..."
$CLIEXEC -s $REDISSOCKET -a $REDISPASSWORD shutdown
while [ -x /proc/${PID} ]
do
echo "Waiting for Redis to shutdown ..."
sleep 1
done
echo "Redis stopped"
fi
;;
status)
PID=$(cat $PIDFILE)
if [ ! -x /proc/${PID} ]
then
echo 'Redis is not running'
else
echo "Redis is running ($PID)"
fi
;;
restart)
$0 stop
$0 start
;;
*)
echo "Please use start, stop, restart or status as first argument"
;;
esac
***************************************************************************
update-rc.d redis_6379 defaults
vi /etc/redis/6379.conf
unixsocket /tmp/redis.sock
unixsocketperm 777
#save 900 1
#save 300 10
#save 60 10000
requirepass d74fe559c0
maxclients 50000
maxmemory 2048mb
maxmemory-policy volatile-lru
notify-keyspace-events K$z
activerehashing no
reboot
git clone https://github.com/Groestlcoin/groestlnodes
cd groestlnodes
pip install -r requirements.txt
bash geoip/update.sh
bash start.sh