Skip to content

Instantly share code, notes, and snippets.

  1. 开启ipv4转发
vi /etc/sysctl.conf
# 将net.ipv4.ip_forward=0更改为net.ipv4.ip_forward=1
sysctl -p
  1. 安装dnsmasq 和pdnsd解决dns污染

DNS的解析方案为 resolve.conf ==> dnsmasq ==> pdnsd

@farlandliu
farlandliu / logging.py
Created April 9, 2018 02:44 — forked from adamghill/logging.py
Django logging configuration
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'root': {
'level': 'DEBUG',
'handlers': ['console', ],
},
'filters': {
'require_debug_false': {
'()': 'django.utils.log.RequireDebugFalse'
@farlandliu
farlandliu / supervisord.service
Created July 28, 2018 15:24 — forked from mozillazg/supervisord.service
install and configure supervisord on centos 7.
[Unit]
Description=supervisord - Supervisor process control system for UNIX
Documentation=http://supervisord.org
After=network.target
[Service]
Type=forking
ExecStart=/bin/supervisord -c /etc/supervisord/supervisord.conf
ExecReload=/bin/supervisorctl reload
ExecStop=/bin/supervisorctl shutdown