This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash | |
########################################################## | |
### INTRODUCTION | |
########################################################## | |
: ' | |
Install and configure R (Redis) + ELK server from scratch on CentOS 6.5. | |
* Logstash version 1.4.2 | |
* Elasticsearch version 1.3.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[root@... memcached-2.2.0]# make | |
/bin/sh /usr/local/php5515/bin/memcached-2.2.0/libtool --mode=compile cc -I/usr/include/php -I. -I/usr/local/php5515/bin/memcached-2.2.0 -DPHP_ATOM_INC -I/usr/local/php5515/bin/memcached-2.2.0/include -I/usr/local/php5515/bin/memcached-2.2.0/main -I/usr/local/php5515/bin/memcached-2.2.0 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /usr/local/php5515/bin/memcached-2.2.0/php_memcached.c -o php_memcached.lo | |
libtool: compile: cc -I/usr/include/php -I. -I/usr/local/php5515/bin/memcached-2.2.0 -DPHP_ATOM_INC -I/usr/local/php5515/bin/memcached-2.2.0/include -I/usr/local/php5515/bin/memcached-2.2.0/main -I/usr/local/php5515/bin/memcached-2.2.0 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /usr/local/php5515/bin/memcached-2.2.0/p |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set DNS to Primary AD | |
$eth = Get-WmiObject win32_networkadapterconfiguration -filter "ipenabled ='true'"; | |
$dns_servers = "1.2.3.4" | |
$eth.SetDNSServerSearchOrder($dns_servers); | |
# Add domain | |
$domain = "domain.local" | |
$password = "password" | ConvertTo-SecureString -asPlainText -Force | |
$username = "$domain\Administrator" | |
$credential = New-Object System.Management.Automation.PSCredential($username,$password) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import sys | |
import csv | |
import random | |
import time | |
import smtplib | |
import dns.resolver | |
class DNS(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input { | |
stdin { | |
type => "stdin-type" | |
} | |
file { | |
type => "apache" | |
path => ["/var/log/apache2/access.log", "/var/log/apache2/ error.log"] | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# eth0 | |
$ vim /etc/network/interfaces | |
# Auto generated lo interface | |
auto lo | |
iface lo inet loopback | |
# Static ip | |
iface eth0 inet static | |
address 10.0.0.50 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# eth0 | |
$ vim /etc/sysconfig/network-scripts/ifcfg-eth0 | |
DEVICE="eth0" | |
NM_CONTROLLED="yes" | |
ONBOOT=yes | |
TYPE=Ethernet | |
BOOTPROTO=static | |
NAME="eth0" | |
IPADDR=ipaddress |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
#### DEPENDENCIES: mutt | |
#### VARS | |
[email protected] | |
DATE=$(date +%Y-%m-%d) | |
LOCAL_BACKUP=/path/to/backup | |
LOCAL_ARCHIVE=$HOME/backup-${DATE}.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
FileCli | |
""" | |
import sys, os | |
class FileOperation(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class apache { | |
notify {'Apache2': | |
before => Service['apache2'] | |
} | |
exec {'apt-get update': | |
command => '/usr/bin/apt-get update' | |
} |