Skip to content

Instantly share code, notes, and snippets.

View evaristorivi's full-sized avatar
🏠
Trabajando desde casa

Evaristo evaristorivi

🏠
Trabajando desde casa
View GitHub Profile
@evaristorivi
evaristorivi / gist:b27e2634d47ef1add1e8e826a48586ed
Created November 7, 2018 13:28
Dependencias Oracle 18c en Ubuntu
apt install alien autoconf automake autotools-dev binutils doxygen \
elfutils expat gawk gcc gcc-multilib g++-multilib libstdc++6:i386 ksh less libtiff5 \
libtiff5-dev lib32z1 libaio1 libaio-dev libc6-dev libc6-dev-i386 libc6-i386 \
libelf-dev libltdl-dev libmotif4 libodbcinstq4-1 libodbcinstq4-1:i386 \
libpthread-stubs0 libpth-dev libstdc++5 lsb-cxx make \
pdksh openssh-server rlwrap rpm sysstat unixodbc unixodbc-dev x11-utils \
zlibc libglapi-mesa:i386 libglu1-mesa:i386 libqt4-opengl:i386 \
libpthread-workqueue0 libpthread-workqueue-dev libzthread-2.3-2 \
libzthread-dev \
libpthread-stubs0-dev libaio-dev
echo 'deb http://cz.archive.ubuntu.com/ubuntu precise main universe' >> /etc/apt/sources.list.d/extra.list
echo 'deb http://cz.archive.ubuntu.com/ubuntu trusty main universe' >> /etc/apt/sources.list.d/extra.list
dbca -createDatabase -silent -gdbName ora18c -templateName XE_Database.dbc -sysPassword YourPWD1 -systemPassword YourPWD1 -dbsnmpPassword YourPWD1 -datafileDestination /opt/oracle/oradata -storageType FS -memoryPercentage 20 -emConfiguration NONE -sampleSchema false -J-Doracle.assistants.dbca.validate.ConfigurationParams=false
#Las siguientes variables las hemos obtenido examinando el fichero /etc/init.d/oracle-xe-18c configure
# DB defaults
export ORACLE_HOME=/opt/oracle/product/18c/dbhomeXE
export ORACLE_SID=XE
export TEMPLATE_NAME=XE_Database.dbc
export PDB_NAME=XEPDB1
export LISTENER_NAME=LISTENER
export NUMBER_OF_PDBS=1
export CREATE_AS_CDB=true
#!/bin/sh
case "$1" in
start) mkdir /var/lock/subsys 2>/dev/null
touch /var/lock/subsys/listener
rm /dev/shm 2>/dev/null
mkdir /dev/shm 2>/dev/null
mount -t tmpfs shmfs -o size=2048m /dev/shm ;;
*) echo error
exit 1 ;;
esac
# Oracle 18c XE kernel parameters
fs.file-max=6815744
net.ipv4.ip_local_port_range=9000 65000
kernel.sem=250 32000 100 128
kernel.shmmax=536870912
#!/bin/bash
# Oracle 11gR2 XE installer chkconfig hack for Ubuntu
file=/etc/init.d/oracle-xe
if [[ ! `tail -n1 $file | grep INIT` ]]; then
echo >> $file
echo '### BEGIN INIT INFO' >> $file
echo '# Provides: OracleXE' >> $file
echo '# Required-Start: $remote_fs $syslog' >> $file
echo '# Required-Stop: $remote_fs $syslog' >> $file
echo '# Default-Start: 2 3 4 5' >> $file
@evaristorivi
evaristorivi / DVD Backup Script
Created December 13, 2018 00:50
DVD Backup Script
#!/bin/bash
#Autor: Evaristo R. Rivieccio Vega
#Configuración General
##############################
###############################
#Directorio de backup
directorioback="/root/backups"
@evaristorivi
evaristorivi / quakes.coffee
Created January 15, 2019 11:12 — forked from EnriqueVidal/quakes.coffee
Mini hubot-script for hubot talk in tijuana.js
# Description:
# Ask hubot about the recent earthquakes in the last (hour, day, week or month).
#
# Dependencies:
# None
#
# Configuration:
# None
#
# Commands:
@evaristorivi
evaristorivi / lambda_send_email_policy
Last active May 2, 2019 17:39
lambda_send_email_policy
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ses:SendEmail",
"ses:SendRawEmail"
],
"Resource": "*"