This file contains hidden or 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/env bash | |
# Created by Richardson Lima - contatorichardsonlima at gmail dot com | |
# set -x | |
Nat='' # NAT IP | |
Timeout='15' # Seconds | |
File='./EnvFile.txt' | |
User='' # Username for ssh connection | |
function CreateEnvFile(){ |
This file contains hidden or 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/env bash | |
# Created by Richardson Lima - contatorichardsonlima at gmail dot com | |
# set -x | |
Timeout='15' | |
VlanHosts="/home/user/SrvList/VlanID01" # File that contains Servers ipaddr | |
User='' # SSH User | |
Port='' # SSH port | |
function CreateCollect(){ |
This file contains hidden or 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
* CentOS Dockerfiles for various common implementations | |
https://github.com/CentOS/CentOS-Dockerfiles | |
[+] Centos 7.2 | |
- Pull an image | |
$ sudo docker pull centos | |
- List images | |
$ sudo docker images |
This file contains hidden or 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
# Rename this file to Dockerfile | |
FROM scratch | |
MAINTAINER The CentOS Project <[email protected]> | |
ADD centos-7.2.1511-docker.tar.xz / | |
LABEL name="CentOS Base Image" | |
LABEL vendor="CentOS" | |
LABEL license=GPLv2 | |
# Volumes for systemd |
This file contains hidden or 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
- Using Dockerfiles to Automate Building | |
- Building your Centos7.2 image | |
$ mkdir Docker_Env && cd Docker_Env && mkdir Centos7.2 && cd Centos7.2 | |
$ wget https://gist.github.com/richardsonlima/6125b332ae68d97899b6 && mv mv 6125b332ae68d97899b6 Dockerfile | |
$ wget https://github.com/CentOS/sig-cloud-instance-images/blob/a3c59bd4e98a7f9c063d993955c8ec19c5b1ceff/docker/centos-7.2.1511-docker.tar.xz . | |
$ sudo docker build -t centos72:Centos72-mybuild01 . | |
- List your image | |
$ sudo docker images| grep Centos72-mybuild01 |
This file contains hidden or 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
$ cat << EOF > Dockerfile | |
FROM scratch | |
MAINTAINER The CentOS Project <[email protected]> - ami_creator | |
ADD centos-7.1503-20150330_1749-docker.tar.xz / | |
CMD ["/bin/bash"] | |
EOF | |
$ wget https://github.com/CentOS/sig-cloud-instance-images/blob/bc561dfdd671d612dbb9f92e7e17dd8009befc44/docker/centos-7.1503-20150330_1749-docker.tar.xz | |
$ sudo docker build -t centos71_build01:Centos71-build01 . | |
$ sudo docker run -i -t 0766e111527f ps |
This file contains hidden or 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 | |
# Program information | |
name="LinuxCollector" | |
version="3.0.0" | |
releasedate="25 November 2015" | |
author="Richardson Lima, " | |
author_contact="[email protected]" | |
website="http://www.richardsonlima.com.br" | |
copyright="Copyright 2014-2015 - ${author}, ${website}" |
This file contains hidden or 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 | |
echo -e "\033[33;1;34m [*] \033[0m \033[33;1;32m Calculando MaxClients dividindo maior Apache Thread pela memoria livre \033[0m"; | |
if [ -e /etc/debian_version ]; then | |
APACHE="apache2" | |
elif [ -e /etc/redhat-release ]; then | |
APACHE="httpd" | |
fi | |
APACHEMEM=$(ps -aylC $APACHE |grep "$APACHE" |awk '{print $8'} |sort -n |tail -n 1) | |
APACHEMEM=$(expr $APACHEMEM / 1024) | |
SQLMEM=$(ps -aylC mysqld |grep "mysqld" |awk '{print $8'} |sort -n |tail -n 1) |
This file contains hidden or 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 | |
# set -x | |
# save the script in /usr/local/bin/fw-rules-websrv-02 and make it executable | |
# chmod +x /usr/local/bin/fw-rules-websrv-02 | |
# run --> fw-rules-websrv-02 | |
IPTABLES=/sbin/iptables | |
IFACE_EXT="eth0" | |
IFACE_INT="eth1" | |
WEBSRV_01_INT_ADDR="" |
This file contains hidden or 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
- SysCtl Conf (kernel) | |
http://blog.richardsonlima.com.br/post/138189026200/coping-with-the-tcp-time-wait-state-on-busy-linux | |
net.ipv4.tcp_tw_reuse = 0 | |
net.ipv4.tcp_tw_recycle = 0 | |
net.ipv4.ip_local_port_range = 1024 65023 | |
net.ipv4.tcp_max_syn_backlog = 10240 | |
net.ipv4.tcp_max_tw_buckets = 400000 | |
net.ipv4.tcp_max_orphans = 60000 | |
net.ipv4.tcp_synack_retries = 3 |
OlderNewer