Skip to content

Instantly share code, notes, and snippets.

root@v2:~# cat /etc/asterisk/extensions.conf
;==================================
; extensions.conf - the Asterisk dial plan
;
[general]
static=no
writeprotect=no
autofallthrough=yes
clearglobalvars=no
priorityjumping=no
@rainly
rainly / sip.conf
Created April 27, 2014 15:32 — forked from bao3/sip.conf
root@v2:~# cat /etc/asterisk/sip.conf
;=================================
; SIP Configuration for Asterisk
;
[general]
context=sip ;默认使用extension.conf中的sip字段
videosupport=yes ;打开视频支持,有些客户端(手机)支持视频
textsupport = yes ;短信支持
ccept_outofcall_message = yes
outofcall_message_context = messages
lang en_US.UTF-8
keyboard us
timezone --utc Etc/UTC
auth --useshadow --enablemd5
selinux --disabled
rootpw --lock --iscrypted locked
zerombr
clearpart --all --initlabel
#!/bin/bash
#
# Install Postgres 9.2 on a clean Ubuntu 12.04
"""
LC_ALL issue
comment out the AcceptEnv LANG LC_* line in the remote /etc/ssh/sshd_config file.
sudo apt-get install language-pack-en-base
sudo dpkg-reconfigure locales
comment out the SendEnv LANG LC_* line in the local /etc/ssh/ssh_config file.

PostgreSQL Barman Backups

Install PostgreSQL and the Barman dependencies

On the Barman server

sudo apt-get install build-essential postgresql-9.1 postgresql-server-dev-9.1 python-dev python-pip vim
sudo pip install argh psycopg2 python-dateutil==1.5

Setup the Barman user

Boa noite pessoal , segue abaixo um script de hardening para servidores redhat , logico que voce pode adaptar para distro de seu servidor , fique a vontade para modificar e alterar o mesmo ,queria agradecer tambem ao meu camarada from hell @alexandrosilva e @crashbrz ambos do dclabs www.dclabs.com.br segue abaixo.
#! /bin/bash
#
# _ _ _
# | | | | _ (_)
# ____| | _____ ____ __| |_____ ___ _| |_ _ ____ _____
Boa noite pessoal , segue abaixo um script de hardening para servidores redhat , logico que voce pode adaptar para distro de seu servidor , fique a vontade para modificar e alterar o mesmo ,queria agradecer tambem ao meu camarada from hell @alexandrosilva e @crashbrz ambos do dclabs www.dclabs.com.br segue abaixo.
#! /bin/bash
#
# _ _ _
# | | | | _ (_)
# ____| | _____ ____ __| |_____ ___ _| |_ _ ____ _____
rh 6.0 kickstart with gpt.
1. add necessary service, remove unnecessary service
2. The last section starting with "#$SNIPPET('custom/xxyy')" are some post install scripts:
* modify /etc/hosts
127.0.0.1 localhost.localdomain localhost
private_ip hostname.jaseywang.me hostname
* remove zero route
* add some parameters to kernel options
* disable ipv6
* add ntp server for each server to sync time
RH & CentOS
1. mv /etc/modprobe.d/ipv6.conf /var/tmp
2. cat /etc/modprobe.d/bonding.conf
alias bond0 bonding
options bond0 mode=0 miimon=100 downdelay=200 updelay=200