Skip to content

Instantly share code, notes, and snippets.

View galanteh's full-sized avatar

Hernan Galante galanteh

  • Cloudera
  • Mexico City
View GitHub Profile
@galanteh
galanteh / install.sh
Created April 2, 2020 14:31
AWS Disk Extension on Linux
# After extending the disk on the AWS console. You should check in Linux the disk.
# Check
lsblk
# Output will somthing like this
#
# NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
# xvda 202:0 0 20G 0 disk
# └─xvda1 202:1 0 8G 0 part /
@galanteh
galanteh / install_fake_Apache_log_generator.sh
Created March 22, 2020 23:44
Fake Apache Log Generator from NiFi
mkdir -p /opt/nifi
cd /opt/nifi/
yum -y install git epel-release python-pip
git clone https://github.com/kiritbasu/Fake-Apache-Log-Generator
cd /opt/nifi/Fake-Apache-Log-Generator
pip install --upgrade pip
pip install -r requirements.txt
chown -R nifi:nifi /opt/nifi/
@galanteh
galanteh / install.sh
Created March 22, 2020 23:09
Splunk installation on Linux
yum -y update
wget -O splunk-8.0.2.1-f002026bad55-linux-2.6-x86_64.rpm 'https://www.splunk.com/bin/splunk/DownloadActivityServlet?architecture=x86_64&platform=linux&version=8.0.2.1&product=splunk&filename=splunk-8.0.2.1-f002026bad55-linux-2.6-x86_64.rpm&wget=true'
chmod 744 splunk-8.0.2.1-f002026bad55-linux-2.6-x86_64.rpm
rpm -i splunk-8.0.2.1-f002026bad55-linux-2.6-x86_64.rpm
rpm -i --prefix=/opt/splunk splunk-8.0.2.1-f002026bad55-linux-2.6-x86_64.rpm
export SPLUNK_HOME=/opt/splunk
chown -R splunk:splunk $SPLUNK_HOME
$SPLUNK_HOME/bin/splunk start --accept-license --answer-yes
@galanteh
galanteh / install.sh
Last active April 2, 2023 18:13
Install Megatools on CentOS 7. Megatools are the commands to be used on linux
#!/bin/bash
yum -y install gcc make glib2-devel libcurl-devel openssl-devel gmp-devel tar automake autoconf libtool wget asciidoc
wget https://megatools.megous.com/builds/megatools-1.10.0-rc1.tar.gz
tar -xzvf megatools*.tar.gz
cd megatools*
./configure
make
make install
# megadl 'https://mega.nz/#xxxxxxxxxxx!'
@galanteh
galanteh / install_ora_19c.sh
Last active February 3, 2024 12:34
Installing Oracle 19c on Centos 7.7
#!/bin/bash
# ORACLE 19c Install Script by Hernan Galante <hernan_galante@hotmail>
# ------------------------------------------------------------------
# First, go to the Oracle Downloads website and try to download your RPM. You will ACCEPT the Terms.
# This will generate a cookie than you can export from your browser with any add-on for Chrome or Firefox.
# Copy this cookie.txt to your server. This script assumes that you have this file.
#
# TROUBLESHOOTING
# ------------------------------------------------------------------
# If you receive this error message [FATAL] [DBT-06103] The port (1,521) is already in use.
@galanteh
galanteh / install.sh
Created November 5, 2019 20:43
Install Grafana over CentOS7.5 on Port 80
sudo bash -c "cat << EOF > /etc/yum.repos.d/grafana.repo
[grafana]
name=grafana
baseurl=https://packages.grafana.com/oss/rpm
repo_gpgcheck=1
enabled=1
gpgcheck=1
gpgkey=https://packages.grafana.com/gpg.key
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
@galanteh
galanteh / install.sh
Created November 5, 2019 18:27
Installation of Graphite App over CentOS 7.5 on 80 port
# Install EPEL Repo
sudo yum install -y epel-release
# Update the OS
sudo yum -y update
# Install HTOP to monitor processes
sudo yum install -y htop
# Install Graphite and Carbon
sudo yum install -y graphite-web python-carbon
# Configuration - Change TimeZone and Security
@galanteh
galanteh / install_sqlserver_2017_ubuntu.txt
Last active October 22, 2019 15:29
Install Script SQLServer 2017 SP1 on Ubuntu 16.04
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
sudo add-apt-repository "$(wget -qO- https://packages.microsoft.com/config/ubuntu/16.04/mssql-server-2017.list)"
sudo apt-get update
sudo apt-get install -y mssql-server
sudo /opt/mssql/bin/mssql-conf setup
sudo systemctl enable mssql-server
sudo systemctl start mssql-server
@galanteh
galanteh / compile_apache_livy.txt
Created September 9, 2019 22:31
Compilation of Cloudera Apache Livy 0.3.0 on CentOS 7.5
# Choose an Edge node. Login as root.
# This recipe works to compile Apache Livy 0.3.0 from Cloudera repo.
yum -y install maven
cd /opt
wget https://github.com/cloudera/livy/archive/v0.3.0.zip
unzip v0.3.0.zip
cd livy-0.3.0
yum -y install python-pip
python -m pip install --upgrade pip setuptools wheel
@galanteh
galanteh / temp_table_logs.sql
Last active July 13, 2019 23:43
Get the temp table logs from Vertica for Navigator Optimizer
/* Temp table logs */
SELECT anchor_table_schema || '.' || anchor_table_name as TABLE_NAME,
projection_column_count as AVG_ROW_LEN,
SUM(row_count) as NUM_ROWS,
CASE
WHEN row_count<=99999 THEN 'x-small'
WHEN row_count<=999999 THEN 'small'
WHEN row_count<=99999999 THEN 'medium'
WHEN row_count<=999999999 THEN 'large'
WHEN row_count>999999999 THEN 'x-large'