Skip to content

Instantly share code, notes, and snippets.

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

Rafael Carreiro carreirorco

🏠
Working from home
View GitHub Profile
@carreirorco
carreirorco / install_elasticsearch-2.3.4_on_centos7.md
Created October 2, 2018 15:55
Instalação do Elasticsearch 2.3.4 no Centos 7

Instalação do Elasticsearch 2.3.4 no Centos 7

Instalar wget caso ainda não o tenha:

yum install -y wget

Baixe os pacotes de instalação:

@carreirorco
carreirorco / install_apache2.4-php56_with_modules_on_centos7.md
Created October 3, 2018 14:28
Instalação Apache 2.4 e PHP 5.6 com módulos extras no Centos 7

Instalação Apache 2.4 e PHP 5.6 com módulos extras no Centos 7

Adicionar repositório EPEL

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

Instalar Apache 2.4 + ITK

#!/bin/bash
# configure_fail2ban.sh
# Adicionar IPs na whitelist
ignoreip=
yum -q install -y fail2ban 2> /dev/null
cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local
sed -i "s|ignoreip = 127.0.0.1/8.*|ignoreip = 127.0.0.1/8 ${ignoreip}|g" /etc/fail2ban/jail.local
sed -i '/\[apache-badbots\]/a enabled = true' /etc/fail2ban/jail.local
@carreirorco
carreirorco / gist:ac2a6691525af352febeef7f93719334
Last active August 29, 2021 16:44
install_ansible_on_fedora34.sh
sudo dnf -y upgrade
sudo dnf install -y ansible vim
ansible --version
@carreirorco
carreirorco / gist:d01efd2080b9f528b7bf0ce2295bae76
Last active August 29, 2021 17:22
install_jaredhocutt.gnome_extensions_ansible_role.sh
###
# Criar o diretório e acessá-lo
###
mkdir lab_ansible ; cd lab_ansible
###
# Criar o playbook que utilizará a role citada
###
echo '- hosts: localhost
roles:
@carreirorco
carreirorco / gist:f8aba85f80c8bf50b1c83e634d4f6b4d
Created August 29, 2021 17:24
resultado_execucao_InstallGnomeExtensions_yml
[rafael@fedora lab_ansible]$ ansible-playbook InstallGnomeExtensions.yml
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
PLAY [localhost] *******************************************************************************************************************************************************
TASK [Gathering Facts] *************************************************************************************************************************************************
ok: [localhost]
TASK [jaredhocutt.gnome_extensions : Parse Gnome Shell version] ********************************************************************************************************
ok: [localhost]
@carreirorco
carreirorco / gist:0f35cc282ab70325177952e62684475a
Created August 29, 2021 17:38
InstallGnomeExtensions.yml
- hosts: localhost
roles:
- role: jaredhocutt.gnome_extensions
vars:
gnome_extension_ids:
- 779 # Clipboard Indicator by @Tudmotu
- 1319 # GSConnect by @dlandau
- 750 # OpenWeather by @jens
- 906 # Sound Input & Output Device Chooser by @kgshank
- 19 # User Themes by @fmuellner
PLAY RECAP *************************************************************************************************************************************************************
localhost : ok=38 changed=16 unreachable=0 failed=0 skipped=6 rescued=0 ignored=0
- hosts: localhost
roles:
- role: jaredhocutt.gnome_extensions
vars:
gnome_extension_ids:
- 779 # Clipboard Indicator by @Tudmotu
- 1319 # GSConnect by @dlandau
- 750 # OpenWeather by @jens
- 906 # Sound Input & Output Device Chooser by @kgshank
- 19 # User Themes by @fmuellner