Skip to content

Instantly share code, notes, and snippets.

View kometchtech's full-sized avatar
🏠
Working from home

kometchtech kometchtech

🏠
Working from home
View GitHub Profile
@kometchtech
kometchtech / gist:8664bda92a397e3348b7
Last active August 29, 2015 14:19
ubuntu 14.04 boot init
#!/bin/sh -e
# Workaround unhandled rdmsr/wrmsr
echo 1 >/sys/module/kvm/parameters/ignore_msrs
# vnc start
su kometch -c "vncserver :0"
# Disable NCQ on all disks. (for raptors it increases the speed 30-40MiB/s)
echo 1 > /sys/block/sda/device/queue_depth
net.ipv4.ip_forward = 1
net.ipv4.conf.default.rp_filter = 0
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 0
net.ipv4.tcp_fin_timeout = 60
kernel.msgmnb = 65536
@kometchtech
kometchtech / dibbler-server.service
Last active October 4, 2015 06:20
dibbler-server systemd for debian jessie
[Unit]
Description=Dibbler - a portable DHCPv6
Wants=network-online.target nss-lookup.target
After=network.target networking.service
[Service]
Type=simple
ExecStart=/usr/local/sbin/dibbler-server run
RemainAfterExit=yes
@kometchtech
kometchtech / nsd4.service
Created April 19, 2015 15:17
NSD4 systemd for debian jessie
[Unit]
Description=NSD is an authoritative only, high performance, simple and open source name server
After=network.target networking.service
[Service]
Type=simple
ExecStart=/usr/local/sbin/nsd -d
RemainAfterExit=yes
User=nsd
@kometchtech
kometchtech / unbound.service
Last active November 1, 2016 21:24
unbound systemd for debian jessie
[Unit]
Description=Unbound is a validating, recursive, and caching DNS resolver.
After=network.target networking.service
[Service]
Type=simple
ExecStartPre=/usr/local/sbin/unbound-anchor -a /var/unbound/root.key
ExecStartPre=/usr/local/sbin/unbound-checkconf
ExecStart=/usr/local/sbin/unbound -d
LimitNOFILE=102400
@kometchtech
kometchtech / pdns-recursor.service
Last active August 29, 2015 14:19
pdns-recursor systemd debian jessie
[Unit]
Description=The PowerDNS Recursor is a high-end, high-performance resolving name server which powers the DNS resolution
After=network.target networking.service network-online.target
[Service]
Type=simple
ExecStart=/usr/sbin/pdns_recursor --daemon=no
[Install]
WantedBy=multi-user.target
@kometchtech
kometchtech / my.cnf
Last active August 29, 2015 14:20
mysql Ver 15.1 Distrib 10.0.17-MariaDB, for Linux (x86_64) using readline 5.1
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
symbolic-links=0
innodb_file_per_table
innodb_flush_method=O_DIRECT
innodb_log_files_in_group=2
innodb_buffer_pool_size=2400M
innodb_log_file_size=128M
[Unit]
Description=Network Time Protocol daemon and utility programs
After=syslog.target network.target auditd.service
[Service]
EnvironmentFile=-/etc/default/ntp
ExecStart=/usr/sbin/ntpd -n $NTPD_OPTS
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
@kometchtech
kometchtech / vnstat.service
Created April 27, 2015 12:29
vnstat systemd.service for ubuntu 15.04
[Unit]
Description=lightweight network traffic monitor
After=syslog.target network.target
[Service]
ExecStart=/use/sbin/vnstatd
KillMode=process
[Install]
WantedBy=multi-user.target
net.ipv4.ip_forward = 1
net.ipv4.conf.default.rp_filter = 0
net.ipv4.conf.default.accept_source_route = 0
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 0
net.ipv6.conf.all.accept_ra = 0
net.core.somaxconn = 4096
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216